第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
s1 = 'ABC'
s2 = '123'
s3 = 'xyz'
for x in s1:
for y in s2:
for z in s3:
print(x + y + z)
num = 0
sum = 0
while True:
if num > 1000:
break
if num%2!=0:
num = num+1
continue
sum = sum+num
num = num+1
print(sum)
num = 0
sum = 0
while True:
if num>1000:
break
if num%2==0:
sum = sum+num
num = num+1
print(sum)
num = 1
mul = 1
while num<=10:
mul = mul * num
num = num+1
print(mul)
L = [75, 92, 59, 68, 99]
sum = 0
for i in L:
sum += i
print(sum)
print(sum/5)
print(sum/len(L))
age = 2
if age>=18:
print('adult')
elif age>=6 and age<18:
print('teenager')
elif age>=3 and age<6:
print('kid')
else:
print('baby')
age =30
if age<18:
print('teenager')
else:
print('adult')
age = 19
if age>18:
print('adult')
print('dondonqiang age {}'.format(age))
else:
print('minor')
template = '{l} {i} {s}, {y} {n} {p}'
l = 'Life'
i = 'is'
s = 'short'
y = 'you'
n = 'need'
p = 'Python'
result = template.format(l,i,s,y,n,p)
print(result)

result = template.format(l='Life',i='is',s='short',y='you',n='need',p='Python')
print(result)
template = '{}'
con = 'Life is short,you need Python'
result = template.format(con)
print(result)

template = '{0} {1} {2},{3} {4} {5}'
result = template.format('Life','is','short','you','need','Python')
print(result)
print(r'''
"To be, or not to be": that is the question.Whether it's nobler in the mind to suffer.
''')
print("special string:',\",\,\\\,\\n,\\t")
print("special string:',\",\,\\\\,\\n,\\t")
>>> a='python'
>>> print('hello,',a or 'world')
hello, python
解釋:短路運算 a or 'world',a為True結果一定為True,直接返回a
>>> b=''
>>> print('hello,',b or 'world')
hello, world
解釋:python講空字符串看作False,b or 'world',b為False,結果取決于'world',直接返回‘world’
def func(x):
if isinstance(x, list):
sum = 0
for item in x:
sum += item
return sum
elif isinstance(x, tuple):
sum = 1
for item in x:
sum *= item
return sum

L = [1, 2, 3,4]
t = tuple(L)
print(func(L),func(t))
課程須知
如果您了解程序設計的基本概念,會簡單使用命令行,了解中學數(shù)學函數(shù)的概念,那么對課程學習會有很大的幫助,讓您學起來得心應手,快速進入Python世界。
老師告訴你能學到什么?
通過本課程的學習,您將學會搭建基本的Python開發(fā)環(huán)境,以函數(shù)為基礎編寫完整的Python代碼,熟練掌握Python的基本數(shù)據(jù)類型以及l(fā)ist和dict的操作,靈活使用流程控制語句。

微信掃碼,參與3人拼團

微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號

友情提示:

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

本次提問將花費2個積分

你的積分不足,無法發(fā)表

為什么扣積分?

本次提問將花費2個積分

繼續(xù)發(fā)表請點擊 "確定"

為什么扣積分?

舉報

0/150
提交
取消