Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
input variable choice
#4
print('Welcome to The Bronx')

choose = input('Will you fight for good or bad?: ')
good = "police academy"
bad = "corner lookout"
if choose == 'good':
print(good)
elif choose == 'bad':
print(bad)
else:
print('not an option')
Reply


Messages In This Thread
input variable choice - by MCL169 - Feb-19-2023, 06:54 PM
RE: input variable choice - by noisefloor - Feb-19-2023, 07:01 PM
RE: input variable choice - by MCL169 - Feb-19-2023, 08:08 PM
RE: input variable choice - by menator01 - Feb-19-2023, 07:05 PM
RE: input variable choice - by MCL169 - Feb-19-2023, 08:01 PM
RE: input variable choice - by deanhystad - Feb-19-2023, 08:55 PM
RE: input variable choice - by MCL169 - Feb-19-2023, 09:00 PM
RE: input variable choice - by MCL169 - Feb-19-2023, 08:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  combobox_callback(choice choice part of openfile name (kind of dependency) janeik 9 3,581 Sep-10-2023, 10:27 PM
Last Post: janeik
  How to include input as part of variable name Mark17 4 3,861 Oct-01-2021, 06:45 PM
Last Post: Mark17
  random.choice HELP samuelbachorik 4 3,317 Aug-18-2021, 03:24 PM
Last Post: naughtyCat
  ???: if "{choice}" in self._command BaiYouLing4 3 2,963 Aug-23-2020, 05:40 AM
Last Post: BaiYouLing4
  trying to input a variable using random.choice python63 9 5,138 Aug-13-2020, 05:37 PM
Last Post: python63
  Would like to input a date variable and determine whether it is within the time range harold 3 3,359 Jan-05-2019, 09:04 AM
Last Post: Gribouillis
  Mixed string,Integer input variable issue maderdash 2 3,486 Nov-06-2018, 09:46 AM
Last Post: snippsat
  Save User Input From LineEdit Box To Variable digitalmatic7 2 9,453 Nov-22-2017, 05:34 PM
Last Post: digitalmatic7
  input defines variable but it's not defined tozqo 5 10,105 Jun-05-2017, 02:45 AM
Last Post: tozqo
  Taking user input and storing that to a variable then storing that variable to a list jowalk 12 41,696 Mar-27-2017, 11:45 PM
Last Post: wavic

Forum Jump:

User Panel Messages

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