[Tutor] Invalid Syntax Error
Tyson Barber
tysonwbarber at gmail.com
Tue Oct 15 23:24:45 EDT 2019
Hello Python Help!
I am trying to make a video game selector for my friend since he never
knows what to play and I thought it would be interesting to give him a
little simple Python code! In the code however there is a syntax error
(highlighted in yellow) and I was wondering if it was because I had to
declare it as a string? I was taught that it was automatically declared as
a string so I do not know where I went wrong?
print ("Welcome to the Video Game Selector!")
print ("Please decide between fps, sports, rpg or battle royale!")
genre = input("Please enter your preferred genre of video games: ")
if result = ("fps"):
print ("Call of Duty MW, Battlefield V, Fallout 76, Gears of War 5")
elif result = ("sports"):
print ("NBA 2K20, NHL 20, Madden 20, FIFA 20")
elif result = ("rpg"):
print ("Skyrim, The Witcher, World of Warcraft")
elif result = ("battle royale"):
print = ("Fortnite, APEX Legends, PUBG")
else:
print = ("Sorry, that is not in the database.\n Try using a keyword!")
Thank you,
Tyson Barber
More information about the Tutor
mailing list