0% found this document useful (0 votes)
7 views3 pages

Practic

Uploaded by

tunahan5969
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

Practic

Uploaded by

tunahan5969
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

Simple Calculator
 Problem: Write a Python program that asks the user for two numbers and
then prints the sum, difference, product, and quotient of the two numbers.
 Input Example:
Enter first number: 10
Enter second number: 2
 Output Example:
Sum: 12
Difference: 8
Product: 20
Quotient: 5
2. Area of a Circle
 Problem: Write a Python program that asks the user for the radius of a
circle and then calculates and prints the area. Use the formula area = π *
r^2, where π = 3.14159.
 Input Example:
Enter radius: 5
 Output Example:
Area of the circle: 78.53975
3. Simple Interest Calculator
 Problem: Write a program to calculate the simple interest. The formula is
Simple Interest = (P * R * T) / 100, where P is the principal amount, R is the
rate of interest, and T is the time in years.
 Input Example:
Enter principal: 1000
Enter rate of interest: 5
Enter time in years: 3
 Output Example:
Simple Interest: 150
4. Temperature Converter
 Problem: Write a Python program that asks the user to enter a
temperature in Celsius and converts it to Fahrenheit. The formula is F = (C
* 9/5) + 32.
 Input Example:
Enter temperature in Celsius: 25
 Output Example:
Temperature in Fahrenheit: 77.0
5. Average of Three Numbers
 Problem: Write a Python program that asks the user to enter three
numbers, then calculates and prints the average of these numbers.
 Input Example:
Enter first number: 10
Enter second number: 20
Enter third number: 30
 Output Example:
Average: 20.0
6. Rectangle Perimeter and Area
 Problem: Write a Python program that asks the user to enter the length
and width of a rectangle, then calculates and prints the perimeter and
area.
 Input Example:
Enter length: 4
Enter width: 3
 Output Example:
Perimeter: 14
Area: 12
7. Minutes to Hours and Minutes
 Problem: Write a Python program that takes the number of minutes as
input from the user and converts it into hours and minutes.
 Input Example:
Enter total minutes: 130
 Output Example:
130 minutes is 2 hours and 10 minutes.
8. Even or Odd
 Problem: Write a Python program that asks the user to enter a number
and prints whether the number is even or odd.
 Input Example:
Enter a number: 7
 Output Example:
7 is an odd number.
9. Age in Days
 Problem: Write a Python program that asks the user for their age in years
and then calculates and prints their age in days (assuming 1 year = 365
days).
 Input Example:

Enter your age in years: 25


 Output Example:

You are 9125 days old.


10. Simple Tip Calculator
 Problem: Write a Python program that asks the user for the total bill
amount and the percentage they want to tip. Then, calculate and print the
tip amount and the total bill.
 Input Example:

Enter total bill amount: 100


Enter tip percentage: 15
 Output Example:

Tip amount: 15.0


Total bill with tip: 115.0

You might also like