学论坛视频的笔记class3
“”外面用‘ ’
转义字符
\n 就是换行:print("iloveyou\n"*3000)
r 就是 转义 r“”
\n\ 告诉没完
""" """
"520" + "1314"= "5201314"
print("iloveyou\n"*3000)
读代码!
game.py -> edit IDLE
"""重修 重修 重修"""//程序的说明文档
temp = input ("guess whichnumber is in my mind:")// =赋值运算符,赋值语句;将右边的value和
//左边的vaiable挂钩;input 函数是用于接收用户输入并且返回;
“将用户输入的值和左边变量名 temp进行挂钩
guess = int(temp)
if guess == 8:
print(" bingo")
print(" no reward for you hhh")
else:
print(" wrong the answer is 8 hh")
print("game is over")
页:
[1]