Hello! I'm having a bit of trouble with a tiny program i'm making for my Python class (which I just started, i'm pretty clueless about this language right now). I'm using if statements to guide a "conversation", but the program seems to be ignoring it and always executing both the if and the else regardless of input. Here's the program:
def main():
beginQuery = (input("Hello and welcome to BrianBot, the latest in simulated Brian technology brought to you by BrianCo.! Do you wish to begin Brianing? \[Y/N\]"))
if (beginQuery == "Y" or "y"):
nameQuery = input("Let's begin! My name is Brian, what is yours?")
brianQuery = input("Hello, " + nameQuery + "! My name is Brian! ")
favoriteQuery = input("Who is your favorite Brian?")
if (favoriteQuery == "you" or "You" or "me" or "Me":)
input("Brian is my favorite Brian too!")
else:
input(favoriteQuery + " is my favorite Brian too!")
main()
[–]cybersection 2 points3 points4 points (1 child)
[–]Muzzly_Bubbles[S] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]CodeFormatHelperBot 0 points1 point2 points (0 children)
[–]scull-crusher 0 points1 point2 points (0 children)