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

Lab Manual

The document contains a series of Python programming exercises for Grade 10 students, focusing on sequential programming, format printing, and conditional statements. It includes tasks such as calculating averages, areas, and interest, as well as implementing user input and validation. Additionally, it features case study questions that require the application of programming concepts to solve practical problems.
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Lab Manual

The document contains a series of Python programming exercises for Grade 10 students, focusing on sequential programming, format printing, and conditional statements. It includes tasks such as calculating averages, areas, and interest, as well as implementing user input and validation. Additionally, it features case study questions that require the application of programming concepts to solve practical problems.
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Lab Exercise Book Grade 10 (Python Programming)

Sequential Programming (Page no 12-Page no 23)


**Q1**Write a Python program to take three numbersas input and print the average of the numbers.
**Q2:** Write a Python program that takes a radius as input and calculates the area and circumference of a circle. Print both results.
**Q3:** Write a Python program that takes two strings as input and prints them in reverse order.
**Q4:** Write a Python program to calculate the compound interest based on principal, rate, and time.
**Q5:** Write a Python program to find the perimeter and area of a triangle when given the lengths of its three sides.
**Q6:** Write a Python program to input the base and height of a triangle and compute the area.
**Q7:** Write a Python program that calculates and prints the volume of a cylinder given the radius and height.
**Q8:** Write a Python program that converts kilometers to miles.
**Q9:** Write a Python program to convert temperature in Celsius to Fahrenheit.
**Q10:** Write a Python program to calculate the simple interest for a loan amount.

Format Printing
**Q1:** Write a Python program that asks the user for their name and prints "Hello, [name], welcome!" using string formatting.
**Q2:** Write a Python program to display pi up to 4 decimal places using string formatting.
**Q3:** Write a Python program that displays the result of division of two numbers with 3 decimal points.
**Q4:** Write a Python program that prints the following formatted output using f-strings:
Name: John
Age: 25
Occupation: Developer
**Q5:** Write a Python program to display a table of squares and cubes of numbers from 1 to 10.

if , if..else, if..elif..else (Page 24-25)


**Q1:**Write a Python program that checks if a given number is positive, negative, or zero.
**Q2:**Write a Python program that checks if a number is divisible by 5 but not by 10.
**Q3**Write a Python program that checks whether a string entered by the user contains any vowels.
**Q4**Write a Python program that checks if the first digit of a number is greater than or equal to the last digit.
**Q5:**Write a Python program that checks if a given character is a digit , uppercase, lowecase or symbol.
Case Study related questions
**Q1:**Write a program that takes three numbers as input and finds the second largest number without using loops or sorting.
Use only conditional statements to determine the second largest.

**Q2:**A store offers different discounts based on the membership and the amount spent:
If a customer is a gold member, they receive a 20% discount on purchases over 1000.
If they are a silver member, they receive 15% discount on purchases over 750.
If they are a bronze member, they receive 10% discount on purchases over 500.
If the customer spends less than the required amount for their membership level, no discount applies.
Write a program to determine the discount for a customer based on their membership type and the total purchase amount.
(Use menu for membership selection)

**Q3:**Write a Python program that checks a given number and classifies it as:
"Positive Odd": If the number is odd and greater than zero.
"Positive Even": If the number is even and greater than zero.
"Negative Odd": If the number is odd and less than zero.
"Negative Even": If the number is even and less than zero.
"Zero": If the number is exactly zero.
**Q4:**Write a Python program to check if a given date is valid (in the format day/month/year). Consider:
A month should be between 1 and 12.
A day should be within the valid range for the given month (e.g., 31 for January, 28 for February, 30 for April, etc.).
Consider leap years (if the year is divisible by 4 and not 100, or divisible by 400, February has 29 days).
Input:Day, month, and year (three integers).
Output:"Valid Date" if the date is valid, otherwise "Invalid Date".

**Q5:**Design a simple Bank Account System in Python where users can perform various banking operations.
The system should allow for the following features:
Create an Account: Users should be able to create a bank account by specifying their name and an initial balance.
Deposit Money: Users should be able to deposit money into their bank account.
Withdraw Money: Users should be able to withdraw money from their account. The system should ensure the user cannot withdraw more
than their available balance.
Check Balance: Users should be able to check their current balance.
Exit the System: The user should be able to exit the system.

You might also like