I Can't Solve an Error in Python Code

Jul 4, 2016 10:17 PM
636032420472586840.jpg

So i was going to try make some virtual discussion with ice skate seller to see my python knowledge.. All I can say is that i have been learning it for a week but i did not have time to really get in to it. Anyhow... here is the code so if you can help me find out why do I have a error. Actually it is not an error, it doesn't say it is an error it just doesn't run the if command, try it yourself to see what I am talking about.

code:

print("Hello, welcome to the skate arena!")

question_1 = "skatenum"

yes = True

no = False

skatenum = input("Whould you like to purchase skates? (yes/no) --> ")

if skatenum == True:

x = "skates"

skates = int(input("How much of them would you like? One pair is $2.99 (1, 2, 3)"))

if skates == 1:

print("Ok, that is $3")

elif skates == 2:

print("Ok, that is $6")

elif skates == 3:

print("Ok, that is $9")

elif skates > 3:

print("Sorry, we do not give out that number of pairs")

else:

print("Please get out of Arena.")

elif skatenum == False:

print("Ok, then please sit down on tribune")

636032420472586840.jpg

This is an output. It should load the if statements but it doesn't... Please help

Just updated your iPhone? You'll find new Apple Intelligence capabilities, sudoku puzzles, Camera Control enhancements, volume control limits, layered Voice Memo recordings, and other useful features. Find out what's new and changed on your iPhone with the iOS 18.2 update.

Comments

No Comments Exist

Be the first, drop a comment!