Python Forum

Full Version: question regarding user Inputs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Quick ones:

1) You have a type. The function names are case sensitive grams_ounces IS NOT Grams_ounces

2) lower needs to return something. All instances of lower MUST BE in the form lower(). With the way your code is written there are two infinite loops.

3) If you are using single quotes for text avoid using them for the text itself, unless they are preceded by \. This is a problem waiting to happen.

4) using quit to end your main function will not yield what you expect. You need to put the break so that is will break the loop and print a good_bye statement.

5) i would suggest you bring all the value statement out of the if/elif loop. This will save lines to your code.

Again, i am still fairly new to python so i can not comment on this much more. Although, using dictionaries would make this code so much shorter.
Pages: 1 2