20230223
#BestWish.py
"""
程序功能:节日贺卡
编写日期:2023年2月23日
"""
holiday=input("请输入节日名称:")
To_name=input("请输入收件人的姓名:")
Fr_name=input("请输入送件人的姓名:")
print("__*__*__*__*__*__*__*__*__*__*__*__*")
print("__*__*__*__*__*__*__*__*__*__*__*__*")
print(" ")
print(" ")
print(" 节 日 祝 福 ")#标题
print()
print()
print(To_name+":") #收件人姓名
print()
print()
print()
print(" 祝您"+holiday+"快乐! ") #节日祝福语
print()
print()
print(" "+Fr_name) #送件人姓名
print()
print()
print("__*__*__*__*__*__*__*__*__*__*__*__*")
print("__*__*__*__*__*__*__*__*__*__*__*__*")
# Word Jumble 猜单词游戏
import random
#创建单词序列
WORDS = ["python","jumble","easy","difficult",
"answer","continue","phone","result","game"]
print("欢迎参加猜单词游戏!\n请把字母组合成一个正确的单词")
isContinue = "Y"
while isContinue in ("Y","y"):
#从序列中随机挑出一个单词
word = random.choice(WORDS)
#一个用于判断玩家是否猜对的变量
correct = word
#创建乱序后单词
jumble = ""
for i in word:
#根据word长度,产生word的随机位置
position = random.randrange(len(word))
#将position位置字母组合到乱序后单调
jumble += word[position]
#通过切片,将position位置字母从原单词中删
word = word[:position] + word[(position+1):]
print("\n乱序后的单词:", jumble)
guess = input("请你猜:")
while guess != correct and guess !="":
guess = input("对不起不正确")
print("真棒,你猜对了!")
isContinue = input("\n是否继续(Y/N)?")
#DrawTangentCircles.py
"""
实现画图
"""
import turtle
turtle.pensize(5)
turtle.pencolor('green')
turtle.circle(20)
turtle.circle(30)
turtle.circle(50)
turtle.circle(100)