You are on page 1of 3

THE INDIAN COMMUNITY SCHOOL, KUWAIT

COMPUTER SCIENCE – SQP ( 1 TERM ) 2022

1 Write a program to input principle amount and time. If time is more than 10
years, calculate the simple interest with the rate 9%. Otherwise calculate
it with the rate 12%. Display principle amount, rate of interest, time and
simple interest.
2 Write a program to input monthly salary of an employee and calculate HRA as
10% of salary is salary is less than 5000. HRA is 12% of salary if the salary
is 5000 and above and less than 10000. HRA is 15% of salary if salary is
10000 and above. Display Salary, Hra and netpay where netpay is salary +Hra.

3 Write a program to solve quadratic equation of three sides of triangle.

4 Write a program to rearrange the given three numbers in ascending order.

5 Write a program to input three angles of a triangle. If the three inputs are
valid, then identify the type of triangle(Equilateral, Isosceles, Scalene
and Right-angle). If the input in wrong print error message.
6 Write a program to input two meter readings current month and previous month,
calculate consumed units and amount based on following conditions. Consumed
(cons)=cm-pm. If consumed reading is less than or equal to 50 the amount is
0. Next 100 units .40 paise per unit, next 150 units .60 paise per unit and
for the rest .90 paise per unit.
7 Write a program to input a character and check the character is in uppercase
or lowercase or special character or a digit.
8 Write a program to input the radius of a circle and calculate either AREA or
PEREMETER of a circle based on user’s choice.

9 Write a program to input a temperature and convert into either F to C or


C to F according to the user’s choice.

10 The program accepts name, marks and print the details along with the result.
name=input("Enter the name : ")
marks=float(input("Enter Marks : "))
if marks>=33:
print("Name : ",name)
print("Mark : ",marks)
print("Result : Pass")
else:
print("Name : ",name)
print("Mark : ",marks)
print("Result : Fail")
Reduce the statements.

11 name=input("Enter the name : ")


marks=float(input("Enter Marks : "))
if marks>=33:
print("Name : ",name)
print("Mark : ",marks)
print("Result : Pass")
else:
print("Name : ",name)
print("Mark : ",marks)
print("Result : Fail")
Correct the indentation.
1
THE INDIAN COMMUNITY SCHOOL, KUWAIT
COMPUTER SCIENCE – SQP ( 1 TERM ) 2022
12 The following program accepts 3 integers and print the largest number.
Correct the logical mistakes in the following:-

A=int(input(“Enter 1st Number”))


B=int(input(“Enter 2nd Number”))
C=int(input(“Enter 3rd Number”))
Hi=A
if B > Hi:
Hi=B
elif Hi > C:
Hi=C
print(“Largest = “,Hi)

13 Find the output of the following:-


input values(-245, 4, 99, and 1000 )

num=int(input("Enter an integer: "))


if num<0:
num*= -1;
if num>=0 and num<=9:
print("Single digit number")
elif num>=10 and num<=99:
print("Two digit number")
elif num<=999:
print("Three digit number")
else:
print("more than 3 digits")

14 Rewrite the following:-


a) #To display "Hello" 10 times. b) #To display first 10 natural nos.

for i in range(1, 10): for i in range (10):


print("Hello") print(i)

15 Rewrite the following after removing errors:-


a) #To print "INDIA" for 5 times. b) #To print sum of first 10 natural no.

for i in Range(1,6) for i in range (10):


print("INDIA") sum+=i
print(sum)

16 Find the output of the following program :-

c) Sum,n=0,6 d) a=4
for I in range(2,n): b=0
if n % I ==0: for c in range (a,a*a,a):
Sum+=I b+=c
print(Sum) print(a,b,c)

17 Write a program to print all the even numbers between given two numbers.

18 Write a program to print the first ‘n’ MERSENNE numbers (2i – 1) where i
varies from 1 to ‘n’. (1 3 7 15 31 63 . . . .)

2
THE INDIAN COMMUNITY SCHOOL, KUWAIT
COMPUTER SCIENCE – SQP ( 1 TERM ) 2022
19 Write a program to input an integer number and calculate the product of the
factors of the given number except 1 and same number.

20 Write a program find the sum of the following series.


Y2 + Y4 + Y6 + Y8 + upto to n terms. Accept Y and n in the program.

21 Write a program find the sum of the following series.


1- x2/3! + X4/5! - X6/7! upto to n terms. Accept X and n in the program

22 Write a program to input ‘n’ numbers and find the biggest no from the input.
n= 5 ( 45 , 65 , 36 , 75 , 25) big =75

23 Write a program to print the first n Fibonacci series terms.[0,1,1,2,3,5..]

24 Write a program to print all the prime number between two numbers.

25 Write a program to print the following shapes:-


1
12
123
1234
12345

26 Write a program find the sum of the following series.


1- x2/3! + X4/5! - X6/7! upto to n terms. Accept X and n in the program.

27 Write a program to check the given number is palindrome number or not.

You might also like