Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

CLASS : XI (2023-2024) INFORMATICS PRACTICES

Lab Record Questions(Python Q1-Q20)

Part A-(if else statement/if elif statement/nested if statement)

Q1. Write the script to input three numbers, display the minimum number
of the three numbers entered.

Q2. Write the script to input rollno, name, class_div of the student marks of
five subjects ,calculate total marks, percentage and grade .Calculate the
grade based on the following criteria:

Percentage grade

91-100 A+

81-90 A

71-80 B

61-70 C

51-60 D

<51 E

Sample output is given:


Q3.Write a Python script to input employee code, employee name,and
basic salary and calculate the following :-

a) house rent-40% of basic salary


b) Perks – 80% of basic salary
c) City allowance- 25 % of basic salary
d) Gross salary=basic salary + house rent +Perks + city allowance
e) PF=(10% of gross salary if gross salary >10000 else PF is 12 % of
Gross salary )
f) IT=(15% of gross salary if gross salary >12000 else IT is 10% of gross
Salary )
g) Net salary = gross salary-PF deduction –IT deduction .

Sample run of script may give output as shown:

Q4. Write a Python script to display a menu for calculating area of a


circle, perimeter of circle, perimeter of rectangle, area of
rectangle,perimeter of square,area of square.

Sample run of script may give output as shown:


Q5. write a Python script to input two numbers and an operator and prints
the computed result based on the operator entered.

Q6. A store charges 150/- per item if you buy less than 5 items.

If you buy between 6 and 50 items, the cost is 125/- per item.

If you buy 50 or more items, the cost is 100/- per item.

Write a program that asks the user how many times they are buying and
print the total cost.

Part B-(for)

Q7. Write the script to print 50 stars in a line.

Q8.Write the script to print first 25 even numbers.

Q9.Write the script to print the numbers from 1 -100.

Q10.Write the script to print the numbers from 200 – 10.

Q11.Write the script that displays the numbers divisible by 3 and 7 in the
range 100 to 600.

Q12.Write the script to input a number and prints multiplication table of a


given number

Q13.Write the script to print first ten numbers and their sum.

Q14. Write the script to input a number and print its divisors.

Q15. A.

Write the script to print first ten numbers of the following series.

1,8,27,64,….

Q15. B.

Write the script to print first ten numbers of the following series.

1,3,7,15,….

Q15. C.

Write the script to print first 10 numbers of the fibanocci series 0,1,
1,2,3,5,8,13,21,34…
Part C-(while loop)

Q16. Write the script to input a single digit number and print its factorial.

Q17. Write the script to input a four digit number , and print the sum of its
digits.

Q18. A. Write the script to input a three digit number and whether is it an
Armstrong number or not.

Q18. B .Write the script to input a number and print whether is it a perfect
number or not.

Q19. Write the script to input a four digit number and print whether is it a
palindrome or not.

Q20. Write the script to input a single digit number and print its factorial.

______________________________________________________________________

You might also like