Question: 2. Write a program that reads in a string and prints whether it: contains only letters. contains only uppercase letters. contains only lowercase letters. contains
2. Write a program that reads in a string and prints whether it: contains only letters. contains only uppercase letters. contains only lowercase letters. contains only digits. contains only letters and digits. *starts with an uppercase letter. *ends with a period. Write a program that reads three numbers and prints "all the same" if they are all the same, "all different" if they are all different, and neither" otherwise. 4. Write a program that asks the user to input: The number of gallons of gas in the tank The fuel efficiency in miles per gallon The price of gas per gallon Then print the cost per 100 miles and how far the car can go with the gas in the tank. Test and Correct and the following program: Grade = 99 if Grade>=90 print("A") if Grade 80 print("B" if Grade >-70 print("C" if Grade >=60 print("D") else print("Failed") 44
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
