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
  Make code run faster: point within polygon lookups Bennygib 2 446 Apr-19-2025, 09:33 AM
Last Post: Larz60+
  How can I make this code more efficient and process faster? steven_ximen 0 422 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,240 Nov-24-2024, 12:58 PM
Last Post: deanhystad
  Best way to make built-in functions available to my module functions? Pedroski55 1 996 Oct-28-2024, 06:40 AM
Last Post: Gribouillis
  Make a list learningpythonherenow 1 898 Oct-11-2024, 11:49 AM
Last Post: Pedroski55
  Trying to Make Steganography Program Work For All Payload Types Stegosaurus 0 1,261 Sep-26-2024, 12:43 PM
Last Post: Stegosaurus
  how can you make a question have more than one awnser pentopdmj 2 900 Sep-22-2024, 05:04 PM
Last Post: Pedroski55
  How do I make functions "interact" with each other? Hudjefa 11 2,473 Sep-09-2024, 01:37 PM
Last Post: deanhystad
  How to make my Telegram bot stop working at 16:15 and not work on Fridays? hus73 2 1,478 Aug-10-2024, 12:06 PM
Last Post: hus73
  [pyparsing] How to make my simple parser fault tolerant medihack 0 922 May-14-2024, 04:52 PM
Last Post: medihack

Forum Jump:

User Panel Messages

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