Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
My code worked earlier today and in python, but I now get an EOF error
What is wrong with this coding for the first trial.py exercise? def add (first, second): first=int(input("First number? ")) second=int(input("Second number? ")) return first + second
def add (first, second): first=int(input("First number? ")) second=int(input("Second number? ")) return first + second
This question is misleading because it states that you have to solve the ValueLabel exception before the numbers are converted into floating point numbers. The correct answer does not correspond to the statement of the problem.
What happens in automated testing of your code is... your code is ran and a file with sample input is passed along. When the result matches the pre-calculated result, your code is accepted.
here you dont have to take the input from user. Just write the function and script will take care of it from its end.
def add (first, second): return first + second