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

為了賬號安全,請及時綁定郵箱和手機立即綁定
# Enter a code
a=5
x=a
d=10
z=d/5
c=28
t=c/7
y=(x*z)/t
print(y,z)
def greet(L='world'):
sc='Hello,{}'.format(L)
return sc
print(greet())
print(greet('Lisi')
def square_of_sum(list):
result = 0
for num in list:
result += num * num
return result

print(square_of_sum([1, 2, 3, 4, 5]))
# Enter a code
L = [[1, 2, 3], [5, 3, 2], [7, 3, 2]]

for i in range(len(L)):
a = L[i][0]
b = L[i][1]
c = L[i][2]
print(2 * (a*b + b*c + a*c))
# Enter a code
names = ['Alice', 'Bob', 'Candy', 'David', 'Ellena']
new1 = 'Zero'
new2 = 'Phoebe'
new3 = 'Gen'

names.append(new2)
names.append(new1)
names.insert(5, new3)

print(names)
# Enter a code

s1='ABC'
s2='123'
s3='xyz'

for i in s1:
for j in s2:
for k in s3:
print(i + j + k)
# Enter a code

i = 0
sum = 0

while i <= 1000:
if i%2 != 0:
i = i+1
continue
sum += i
i = i+1

print (sum)
# Enter a code

i = 0
sum = 0

while True:
if i > 1000:
print (sum)
break
if i%2 == 0:
sum += i
i = i+1
浮點數
字符串
整數
二進制數
0.1+0.2是相同的
在3.12.3版本,輸入0.2+0.3的結果就是0.5,與這課上說的不同
ndn
num = 1
sum = 1
while num <=10:
sum*= num
num+= 1
print(num)
print(sum)
a = ['Alice', 'Bob', 'Candy', 'David', 'Ellena']
b = a.append('Gen') and a.append('Phoebe') and a.append('Zero')
print(a)
a = ['Alice', 'Bob', 'Candy', 'David', 'Ellena']
b = a.append('Gen')
c = a.append('Phoebe')
d = a.append('Zero')
print(a)
L = [95.5, 85, 59, 66, 72]
L = sorted(L)
p = (L[-1])
pr = (L[-2])
pri = (L[-3])
print('第一名: {}'.format(p))
print('第二名: {}'.format(pr))
print('第三名: {}'.format(pri))
課程須知
如果您了解程序設計的基本概念,會簡單使用命令行,了解中學數學函數的概念,那么對課程學習會有很大的幫助,讓您學起來得心應手,快速進入Python世界。
老師告訴你能學到什么?
通過本課程的學習,您將學會搭建基本的Python開發環境,以函數為基礎編寫完整的Python代碼,熟練掌握Python的基本數據類型以及list和dict的操作,靈活使用流程控制語句。

微信掃碼,參與3人拼團

微信客服

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

幫助反饋 APP下載

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

公眾號

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

友情提示:

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

本次提問將花費2個積分

你的積分不足,無法發表

為什么扣積分?

本次提問將花費2個積分

繼續發表請點擊 "確定"

為什么扣積分?

舉報

0/150
提交
取消