解决BREAK和.RANDOMCHOISE问题

时间:2019-08-26 11:35:44

标签: python

我正在尝试创建一个程序,要求用户完成一首歌的标题。歌曲应随机播放,如果点数低于0,程序将使用BREAK停止播放。

Round = 1
print("")
print("Round",Round,":")
print("")
file=open("songs.txt","r")
a=print("Drake-G_ _ _ _   _ _ _ _")
aa=input("Enter the missing letters: ") 
points1 = 3
if aa == "od's Plan":
    print("That's right, Drake-God's Plan. Well done!, you have earned", points1,"points.")
else:
    aa=input("Enter the missing letters: ")
    points1=points1-2
    if aa == "od's Plan":
        print("That's right, Drake-God's Plan. Well done!, you have earned", points1,"points.")
    else:
        points1=points1-2
        for i in str(points1):
            if points1 < 0:
              break
              print("GAME OVER")
print("")
print("Round",Round+1,":")
print("")
file=open("songs.txt","r")
b=print("Eminem-R_ _  _ _ _ ")
bb=input("Enter the missing letters: ") 
B=("ap God")
points2 = 3
if bb == B:
    print("That's right, Eminem-Rap God. Well done!, you have earned",points1+points2,"points.")
else:
    bb=input("Enter the missing letters: ")
    points2=points2-2
    if bb == "ap God":
        print("That's right, Eminem-Rap God. Well done!, you have earned",points1+points2,"points.")
    else:
        points2=points2-2
for i in str(points2):`
    if points2 < 0 :
        break
import random
mylist = [a,b]
random.choise(mylist)
print(mylist)

0 个答案:

没有答案