0% found this document useful (0 votes)
38 views

Python Application Questions

The document contains 10 Python programming questions that involve tasks such as: 1) Reading a date from the user and calculating remaining days in the month. 2) Checking if one number is fully divisible by another. 3) Calculating the average temperature over a week by collecting temperatures each day. 4) Finding prime numbers between 15 and 25. 5) Checking if a string is a palindrome.

Uploaded by

Matthias Oladele
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Python Application Questions

The document contains 10 Python programming questions that involve tasks such as: 1) Reading a date from the user and calculating remaining days in the month. 2) Checking if one number is fully divisible by another. 3) Calculating the average temperature over a week by collecting temperatures each day. 4) Finding prime numbers between 15 and 25. 5) Checking if a string is a palindrome.

Uploaded by

Matthias Oladele
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

PYTHON APPLICATION QUESTIONS

1. Write a program to read todays date (only date Part) from user. Then display how many days are left in
the current month.
2. Write a program to take two numbers and check that the first number is fully divisible by second number
or not.
3. Write a program to take the temperatures of all 7 days of the week and displays the average temperature
of that week.
4. Write a program that searches for prime numbers from 15 through 25.
5. Write a program to check the given string is palindrome or not.
6. Write a program that calculates the total amount of a meal purchased at a restaurant. The program should
ask the user to enter the charge for the food, and then calculate the amount of a 15 percent tip and 7
percent sales tax. Display each of these amounts and the total.
7. Write a program that calculates and displays a person’s body mass index (BMI). The BMI is often used to
determine whether a person is overweight or underweight for his or her height. A person’s BMI is
calculated with the following formula:
BMI = weight × 703 / height2
where weight is measured in pounds and height is measured in inches.
The program should also display a message indicating whether the person has optimal weight, is
underweight, or is overweight. A person’s weight is considered to be optimal if his or her BMI is between
18.5 and 25. If the BMI is less than 18.5, the person is considered to be underweight. If the BMI value is
greater than 25, the person is considered to be overweight.
8. There are three seating categories at a stadium. For a softball game, Class A seats cost $15, Class B seats
cost $12, and Class C seats cost $9. Write a program that asks how many tickets for each class of seats
were sold, and then displays the amount of income generated from ticket sales.
9. Write a program that uses nested loops to collect data and calculate the average rainfall over a period of
years. The program should first ask for the number of years. The outer loop will iterate once for each
year. The inner loop will iterate twelve times, once for each month. Each iteration of the inner loop will
ask the user for the inches of rainfall for that month. After all iterations, the program should display the
number of months, the total inches of rainfall, and the average rainfall per month for the entire period.
10. Write a program that creates a dictionary containing the Nigerian states as keys and their capitals as
values. The program should then randomly quiz the user by displaying the name of a state and asking the
user to enter that state’s capital. The program should keep a count of the number of correct and incorrect
responses.

You might also like