import random
str1 = input("请输入你的名字:")
print("hello!{}".format(str1))
guard = ord(str1[0]) % 100
print("您的幸运数是", random.choice(range(guard)))
Python二级练习:幸运数
阅读 93
2022-02-26
import random
str1 = input("请输入你的名字:")
print("hello!{}".format(str1))
guard = ord(str1[0]) % 100
print("您的幸运数是", random.choice(range(guard)))
相关推荐
精彩评论(0)