Python Forum
so im trying to make a question game for school and im trying to make it when some on
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
so im trying to make a question game for school and im trying to make it when some on
#1
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 ')
Reply
#2
The program will as for music, place, and candy, no matter if there was a yes or no input. Some testing is called for.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to make a micromouse flood-fill maze alogrithm WhackoJacko99 1 60 Jan-25-2026, 10:39 AM
Last Post: Larz60+
  How to make ball stay within frame nathanael 2 820 Nov-15-2025, 04:07 PM
Last Post: deanhystad
Question I'm trying to make a piece of code Alislugacool 5 3,333 Sep-13-2025, 06:11 AM
Last Post: MilesWeb
  Make code run faster: point within polygon lookups Bennygib 3 1,475 Jul-11-2025, 07:24 AM
Last Post: FrankBuckland
  Cleaning my code to make it more efficient BSDevo 14 5,635 Jul-11-2025, 07:20 AM
Last Post: FrankBuckland
  How can I make this code more efficient and process faster? steven_ximen 0 859 Dec-17-2024, 04:27 PM
Last Post: steven_ximen
  How to make it so whatever I input into a script gets outputted on a different file spermatozwario 4 1,909 Nov-24-2024, 12:58 PM
Last Post: deanhystad
  Best way to make built-in functions available to my module functions? Pedroski55 1 1,580 Oct-28-2024, 06:40 AM
Last Post: Gribouillis
  Make a list learningpythonherenow 1 1,352 Oct-11-2024, 11:49 AM
Last Post: Pedroski55
  Trying to Make Steganography Program Work For All Payload Types Stegosaurus 0 2,167 Sep-26-2024, 12:43 PM
Last Post: Stegosaurus

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020