
December 14th, 2012, 03:45 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 6
Time spent in forums: 1 h 58 m 52 sec
Reputation Power: 0
|
|
|
New to programming, completely lost.
Hi
Im new to python and programming in general, and I was given an assignment and I really have no clue on how to go about solving it.
Part 1) Write a program that accepts the date as mon/day/yr and validates it as a real date. ( 5/1/12 is a real date, but something like 2/31/12 is not) Then on top of that figure out what day of the year it is out of 365.
2)Write a program that computes the fuel efficiency of a multi-leg journey. The program will first prompt for the starting odometer reading and then get information about a series of legs. For each leg, the user enters the current odometer reading and the amount of gas used (separated by a comma). The program should print out the miles per gallon achieved on each leg and the total MPG for the trip, when the program is ended by a blank line
3)Modify the MPG program to get its input from a file.
If anyone could point me in the right direction it would be greatly appreciated, Im not looking for the answers or anything but just some assistance.
|