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.

Categories

+4 votes

Hi, I'm doing the first question and I am having trouble converting the input to a float? I am not sure how to get it correct.

asked in CSC201 Spring 2021 by (8 points)

1 Answer

+2 votes
 
Best answer

you can convert the input to a float with float(), but only if the user does not enter the empty string, "". So you'll want to get the input, then use an 'if not' statement to check for the empty string, and then convert in the if statement.

answered by (8 points)
selected by
+1

Thank you again Furby! :)

...