Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

CLASS XI- Python Programming

This document is a practical journal for Class XI Python programming for the academic year 2023-2024, authored by student Ishita Singh. It includes a comprehensive index of worksheets with various programming exercises covering simple programs, conditional statements, and flow control. Each worksheet contains multiple programming tasks aimed at reinforcing Python programming concepts.

Uploaded by

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

CLASS XI- Python Programming

This document is a practical journal for Class XI Python programming for the academic year 2023-2024, authored by student Ishita Singh. It includes a comprehensive index of worksheets with various programming exercises covering simple programs, conditional statements, and flow control. Each worksheet contains multiple programming tasks aimed at reinforcing Python programming concepts.

Uploaded by

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

CLASS XI- Python programming

practical journal : 2023-2024


Student name : ISHITA SINGH
Class & sec : 11-A
roll no. : 8

INDEX
WORKSHEET 1: SIMPLE PROGRAMS
1. WAP to assign your name and class to the variables name and grade respectively.
Display the result in the given format

Name :<your name> Class :<your class>

2. WAP to assign the value 10 to the variable price, double the value of the variable
price , decrease the value by 5 and print it.

3. WAP to accept a username and print “Welcome” + username


4.WAP to accept a number and print its square and cube.
5. WAP to accept the radius of a circle and display the diameter, area and
perimeter. [2r, pr2 and 2pr]

6. WAP to find the area of a triangle. [½ (l*b)]


7. WAP to swap the values of two numbers

8. Input 3 numbers. Calculate total and Average.


9. WAP to convert the given time in minutes into hours and minutes.(E.g. : 90 min
= 1 Hr 30 min)

10. WAP to accept the length in inches and convert it to centimeters. (one inch =
2.54 cm)
11. WAP to input the radius and calculate area and volume of a sphere.

12. Assume 1 cubic foot = 7.481 gallons. WAP to ask the user to enter the number
of gallons and display it in cubic feet.

13. Input basic salary. Calculate allowance as 12% of basic salary and deduction
as 10% of basic salary. Calculate net salary by using the formula net salary=basic
+allowance – deduction
14. Input amount in paise. Convert to equivalent Rupees and paise.

15. Input value in meters. Convert to equivalent meters and kilometers.


16. Input value in seconds. Calculate equivalent hours , minutes and seconds

17. WAP to accept a 2 digit number and display the sum of its digits. (e.g. for 57
the display should be 12)
18. WAP to accept temperature in celsius and convert it to fahrenheit.

19. WAP to input 3 numbers and swap them as 1st number becomes 2nd, 2nd the
3rd and 3rd as the 1st.
WORKSHEET 2: IF/IF-ELSE/IF-ELIF

1. Write a program to accept a 4 digit number and display if it is a leap year.

2. Write a program to accept the 2 sides of a rectangle and display if its area
is greater than its perimeter.
3. Write a program to print the largest of three numbers.

4. Write a program to accept the sales amount and display the net amount
according to the following discount table.
5. Write a program to accept two numbers and an operator and display the
answer according to the specified operator (+, - , *, /, %).
6. Write a program to accept the day number from the user and display the
entrance fee for a theme park. Accept the number of tickets and display the
total amount to be paid.

7. Write a program to accept the Physics, Chemistry and Mathematics marks


of a student and display the grade accordingly.
8. WAP that accepts 3 integers representing date (14, 6, 19) and prints the
date in the format 14th June 2019.

9. Write a program to calculate and print roots of a quadratic equation


ax2+bx+c=0.(hint :the roots depend on value d which is equal to b2-4ac, if
d>0, the roots are r1=-b+sqrt(d)/2a and r2=-b-sqrt(d)/2a, if d=0 then the r1=-
b/2a otherwise if d<0 then imaginary roots)
10. WAP to create a menu as shown below and perform the various
operations based on users response

MAIN MENU-------------------------------------------------

Area of a Triangle

Area of a Square

Area of a Circle

Exit
11. WAP to print whether a given input is an uppercase, or a lowercase
character or a digit or any other character.

12. Write a program to get date in three variables dd, mm, yy to accept the
date, month and the year in the century format. Write code to check the
validity of the date.

13. Accept three numbers. Find the sum and the sum of non duplicate
numbers(Eg: sum of 3, 3, 6=12; Sum of Non duplicate numbers of 3, 3, 6=6)
14. Write the code to find the largest and second largest from accepted three
numbers.

15. Accept the country name(India or UAE).Accept a day also. Display Holiday
Sunday and Saturday for India & Friday and Saturday for UAE.
WORKSHEET 3: Flow of control

1. Write a program to print “Computer Science” 10 times.

2. WAP to print first N natural numbers.

2. WAP to print all odd and even numbers between 1 and n. Accept n from
user
3. WAP to print the even numbers in reverse between 100 and n.

4. WAP to print the sum of 1st N natural numbers. Accept N from user
5. WAP to accept any 10 numbers and display their sum.

6. WAP to display the series 1 4 7 10 13 16 …. n.


7. WAP to print the Fibonacci series accepting the number of terms from the
user. (first two terms of the series should be 0 and 1)

8. WAP to print the series: 1 + X2 + X4 + + …………………Xn

9. Write a menu driven program to do the following operations:

- To find factorial of a number


- To print multiplication table of a number

- To print divisors of a number

- To check if a number is prime or not

10. Accept n1 and n2 from the user. Write a menu driven program to do the following
operations :

- Print sum of all numbers between n1 and n2


- Print sum of all even numbers between n1 and n2

- Print sum of all odd numbers between n1 and n2

11. WAP to find the HCF of two numbers


12. WAP to find the lcm of two given no.s

13. WAP to find the smallest and the second smallest numbers inputted.

You might also like