文章

圆周率前100万位居然不包含我的生日,哼!

filename = 'pi_million_digits.txt'

with open(filename) as file_object:
    lines = file_object.readlines()

pi_string = ''
for line in lines:
    pi_string += line.rstrip()

birthday = input("Enter your birthday, in the form mmddyy: ")
if birthday in pi_string:
    print("Your birthday appears in the first million digits of pi!")
else:

print("Your birthday does not appear in the first million digits of pi.")


pi_million_digits 由于本文件包含圆周率前100万位,若发生服务器卡顿,我将删除该文件

原文来自:圆周率前100万位居然不包含我的生日,哼!,尊重自己,尊重每一个人;转发请注明来源!
0 2

发表评论