0% found this document useful (0 votes)
12 views5 pages

CS 11 Worksheet - 1

This document is a worksheet for Class XI Computer Science students at Delhi Public School, Ruby Park, Kolkata. It contains a series of objective and subjective questions related to problem-solving, algorithms, Python programming, and flowchart creation. Students are required to answer multiple-choice questions, write algorithms, and create flowcharts for various programming tasks.

Uploaded by

pratyays.notes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views5 pages

CS 11 Worksheet - 1

This document is a worksheet for Class XI Computer Science students at Delhi Public School, Ruby Park, Kolkata. It contains a series of objective and subjective questions related to problem-solving, algorithms, Python programming, and flowchart creation. Students are required to answer multiple-choice questions, write algorithms, and create flowcharts for various programming tasks.

Uploaded by

pratyays.notes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Delhi Public School, Ruby Park, Kolkata

WORKSHEET - 1
Class: XI Subject: Computer Science

Objective/Subjective Questions Credit Points : 130

1 What is the first step for problem solving using a computer?


a. Coding c. Testing
b. Developing an algorithm d. Analysing the problem
2 Which of the following is/are characteristic(s) of algorithm?
a. Precision c. Finiteness
b. Uniqueness d. All of these
3 The reason for drawing flowchart and making algorithms are used for
a. Better programming c. Efficient coding
b. For clarity d. All of the above
4 In which of the following programme methods an algorithm cannot be represented by
a. Pseudo codes c. Programs
b. Syntax d. flowcharts
5 In algorithm instructions are written in __________ approach.
a. Top to bottom c. Left to right
b. Bottom to top d. Right to left
6 The action performed by a _______ structure must eventually cause the loop to terminate.
a. Sequence c. Repetition
b. Case d. Process
7 Which of the following is/are advantages of Python?
a. Easy to use c. Portability
b. Object-oriented d. All of these
8 In complex number, a + j b , where b represents as
a. Real part c. Special part
b. Imaginary part d. None of these
9 Which of the following are sequence of character data?
a. Lists c. Strings
b. Tuples d. Dictionaries
10 The proper Python syntax for testing that value of A is between 2 and 9 inclusively is
a. 2 <= A <= 9 c. A >= 2 and A >= 9
b. 2 >= A and A <= 9 d. 2 <= A and A >= 9
11 Write the value stored in the variable ‘Num’ by each of the following statements
a. Num = 2 * 3 – 4 b. Num = 2 + 3 – 1 * 3
12 An algorithm for swapping of two numbers without using a third variable is written below:
Step 1: Read number x, y
Step 2: ______________
Step 3: y = x – y
Step 4: x = x – y
Step 5: Stop
Which of the following is the missing statement in Step 2 of the given algorithm?
a. x = x * y c. x = x + y
b. x = x / y d. x = x % y

Page 1 of 5
13 Mrs. Mohini wrote the following algorithm, she told the students to make flowchart for the
same.
Step 1: Start
Step 2: Input “Enter a number” N
Step 3: rem = N%5
Step 4: if rem = 0 then “N is divisible by 5”
End of program
Step 5: if rem != 0 then “N is not divisible by 5”
Step 6: Stop

(a) While drawing a flowchart which symbol will she use for step 1?
(i) Circle (iii) Rectangle
(ii) Oval (iv) rhombus

(b) In drawing a flowchart which symbol will she use for step 2?
(i) Parallelogram (iii) Rectangle
(ii) Oval (iv) Rhombus

(c) In drawing a flowchart which symbol will she use for step 3?
(i) Parallelogram (iii) Rectangle
(ii) Oval (iv) Rhombus

(d) In drawing a flowchart which symbol will she use for step 4?
(i) Circle (iii) Rectangle
(ii) Oval (iv) Rhombus

14 Which statement is correct expression for adding the remainder of 8 divided by 3 to the product
of 5 and 6?
a. 8 % 3 + 5 * 6 c. 8 // 3 + 6.5
b. 8 / 3 + 5 * 6 d. None of the above

15 Select all the options that prints hello-how-are-you


a. print(‘hello’,‘how’,‘are’,‘you’) d. print(‘hello’ + ‘-’ + ‘how’ + ‘-’ + ‘are’ + ‘-’
b. print(‘hello’,‘how’,‘are’,‘you’ + ‘-’ * 4) + ‘you’)
c. print(‘hello-’ +‘how-are-you’)

16 The output of bool (‘6-6’) and 5<8will be:


