Python 实现一个小判断的程序

xiaoxiao2021-02-28  78

初学python,写了一个Low的程序,大家勿喷!慢慢开始积累! print"=====猜中送跑车=====" temp = input("请输入我心里想的数字") if temp==8: print "你太厉害了,跑车送给你,开走吧" print "游戏结束,跑车已经被带走!" else: if temp > 8: print "太大了,孩子!" else: print "太小了,孩子!" ———————————————————————————————————————————— -———————————————————————————————————————————— D:\python\python.exe D:/IT/1.py =====猜中送跑车===== 请输入我心里想的数字8 你太厉害了,跑车送给你,开走吧 游戏结束,跑车已经被带走! Process finished with exit code 0 ————————————————————————————————————————————— ——————————————————————————————————————-——————- D:\python\python.exe D:/IT/1.py =====猜中送跑车===== 请输入我心里想的数字3 太小了,孩子! Process finished with exit code 0 —————————————————————————————————————————————— ——————————————————————————————————————————————
转载请注明原文地址: https://www.6miu.com/read-21122.html

最新回复(0)