0% found this document useful (0 votes)
5 views4 pages

Computer Science Revision Test Questions

Uploaded by

jjaya0092
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)
5 views4 pages

Computer Science Revision Test Questions

Uploaded by

jjaya0092
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

Subject: Computer-science

REVISION TEST- [ 2marks] - [Computer networks, function & modules, python Revision Tour]

[Link] the difference between webpage and website with examples of each.

[Link] is the difference between Packet Switching and Circuit Switching?

[Link] full form on given abbreviation(i) URL(ii) SMTP

4.(A) line="T-20 Cricket World Cup 2022"

x=line[::-1]

print(a[Link][::-1])

(B)

India={"Animal":"Tiger","Bird":"Peacock","Flag":"Tri-Color"}

India["Capital"]="New Delhi"

print([Link]())

[Link] the Python library module needed to be imported to invoke following functions:

a. floor ( )b. randomint ( )

[Link] has to complete her computer science assignment of demonstrating the use of if-else

statement. The code has some error(s). Rewrite the correct code underlining all the

corrections made.

marks = int(“enter marks”)

temperature = input(“enter temperature”)

if marks < 80 and temperature >= 40

print(“Not Good”)

else

print(“OK”)

[Link] a short note on web [Link] is work of TCP / IP explain.

[Link] the following terms:a. PAN b. HTML c. URL d. POP

[Link] the following expression.


a) 6 * 3 + 4**2 // 5 – 8 b) 10 > 5 and 7 > 12 or not 18 > 3

[Link] possible outputs(s) are expected to be displayed on screen at the time of execution of

the program from the following code. Select which option/s is/are correct import random

print([Link](15,25) , end=' ')

print((100) + [Link](15,25) , end = ' ' )

print((100) -[Link](15,25) , end = ' ' )

print((100) *[Link](15,25) )

(i) 15 122 84 2500 (ii) 21 120 76 1500

(iii) 105 107 105 1800 (iv) 110 105 105 1900

[Link] between web server and web browser. Write name of any two browsers.

[Link] the following terms with respect to Networking:

(i) MODEM (ii) WLL (iii) FTP (iv) TCP/IP

[Link] the following expression

5+2**6<9+2-16//8

[Link] of the following options will not result in an error when performed on types in

python where tp = (5,2,7,0,3) ?

(a) tp[1] = 22 (b) [Link](23) (c) tp1 = tp+tp*2 (d) [Link]()

[Link] the correct output of the code:

mystr = ‘Python programming is fun!’

mystr = [Link](‘pro’)

mystr=’$’.join(mystr)

(a) Python $programming is fun! (b) Python $pro$gramming is fun!

(c) Python$ pro$ gramming is fun!$ (d) P$ython $p$ro$gramming is $fun!

[Link] tp = (1,2,3,4,5,6). Which of the following two statements will give the same

output?

1. print(tp[:-1]) 2. print(tp[0:5]) 3. print(tp[0:4]) 4. print(tp[-4:])

(a) Statement 1 and 2 (b) Statement 2 and 4 (c) Statement 1 and 4

(d) Statement 1 and 3

[Link] will be the following expression be evaluated to in Python?

print(5*2-5//9+2.0+bool(100))

(a) 11.0 (b) 13.0 (c) 112.0 d) 100


[Link] the output of the Python code given below:

def change(A):

S=0

for I in range(len(A)//2):

S+=(A[i]*2)

return S

B = [10,11,12,30,32,34,35,38,40,2]

C = change(B)

print('Output is',C)

[Link] whether True or False:

“ The expression 2**2**3 is evaluated as (2**2)**3.

[Link] the following expression and identify the correct answer.

16 - (4 + 2) * 5 + 2**3 * 4

a. 54 b. 46 c. 18 d. 32

[Link] gets printed when the following code is executed?

names = [‘Hasan’,’Balwant’,’Sean’,’Dia’]

print(names[-1][-1])

(a) h (b) n (c) a (d) Dia

[Link] of the following in not a valid variable name in python?

(i) Peacock (ii) Pea Cock (iii) Peacock5 (iv) Peacock_

[Link] the following code is executed, what will be the output of the followingcode?

name="IlovemyCountry"

print(name[3:10])

[Link] the correct output of the following string operations

mystring = “Pynative”

stringList = [ “abc”, “Pynative”,”xyz”]

print(stringList[1] == mystring)

print(stringList[1] is mystring)

[Link] will be the output of the following Python code snippet?

D1={“John”:40 , “Peter” : 45}

D2= { “John”: 466, “Peter” : 45}


Print(D1>D2)

a) True b) False c) Error d) None

[Link] the following expressions:

10 > 5 and 7 > 12 or not 18 > 3 a) True b) False C) 25 D) 0

[Link] the following program and select the possible output(s) from options (i) to

(iv) following it. Also, write the maximum and the minimum values that can be

Assigned to variable Y.

import random

X= [Link]()

Y= [Link](0,4)

print(int(X),":",Y+int(X))

(i) 0 : 0 (ii) 1 : 6 (iii) 2 : 4 (iv) 0 : 3

[Link] True or False

The value of the expression 5/(6*(4-2)) and 5/6*(4-2) is the same

[Link] of the following is the data type of value, returned by input( ) method in

Python? (a ) Boolean (b) String (c) Int (d) Float

[Link] the given expression:

print(2**5+8//3*7-2)

Which of the following will be correct output if the given expression evaluated?

(a) 44 (b) 34(c) 42(d) 36

[Link] will be the output of the following Python code ?

T1= ( )

T2=T1 * 2

print(len(T2))

(A) 0 (B) 2 (C) 1 (D) Error

[Link] the output of following python code.

SS="PYTHON"

print( SS[:3:])

(A) THON (B) PYT (C) PYTH (D) HON

You might also like