need help creating simple program

Reply

Join Date: Oct 2006
Posts: 15
Reputation: irotsenmar is an unknown quantity at this point 
Solved Threads: 0
irotsenmar irotsenmar is offline Offline
Newbie Poster

need help creating simple program

 
0
  #1
Aug 1st, 2007
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.
Red Paladin - Information Technology Consulting
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 1,008
Reputation: woooee is a jewel in the rough woooee is a jewel in the rough woooee is a jewel in the rough 
Solved Threads: 285
woooee woooee is offline Offline
Veteran Poster

Re: need help creating simple program

 
0
  #2
Aug 1st, 2007
See this quote on the main page " We only give homework help to those who show effort"
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 23
Reputation: N317V is an unknown quantity at this point 
Solved Threads: 3
N317V's Avatar
N317V N317V is offline Offline
Newbie Poster

Re: need help creating simple program

 
0
  #3
Aug 2nd, 2007
In other words: what have you tried so far?
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 608
Reputation: jrcagle is on a distinguished road 
Solved Threads: 150
jrcagle jrcagle is offline Offline
Practically a Master Poster

Re: need help creating simple program

 
0
  #4
Aug 3rd, 2007
Yeah, the best approach is to post code (or even pseudo-code) and then we can refer to line numbers.

Technically, the objects 'calcMileage', 'range', and 'cost' in the car.py module will be functions rather than methods.

Anyways, show us what you got and we can go from there.

Jeff
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC