Challenges


  1. Create a list of legal and illegal variable names. Describe why each is either legal or illegal. Next, create a list of "good" and "bad" legal variable names. Describe why each is either a good or bad choice for a variable name.

  2. Write a program that allows a user to enter his or her two favorite foods. The program should then print out the name of a new food by joining the original food names together.

  3. Write a Tipper program where the user enters a restaurant bill total. The program should then display two amounts: a 15 percent tip and a 20 percent tip.

  4. Write a Car Salesman program where the user enters the base price of a car. The program should add on a bunch of extra fees such as tax, license, dealer prep, and destination charge. Make tax and license a percent of the base price. The other fees should be set values. Display the actual price of the car once all the extras are applied.




Python Programming for the Absolute Beginner
Python Programming for the Absolute Beginner, 3rd Edition
ISBN: 1435455002
EAN: 2147483647
Year: 2003
Pages: 194

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net