Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.


+3 votes

Hello, I have a question, so, routine practice 1, 1st question ,i am getting this error in moodle, but when i run it in thonny it works perfectly fine!

Traceback (most recent call last):
File "tester.python3", line 13, in


File "tester.python3", line 10, in main

circumference = float(input("Circumference: "))

File "tester.python3", line 3, in input

s = __saved_input__(prompt)

EOFError: EOF when reading a line

Testing was aborted due to error.
Your code must pass all tests to earn any marks. Try again.

asked ago in CSC201 Spring 2021 by (2.1k points)

2 Answers

+2 votes
Best answer

So,the problem is that you are supposed to calculate the circumference
You are asking the user to enter it, but if you KNOW the radius, then you can tell them what the circumference is
The error happens because Moodle only feeds ONE number (the radius) into your program
and your code asks for a second number, but Moodle doesn't type it in, because there is no second number to type in
So, you should change it to
circumference = (expression to calculate circumference)

This asnwer that i said was explained by Dr. Stonedahl, and all the credit goes to him!!

Thank you!

answered ago by (2.1k points)
selected ago by
+1 vote

Actually, you are supposed to calculate for the Routine Practice 4 1st question. So, as circumference is 2.pi.radius, give the statement to input radius and give the calculation for circumference.

circumference = round (math.piradius2, 2)
Don't forget to include round function in your program.

answered ago by (1.1k points)