简单的while循环:输入一个数字,while获取该数字,并输出该数字。例子:猜幸运数字是多少?
1 lucky_num = int(input("number:")) 2 a = 0 3 while a != lucky_num: 4 a += 1 5 print("Bingo! Your luncky number is:",int(a))