課程
/后端開發
/Python
/初識Python
我的錯誤在哪呢
2019-01-14
源自:初識Python 3-6
正在回答
注意空格問題
1.版本+語法問題
print?"Hello,world!"?#這是?Python2.x?的語法 print("Hello,world!")?#這是?Python?3.x的語法
2.這個 r 我掐指一算,應該是多余的,可以去掉
3.三個單引號 ''' ''' 是多行注釋,如果想要輸出的內容中使用 單引號,雙引號,在其前面加反斜杠。
print('\"To?be,or?not?to?be\":that?is?the?question.\nWhether?it\'s?nobier?in?the?mind?to?suffer.')
換行輸出用 \n,不是你寫代碼的時候換個行_(:з」∠)_
白色葬禮
有時候是這樣的,不管對錯都是不能通過,你刷新或者重進再提交就好了
print r''' "To be, or not to be ": that is the question.'''
print r''' " Whether it's nobler in the mind to suffer.'''
舉報
學python入門視頻教程,讓你快速入門并能編寫簡單的Python程序
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2019-01-14
注意空格問題
2019-01-14
1.版本+語法問題
2.這個 r 我掐指一算,應該是多余的,可以去掉
3.三個單引號 ''' ''' 是多行注釋,如果想要輸出的內容中使用 單引號,雙引號,在其前面加反斜杠。
換行輸出用 \n,不是你寫代碼的時候換個行_(:з」∠)_
2019-01-14
有時候是這樣的,不管對錯都是不能通過,你刷新或者重進再提交就好了
2019-01-14
print r''' "To be, or not to be ": that is the question.'''
print r''' " Whether it's nobler in the mind to suffer.'''