| | |
need help creating simple program
![]() |
•
•
Join Date: Oct 2006
Posts: 15
Reputation:
Solved Threads: 0
Can someone assist me on creating this program? Thank you.
create a program that will allow you to calculate the following:
1) The average gas mileage of a car
2) The range of a given car
3) The cost of a given trip
1) Create a Car.py file that will include the following methods:
a. calcMileage(range,gasUsed)
b. range(range,gasUsed)
c. cost(tripLength,averageMPG,priceOfGas)
2) Create an EnterInfo.py file that will import the Car.py file and prompt the user to enter the information and perform the given task. This can be modeled from the previous assignment.
3) You will have to include try and exception blocks that will allow users to enter floats and handle any bad user input.
create a program that will allow you to calculate the following:
1) The average gas mileage of a car
2) The range of a given car
3) The cost of a given trip
1) Create a Car.py file that will include the following methods:
a. calcMileage(range,gasUsed)
b. range(range,gasUsed)
c. cost(tripLength,averageMPG,priceOfGas)
2) Create an EnterInfo.py file that will import the Car.py file and prompt the user to enter the information and perform the given task. This can be modeled from the previous assignment.
3) You will have to include try and exception blocks that will allow users to enter floats and handle any bad user input.
Red Paladin - Information Technology Consulting
![]() |
Similar Threads
- Creating Bruteforce Program (C++)
- Need advice & help with a very simple program (IT Professionals' Lounge)
- Erroneus outputs in string manipulation simple program (C++)
- I am a girl doing my 1st simple program (C)
- DrawHouse code help... (Java)
- DrawHouse Code Problem (Java)
Other Threads in the Python Forum
- Previous Thread: Adding user and mailbox in Active Directory
- Next Thread: Super and Subscript using wxPython
| Thread Tools | Search this Thread |
abrupt accessdenied anti apache application approximation argv array beginner book builtin calculator change converter countpasswordentry curved dan08 dictionaries dictionary dynamic edit enter examples file float format function gui homework import inches input java keyboard lapse launcher library line lines linux list lists loop microphone mouse movingimageswithpygame mysqlquery newb number numbers numeric output parameters parsing path phonebook plugin port prime programming progressbar projects py2exe pygame pyopengl python random recursion redirect remote reverse scrolledtext session simple software sprite statictext string strings syntax table terminal text textarea threading time tlapse trick tricks tuple tutorial twoup ubuntu unicode unit urllib urllib2 variable wordgame wxpython






