亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
# Enter a code
d = {'Alice': [50, 61, 66], 'Bob': [80, 61, 66], 'Candy': [88, 75, 90]}
for i in d.keys():
print('{}: {}'.format(i,d[i]))
d = {
'Alice': 45,
'Bob': 60,
'Candy': 75,
'David': 86,
'Ellena': 49
}
oldResult = d['Alice']
d['Alice'] = 60
print(d)
print(oldResult)
# Enter a code
d = {
'Alice': 45,
'Bob': 60,
'Candy': 75,
'David': 86,
'Ellena': 49
}
d['Alice'] = 60
print(d)
# Enter a code
d = {
'Alice': [45],
'Bob': [60],
'Candy': [75],
}
d['Alice'] = [50,61,66]
d['Bob'] = [80,61,66]
d['Candy'] = [88,75,90]
print(d)
# Enter a code
T = ((1+2), ((1+2),), ('a'+'b'), (1, ), (1,2,3,4,5))
print(T)
# Enter a code
result = (100, 69, 29, 100, 72, 99, 98, 100, 75, 100, 100, 42, 88, 100)
counts = result.count(100)
print(counts)
# Enter a code
TextTuple = tuple(range(10))
print(TextTuple)
TextList = list(TextTuple)
print(TextList)
# Enter a code
TextTuple = (0,1,2,3,4,5,6,7,8,9)
print(TextTuple)
TextList = list(TextTuple)
print(TextList)
# coding: utf-8
s=r'''這是一句中英文混合的Python字符串:
Hello World!'''
print(s)
#the first
template='life is {0}, you need {1}.'
result=template.format('short','Python')
print(result)
#the second
template='you need {p}, life is {s}.'
short='short'
Python='Python'
result=template.format(p=Python, s=short)
print(result)
# Enter a code
L = [[1, 2, 3], [5, 3, 2], [7, 3, 2]]
for x in L:
length = x[0]
width = x[1]
height = x[2]
result = (length*width+length*height+width*height)*2
print(result)
# Enter a code
L = ['Alice', 'Bob', 'Candy', 'David', 'Ellena']
L.pop(2)
L.pop(2)
print(L)
# Enter a code
student = ['Alice', 'Bob', 'Candy', 'David', 'Ellena']
student.append('Zero')
student.insert(5,'Phoebe')
student.insert(5,'Gen')
print(student)
# Enter a code
L = [95.5, 85, 59, 66, 72]
L.sort()
print(L[-1],L[-2],L[-3])
# Enter a code
L = [95.5, 85, 59, 66, 72]
L.sort()
print(L[len(L)-1])
print(L[len(L)-2])
print(L[len(L)-3])
課程須知
如果您了解程序設計的基本概念,會簡單使用命令行,了解中學數學函數的概念,那么對課程學習會有很大的幫助,讓您學起來得心應手,快速進入Python世界。
老師告訴你能學到什么?
通過本課程的學習,您將學會搭建基本的Python開發環境,以函數為基礎編寫完整的Python代碼,熟練掌握Python的基本數據類型以及list和dict的操作,靈活使用流程控制語句。

微信掃碼,參與3人拼團

微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號

友情提示:

您好,此課程屬于遷移課程,您已購買該課程,無需重復購買,感謝您對慕課網的支持!

本次提問將花費2個積分

你的積分不足,無法發表

為什么扣積分?

本次提問將花費2個積分

繼續發表請點擊 "確定"

為什么扣積分?

舉報

0/150
提交
取消