Can somebody tell me what's wrong wrong with my code? I don't understand
Larry Martell
larry.martell at gmail.com
Mon Nov 21 22:18:14 EST 2016
More information about the Python-list mailing list
Mon Nov 21 22:18:14 EST 2016
- Previous message (by thread): Can somebody tell me what's wrong wrong with my code? I don't understand
- Next message (by thread): Can somebody tell me what's wrong wrong with my code? I don't understand
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Nov 21, 2016 at 10:10 PM, <rmjbros3 at gmail.com> wrote: > Hi! This is my first post! I'm having trouble understanding my code. I get "SyntaxError:invalid syntax" on line 49. I'm trying to code a simple text-based rpg on repl.it. Thank you for reading. > > > > print("Welcome to Gladiator Game! Choose your character race, class, and starting equipment!") > > print('') > > print("Race selection: ") > > print('') > > print("(1) Orcs. Known for their very wide, robust physiques. They are the strongest of all the races in Polaris.") > > print('') > > print("(2) Elves. Thin and wiry. They are known for their amazing agility and hand-eye coordiation. They originate from the desert island of Angolia.") > > print('') > > print("(3) Silverbacks. A hairy, ape-like race from Nothern Polaris. Their metal fur provides them with much needed protection.") > > print('') > > print("(4) Pomongos. An amphibian race believed to inhabit the wet jungles of Central Polaris. Legends say they have highly corrosive spit...") > > print('') > > raceNum=int(input("Select your character's race by entering the corresponding number. Then press enter: ")) > > print('') > > while raceNum<1 or raceNum>4: > raceNum=int(input('Invalid input. Try again: ')) > > print('') > > if raceNum==1: > print("You're an orc, eh? I won't be sayin' anything mean about you...") > print('') > classNum=int(input("What's your profession big fella?")) > > elif raceNum==2: > print("I never liked you elven folk...Let's get on with this.") > print('') > classNum=int(input("What's your profession ? Do ye even have one ?")) > > elif raceNum==3: > print("Nice fur. I don't see too many of your kind 'round here. Maybe that's a good thing...") > print('') > classNum=int(input("What's your profession mate?") > > elif raceNum==4: #this line has an error for some reason > print("Your a 'Mongo eh? I thought you lads were extinct...Just keep your tongue in ya mouth and we'll get along fine mate.") > classNum=int(input("What's your profession?")) Hint: look on line 47
- Previous message (by thread): Can somebody tell me what's wrong wrong with my code? I don't understand
- Next message (by thread): Can somebody tell me what's wrong wrong with my code? I don't understand
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list