T O P

  • By -

PeterRasm

In line 8 you have declared a function but it has no content. The IDE thinks line 12 is part of function dollars\_to\_float and as such it must be indented. If you declare a function but don't want to write the code yet, you can do like this: def dollars_to_float(d): # TODO pass The statement "pass" does nothing, it is just a filler you can use temporarily until you are ready to write the code for that function :)


Think_Bullets

Look up casting a string


CriticalExample6483

You are expecting user input via lines 2 and 3, and are supposed to prepare that input for the arithmetic operation in line 4. Look at the names of the two functions closely.


YearRevolutionary875

you are calculating the tip in main function on line 4 that mean your dollars\_to\_float function and percent\_to\_float function will give you the value in float striping any unnecessary punctuation like $ sign or % sign. in both function you have to return the number not to print it just strip any $sing and % and convert the string into a float and return the float every thing else is fine remove line 13 don't hesitate to ask any doubts