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

為了賬號安全,請及時綁定郵箱和手機立即綁定
# Enter a code
d = {
'Alice': [45],
'Bob': [60],
'Candy': [75],
}
L= ([50, 61, 66],[80, 61, 66],[88, 75, 90])
num = 0
for item in d:
d[item] = L[num]
i = num+1
print(d)
d = {
'Alice': 45,
'Bob': 60,
'Candy': 75,
'David': 86,
'Ellena': 49
}
L = ('Alice', 'Bob', 'Candy', 'Mimi', 'David')
for item in L:
print('{}:{}'.format(item,d.get(item)))
L = [[1, 2, 3], [5, 3, 2], [7, 3, 2]]
for item in L:
num = 1
for i in item:
num = i*num
print(num)
L = ['Alice', 66, 'Bob', True, 'False', 100]
num = 1
for c in L:
if num % 2 == 0:
print(c)
num += 1
age = 19
if age >= 18:
temp = 'adult {}'
print(temp.format(age))
# Enter a code
template = 'Life is {0}, {1} {2} {3}'
template1 = 'Life is {a},,{c} sgdggys'
print(template.format("short","you","need","python"))
aa='short'
bb = 'you'
cc = 'need'
dd = 'python'
print(template1.format(a=aa,b=bb,c=cc,d=dd))
print(r'''To be, or not to be: that is the question.Whether it's nobler in the mind to suffer.''')
print('Hello World')
最大的難度在于求表面積公式
Python遍歷dict
通過直接print(d),我們打印出來的是完整的一個dict;有時候,我們需要把dict中m(滿足)一定條件的元素打印出來
>>>print(my name is zilong xie)
L=[i*i for i in range(1,101)]
print(sum(L))
這個對嗎
long=3.14,wieth=1.57
round(num,2)保留小數點后面兩位數
print(‘hello world’)
課程須知
如果您了解程序設計的基本概念,會簡單使用命令行,了解中學數學函數的概念,那么對課程學習會有很大的幫助,讓您學起來得心應手,快速進入Python世界。
老師告訴你能學到什么?
通過本課程的學習,您將學會搭建基本的Python開發環境,以函數為基礎編寫完整的Python代碼,熟練掌握Python的基本數據類型以及list和dict的操作,靈活使用流程控制語句。

微信掃碼,參與3人拼團

微信客服

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

幫助反饋 APP下載

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

公眾號

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

友情提示:

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

本次提問將花費2個積分

你的積分不足,無法發表

為什么扣積分?

本次提問將花費2個積分

繼續發表請點擊 "確定"

為什么扣積分?

舉報

0/150
提交
取消