习题36
python :3.9
这节让自己设计一个游戏,但是我好像设计的是对话,我会慢慢完善的
def Lisa():
print ("You choose Lisa,Why?")
print ("1.her songs")
print ("2.her apperarence")
print ("3.her body")
answer=input(">")
if "1 "in answer :
print (" You a true fun!")
elif "2" in answer :
print (" You are the Appearance Consortium!")
elif "3" in answer :
print (" You are an old ruffian!")
else :
print ("you're lose a chance!")
def JISCO():
print ("you choose JISCO,but do you know everything about her ?")
answer = input ("?")
if "Yes" in answer:
print ("you're a true fun ,so you can have dinner with her.")
elif "No" in answer:
print ("you're not really like her ,so you will die.")
else :
print ("you shouldn't do this.")
def JENNIE():
print (" You choose JENNIE .DO you know where she's from ?")
answer = input("?")
if "Korea" in answer:
print ("Looks like you knows something about she.")
else :
print ("you are a liar !")
def Rose():
print ("You choose Rose.But she's Lise's wife. SO, what should you do ? Flee or ?")
answer = input ("?")
if "flee" in answer:
print (" you can't flee .you 're died!")
else :
print (" whatever you do ,it's too late . you're died!")
def start():
print ("you will meet BlackPink ,but you can only choose one person .So ,who do you choose ?")
answer =input ("?")
if answer == "Lisa":
Lisa()
elif answer ==" JENNIE":
JENNIE()
elif answer=="JISCO":
JISCO()
else :
Rose()
start()
这是结果
PS C:\Users\78523\mybuff> python ex36.py
you will meet BlackPink ,but you can only choose one person .So ,who do you choose ?
?Lisa
You choose Lisa,Why?
1.her songs
2.her apperarence
3.her body
>1
you're lose a chance!
PS C:\Users\78523\mybuff> python ex36.py
you will meet BlackPink ,but you can only choose one person .So ,who do you choose ?
?Rose
You choose Rose.But she's Lise's wife. SO, what should you do ? Flee or ?
?Flee
whatever you do ,it's too late . you're died!
如果有错请及时提醒我,谢谢