← Back to all posts
Wok190

Hello, This is my edhesive question and the language is python. I am revieiving a error code for line 4.

import math
feet1=float(input("Enter the Feet for the first piece of fabric: "))
inches1=float(input("Enter the Inches for the first piece of fabric: "))
feet2=float(input("Enter the Feet for the second piece of fabric: "))
inches2=float(input("Enter the Inches for the second piece of fabric: "))
#Get the initial total amount of feet
initialFeet = feet1 + feet2
#Get the initial total amount of inches
initialInches = inches1 + inches2
#Get the remaining inches which is a modulus of 12 (12 inches in 1 foot)
remainingInches = initialInches % 12
#This total has to be divided by 12 and then have a floor done on it which will remove any decimal values
#The total feet will be the initial feet (feet1 and feet2) plus the additional calculated feet

print ("Total: Feet: " + str(totalFeet) + " Inches: " + str(remainingInches))

hotnewtop

Wumi4 (486)

First, can you show me what is the error? Second, please use Markdown for better looking post. Thanks.

JuanSanchez28 (0)

@Wumi4
Sorry this is my first time using this website. But i am actually not sure what is the problem. Edhesive is giving me a error saying
"Traceback (most recent call last):
File "./prog.py", line 4, in
EOFError: EOF when reading a line"
Im not sure what this means and cant figure out how to correct it.

Wumi4 (486)

@JuanSanchez28 It's because that Edhesive thing returns an EOF (end-of-file) to that input at line 4, so Python yells an error about that because it doesn't accept EOF on the input.

JuanSanchez28 (0)

@Wumi4 so what is supposed to be changed?

Wumi4 (486)

@JuanSanchez28 Just run it on your local machine, I guess.