Python 官方文档:入门教程 => 点击学习
# coding:utf-8from random import randintnum=randint(1,100)print "guess the right number ,so please input a number:"a=1wh
# coding:utf-8
from random import randint
num=randint(1,100)
print "guess the right number ,so please input a number:"
a=1
while a==1:
answer=input() ##把输入赋值给answer以便条件中用到比较大小
if answer<num :
print "it's too small"
if answer>num :
print "it's too big"
if answer==num :
print "right"
--结束END--
本文标题: python, my first cod
本文链接: https://lsjlt.com/news/187360.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0