Professional Documents
Culture Documents
2023 Xi Ip Holiday HW
2023 Xi Ip Holiday HW
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
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.
Write a program that asks the user how many times they are buying and
print the total cost.
Part B-(for)
Q11.Write the script that displays the numbers divisible by 3 and 7 in the
range 100 to 600.
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.
______________________________________________________________________