Python Forum

Full Version: so im trying to make a question game for school and im trying to make it when some on
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
so im trying to make a question game for school and im trying to make it when some on says no it stops the user from putting the inputs in but still lets the person that says yes to continue the game. im new to programing so anything will help





print('what is your name')

name = input()

print('hello '+ name )

print('do you want to play a game today ')

answer = input()
if answer == 'yes':
    print('okay lets play ')

if answer == 'no':
    print('okay have a good day ')
if answer == 'no':
    breakpoint(input)

if answer == 'yes':
    print('if you were in a band what would you play')
music = input()
print(music + ' that is cool')

if answer == 'yes':
    print('If you had to run away from everyone then where would you hide yourself?')
place = input()
print(place + ' clever')

if answer == 'yes':
    print('What is your favorite type of candy?')
candy = input()
print(candy + ' sweet ')
The program will as for music, place, and candy, no matter if there was a yes or no input. Some testing is called for.