Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genetic Databases

Authors: Martin J. Bishop

1st Edition

0121016250, 978-0121016258

More Books

Students also viewed these Databases questions

Question

Analyze the impact of mergers and acquisitions on employees.

Answered: 1 week ago

Question

3. How would this philosophy fit in your organization?

Answered: 1 week ago

Question

3. What information do participants need?

Answered: 1 week ago