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

為了賬號安全,請及時綁定郵箱和手機立即綁定
ptint(‘hello world’)
print(“yujin”)
print('方式1')
tp = 'Life is {},you need {}'
print (tp.format('short','python'))

print('方式2')
tp1= 'Life is {0},you need {1}'
result1=tp1.format('short','python')
print(result1)
a = r'''
"to be,or not to be":that is the question
whether it's nobler in hte mind to suffer!'''
print (a)
L1 = [1, 2, 3]
L2 = [5, 3, 2]
L3 = [7, 3, 2]
def s(L):
A = L[0] * L[1] + L[1] * L[2]+ L[0] * L[2]
return A
print(s(L1), s(L2), s(L3))
a = 'python'
print('hello,', a or 'world')

#a為非空字符串,所以為True,或運算,a為True則返回a

b = ''
print('hello,', b or 'world')

#b為空字符串,所以為False,b為False,或運算,有一個為True則結果為True,所以返回后面的word
3.1415926 浮點數
'Learn Python in imooc.' 字符串
100 整數
0b1101 二進制整數
Printf ('Hello World')
s = "ABCDEFGHIGKLMNOPQRSTUVWXYZ"
print(s[3])
print(s[0:4])
print(s[1:])
print(s[1:3])
print(s[ :3])
print(s[1: ])
>>> Length=3.14
>>> Width=1.57
>>> result=round(Length*Width,2)#
>>> print(result)
4.93
>>> Python='寶庫'#
>>> print(Python)
寶庫
>>> I='我'#
>>> Love='愛'#
>>> Python='Python計算機語言'#
>>> print(I,Love,Python)
我 愛 Python計算機語言
>>> s='雖然'#
>>> i='我'#
>>> B='很笨'#
>>> print(s,i,B)
雖然 我 很笨
>>> D='但是'#
>>> i='我'#
>>> N='努力'#
>>> print(D,i,N)
但是 我 努力
>>> H='會'#
>>> C='成功'#
>>> print(i,H,C)
我 會 成功
浮點數
字符串
整數
二進制數
# Enter a code
L = [75, 92, 59, 68, 99]
sum = 0
for i in L:
sum += i

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

微信掃碼,參與3人拼團

微信客服

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

幫助反饋 APP下載

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

公眾號

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

友情提示:

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

本次提問將花費2個積分

你的積分不足,無法發表

為什么扣積分?

本次提問將花費2個積分

繼續發表請點擊 "確定"

為什么扣積分?

舉報

0/150
提交
取消