a. 0 c. True
b. None d. False

17 Find out the error(s) if any in the following expression:


F = a + bc + a*c
Also, write the correct expression.

18 Given is a pseudocode:
1. START
2. INPUT n
Page 2 of 5
3. SET result = 1
4. IF n == 0 OR n == 1 THEN
5. PRINT result
6. ELSE
7. FOR i FROM 1 TO n
8. result = result * i
9. END FOR
10. PRINT result
11. END IF
12. END
Draw the flowchart of this pseudocode.

19 Predict the output of the following code:


>>> 17+21//1**2 > 15+2**2//3

20 Find the syntax error(s), if any, in the following program:


a == 5
b = 6
sum = 0
print("A is :%d",a)
A is :%d 5
sum = sum + a
b = b * a
print("B is: d"%b)

21 What would be the output of the following code?


a = bool (‘ ’) or 10 < 25; print (a)

22 Differentiate between interactive mode and script mode in python.


23 Differentiate between these operators- a) /, // , % b) = and = =

24 Write the output for the following snippet:


a=10
print(a ** 2)
print(a *= 3)
print(a += 10)

25 What are the different types of token in python? Give example of each.

26 Predict the output of the following:


i)
x, y=7,2
x, y, x= x+1, y+3, x+10
print(x, y)

ii)
x=40
y=x+1
x=20, y+x
print(x, y)
Page 3 of 5
iii)
a,b=12,13
print(print(a+b))

iv)
a,b,c= 2,3,4
a,b,c= a*a, a*b, a*c
print(a,b,c)

v)
x,y = 10,20
x,y=y,x
print(x,y)

vi)
a,b,c=12,7.4,1
a - = b
print(a,b)
a*= 2 + c
print(a)
b+= a*c
print(b)

vii)
x,y,z= True, False, False
a= x or (y and z)
b= (x or y) and z
print(a,b)

viii)
w,x,y,z=True,4,-6,2
res= -(x+z) < y or x**z<10
print(res)

27 Write the type of the following tokens: True, sub_cost, //, 54.7, none, for, ‘string’,”123”
28 Find the valid and invalid identifiers: 1st_room,False,total marks, Hundred$, Break, length
29 What will be displayed by the following statements?
a) type (0) b) type(int(‘0’)) c) type(3/2) d) print(print(‘hello’))

e) print(4*3+4**3-4) f) print(type(1+3.0)) g) print(11+3)

h) print(‘11’+’3’) i) print(14//4,14%4,14/4) j) print(2**3**4)

k) print(7*8/5//2) l) print(5<10 and 10<5 or 3<18 and not 8<18)

Page 4 of 5
SUBJECTIVE QUESTIONS
Note: Write Code and at least one Output for each of the Programs given below:

1. Draw flowchart and write algorithm for the following problems:


i. To find the area and perimeter of a rectangle.
ii. To find the largest value among three values.
iii. To find the summation of all odd natural numbers up to N.
iv. To check a number is prime or not prime.
v. To find the factorial value of a number.
vi. To display multiplication table of a given number.
vii. To input marks of five subjects of a student and display total marks, percentage and grade
as follows: if percentage is greater than or equal to 90 then grade is A, if percentage is greater
than or equal to 70 then grade is B, if percentage is greater than or equal to 50 then grade is C, if
percentage is greater than or equal to 40 then grade is D, for less than 40 grade is F.

2. Write a program in python to input time in seconds and display the time after converting it into
hours, minutes and seconds.
Sample input: time in seconds 5420
output: 1 hour 30 minutes 20 seconds

3. Write a program in python to calculate and display area and circumference of a circle by taking
radius as input from user. (Area= π r2)
4. Write a python code to input the name and basic salary of an employee. Calculate and display the
name, gross salary and net salary of the employee when:
da= 30% of basic
hra=18% of basic
pf= 12.5% of basic
gross= basic + da + hra
net= gross-pf
5. Write a python code to input temperature in Fahrenheit and display the equivalent Celsius
temperature.
6. Write a python code to input length and breadth of rectangle and display area and perimeter of
the rectangle.
7. Write a python code to enter three sides of scalene triangle and calculate the area of the scalene
triangle by using the formula: area=√s(s-a)(s-b)(s-c) where s= (a+b+c)/2
8. Write a python code to interchange the values of two variables.
9. Write a python code to find average of three numbers.
10. Write a program to display simple interest by taking principal, rate and time as input.

Page 5 of 5

You might also like