15/16 help


#1

Actually this is a bug in the web interface’s stdin. raw_input is not catching anything.

name = raw_input("What is your name?")
quest = raw_input("What is your quest?")
color = raw_input("What is your favorite color?")

print "Ah, so your name is %s, your quest is %s, and your favorite color is %s." % (name, quest, color)

also fails with this error:

What is your name?What is your quest?What is your favorite color?Ah, so your name is SCT, your quest is if type(error) == ValueError:, and your favorite color is return "Make sure to use a lowercase “s” with %s. Python told us about the following error: " + str(error).


15/16 Help
15/16 Help
#2

Yeah, you’ve gotta type something when prompted when you press “run”, or else it doesn’t work if you leave it empty.


#3

Please, try it by yourself. I can’t input anything, because just after I click ‘Run’ I got an Error :slight_smile:


#4

Also, some other lessons with input is broken:
Default code, just after ‘Run’:

def clinic():
    print "You've just entered the clinic!"
    print "Do you take the door on the left or the right?"
    answer = raw_input("Type left or right and hit 'Enter'.").lower()
    if answer == "left" or answer == "l":
        print "This is the Verbal Abuse Room, you heap of parrot droppings!"
    elif answer == "right" or answer == "r":
        print "Of course this is the Argument Room, I've told you that already!"
    else:
        print "You didn't pick left or right! Try again."
        clinic()

clinic()

stdout:

You’ve just entered the clinic!
Do you take the door on the left or the right?
Type left or right and hit ‘Enter’.You didn’t pick left or right! Try again.
You’ve just entered the clinic!
Do you take the door on the left or the right?
Type left or right and hit ‘Enter’.You didn’t pick left or right! Try again.
You’ve just entered the clinic!
Do you take the door on the left or the right?
Type left or right and hit ‘Enter’.You didn’t pick left or right! Try again.
You’ve just entered the clinic!
Do you take the door on the left or the right?
Type left or right and hit ‘Enter’.You didn’t pick left or right! Try again.
You’ve just entered the clinic!
Do you take the door on the left or the right?
Type left or right and hit ‘Enter’.


#5

Yes, I’ll look into the problem, just be patient. :slight_smile:


#6

Hmm. My problem is identical, furthermore I have the problem with identical lesson.

If you saw the console output you see that raw_input is never waiting for input (no newlines between “What is your name?”, “What is your quest?”, “What is your favorite color?”).
So, just after clicking the Run button you will get at error.

Anyway I just want to help figure out the problem.


#7

It appears that many of our users are experiencing problem/s in the Python course. We are looking into the issue. :slight_smile:


#8

figured out way to pass lesson (solution in link)


#9

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.