Python Forum
question regarding user Inputs
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
question regarding user Inputs
#11
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to write a response if a user inputs a string horuscope42 3 2,221 Apr-29-2020, 03:39 PM
Last Post: deanhystad
  Perminantly saving user inputs + being able to retrieve it ThatOneGuyNoOneKnowsCodes 1 1,917 Oct-23-2019, 11:28 PM
Last Post: DT2000
  Trying to prompt user for 2 inputs on one line pythonprogrammer 2 2,497 Sep-15-2019, 04:41 PM
Last Post: snippsat
  user inputs in constructing a dictionary Exsul 3 3,698 Apr-10-2019, 12:25 PM
Last Post: ichabod801
  unit testing a method that asks two user inputs() in console gebel 0 2,141 Apr-03-2019, 07:59 PM
Last Post: gebel
  User input question linuxnoob 9 4,918 Jul-12-2018, 01:56 PM
Last Post: linuxnoob
  code that takes inputs for user name amounts etc and then sends custom message shaumyabrata 5 5,307 Feb-12-2017, 11:37 AM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020