Practice

  1. Write a program that asks for the number of credits a student has earned. The program should then print whether or not the student has graduated from Hendrix.
  2. Write a program that accepts the following information: The program should print the number of gallons of gasoline that is affordable. The program should print a separate message if either the price of gasoline or the money in the wallet is less than or equal to zero.

  3. Write a program that simulates a single coin flip, and prints "heads" half the time, and "tails" the other half of the time.
  4. Write a program that accepts the following information: The program should then print the names of all combinations of items that the purchaser can afford.