Python Python Basics Types and Branching If, Else and Elif

Kristian Vrgoc
Kristian Vrgoc
3,046 Points

file "<stdin>", line 1

Hello,

I tipped in everything as the coach and got this answer:

File "<stdin>", line 1 python hello.py

Whats wrong?

Thanks in Advance

Kris

2 Answers

Bas Dekker
Bas Dekker
1,001 Points

Hi Eric, I had this problem as well, then I realized I was still in the python interpreter. I typed:

exit()

then at the workspace prompt:

python hello.py

and it worked properly.

Bas

Thank you very much. I really appreciate it!

I have the same problem. This is my code:

first_name = input("What is your first name? ") print("Hello,",first_name) if first_name == "Eric": print(first_name, "is learning Python") print("Have a great day {}!".format(first_name))

Eric Yim i have check your code there is no error shows me

          first_name = input("What is your first name? ") 
print("Hello,",first_name) 
if first_name == "Eric":
    print(first_name, "is learning Python")
    print("Have a great day {}!".format(first_name))