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

為了賬號安全,請及時綁定郵箱和手機立即綁定

最新回答 / 慕運維2498310
變量名由大小寫英文字母、數字和下劃線_組成變量不能用數字開頭變量盡量不要和Python關鍵字重合(比如前面學習過的:and、or、not,否則可能導致Python原有關鍵字發揮不出作用)
最容易理解的
def greet(param):
if param == None:
print('Hello World')
else:
print('Hello,{}'.format(param))

greet('Python')

最新回答 / weixin_慕俠6466137
在瀏覽器搜索python,進入官網,找到3.8版的,一定要按照電腦適配的位數,比如Windows64位就下載64位,Windows32位就下載32位。還有一個方法摁住Windows鍵再摁下R鍵,會在左下角彈出一個對話框,輸入cmd或者python回車就可以了
為啥還要print(T)呢?我不明白
有沒有考慮,同分的情況?。?!
>>> print(type(3.1415926))
<class 'float'>
>>> print(type('Learn Python in imoc'))
<class 'str'>
>>> print(type(100))
<class 'int'>
>>> print(type(0b1101))
<class 'int'>
>>>
names = ['Alice', 'Bob', 'Candy', 'David', 'Ellena']
names.append('Zero')
names.insert(5,'Phoebe')
names.insert(-2,'Gen')
print(names)

最新回答 / 一路庚心
沒有代碼截圖,,大概率是第一個for 最后的冒號不是英文
d = {
'Alice': [45],
'Bob': [60],
'Candy': [75],
}
d['Alice'] = [50,61,66]
d['Bob'] = [80,61,66]
d['Candy'] = [88,75,90]

print(d)
a=2
at=0
while a<=1000:
if a == 1000:
break;
at+=a
a=a+2
print(at)
template = 'Life is short,{}'
A = 'you need Python'
result = template.format(A)
print(result)

template = 'Life is short,{}'
result = template.format('you need Python')
print(result)

最新回答 / 送東野
根據短路運算原理,True or True進行運算時,在看到第一個True時就可以確定結果是True,不需要關注后面參與運算的是True還是False,所以只輸出第一個True。
template='Life is {},you need {}'
result=template.format('short','python')
print(result)


template='Life is {s},you need {p}'
short='short'
python='python'
result=template.format(s=short,p=python)
print(result)
# Enter a code
def classmate(**kwargs):
for i in range(0,len(kwargs.get('names'))):
print('{} ,{} ,{}'.format(kwargs.get('names')[i],kwargs.get('gender')[i],kwargs.get('age')[i]))
classmate(names = ['Alice', 'Bob', 'Candy'], gender = ['girl', 'boy', 'girl'], age = [16, 17, 15])
課程須知
如果您了解程序設計的基本概念,會簡單使用命令行,了解中學數學函數的概念,那么對課程學習會有很大的幫助,讓您學起來得心應手,快速進入Python世界。
老師告訴你能學到什么?
通過本課程的學習,您將學會搭建基本的Python開發環境,以函數為基礎編寫完整的Python代碼,熟練掌握Python的基本數據類型以及list和dict的操作,靈活使用流程控制語句。

微信掃碼,參與3人拼團

微信客服

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

幫助反饋 APP下載

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

公眾號

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

友情提示:

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

本次提問將花費2個積分

你的積分不足,無法發表

為什么扣積分?

本次提問將花費2個積分

繼續發表請點擊 "確定"

為什么扣積分?

舉報

0/150
提交
取消