130k views
5 votes
I'm working on an assignment for my computer science class (Edhesive) and when I run the code, there are no errors. But when I try to check it, it comes up with a Traceback error.

My code:

b = float(input("Enter Temperature: "))

Traceback (most recent call last):
File "./prog.py", line 7, in
EOFError: EOF when reading a line

1 Answer

1 vote

Answer:

The error is because you wrapped the input in float. First record the input and then modify it.

Step-by-step explanation:

b = input("enter temp:")

b = float(b)

User Nathaniel
by
4.0k points