Python Forum
Trouble Setting a Variable True basing on an Imput
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trouble Setting a Variable True basing on an Imput
#1
Hello guys!

I am currently working in a Little test again, which at one step requires an imput, simple, right? Well I have two variables, a OwnerMale and OwnerFemale, which are both set in False when you execute the .py

My question is this one: Can I make my program have a list of Names which when you write them down in imput, the program searches for the list of names and basing on the name sets OwnerMale or OwnerFemale as true? And if this is posible, could I also include a question calling for confirmation if the name is female and basing on "Yes" or "No" set the OwnerMale and OwnerFemale accordingly? Thank you.

Here's my code


if Male == True and IsMale == True:
    print("My Name has been set, i'm Programmed a Male Bot, what is your name?")
    OwnerName = input("Write your name.")
Reply


Messages In This Thread
Trouble Setting a Variable True basing on an Imput - by VictorVictus - Aug-02-2019, 01:18 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trouble with threading and reading variable from a different script Lembas 14 3,008 Apr-26-2023, 11:21 PM
Last Post: Lembas
  Returning True or False vs. True or None trevorkavanaugh 6 9,231 Apr-04-2019, 08:42 AM
Last Post: DeaD_EyE
  setting pythonpath variable in environment variables saisankalpj 3 3,456 Dec-05-2018, 10:33 PM
Last Post: Gribouillis
  Having trouble defining variable tannishpage 6 5,608 Mar-23-2017, 01:04 PM
Last Post: Ofnuts
  How to turn variable true and false using function? hsunteik 5 6,484 Feb-20-2017, 11:44 AM
Last Post: hsunteik

Forum Jump:

User Panel Messages

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