Connect with us

ACADEMICS

OAU CSC 201 Practice Quiz

Published

on

/60
3 votes, 3.3 avg
569
Created by Oluwaferanmi Akinyele

OAU CSC 201 Practice Quiz

Welcome to the CSC 201 Exam Practice Quiz! All questions are from Sanfoundry.com and have been randomized for each attempt. The quiz will be updated regularly until the exam on Saturday. Use the Full Screen button at the top right for a better experience. Keep practicing, and good luck!

1 / 60

What will be the output of the following Python code?

i = 5
while True:
    if i%0O9 == 0:
        break
    print(i)
    i += 1

2 / 60

Application software includes the following except

3 / 60

What will be the output of the following Python code?

i = 0
while i < 5:
    print(i)
    i += 1
    if i == 3:
        break
else:
    print(0)

4 / 60

What are the values of the following Python expressions?

 2**(3**2)
 (2**3)**2
 2**3**2

 

5 / 60

Mathematical operations can be performed on a string.

6 / 60

Copy – The ______ is the brain of the computer that performs simple arithmetic & logical operations

7 / 60

What will be the output of the following Python code?

True = False
while True:
    print(True)
    break

8 / 60

The value of the expressions 4/(3*(2-1)) and 4/3*(2-1) is the same.

9 / 60

What will be the output of the following Python expression if x=56.236?

print("%.2f"%x)

10 / 60

Is Python code compiled or interpreted?

11 / 60

Who developed Python Programming Language?

12 / 60

What will be the output of the following Python code?

d = {0, 1, 2}
for x in d:
    print(x)

 

13 / 60

What will be the output of the following Python code?

'{0:f}, {1:2f}, {2:05.2f}'.format(1.23456, 1.23456, 1.23456)

 

14 / 60

What is the answer to this expression, 22 % 3 is?

15 / 60

What will be the output of the following Python expression?

~100?

16 / 60

What will be the output of the following Python code?

s='%s, %s & %s'
s%('mumbai', 'kolkata', 'delhi')

17 / 60

Which keyword is used to call a function in Python language?

18 / 60

What will be the value of X in the following Python expression?

X = 2+9*((3*12)-8)/10

19 / 60

What will be the output of the following Python expression?

int(1011)?

20 / 60

Which of the following is an invalid statement?

21 / 60

What will be the output of the following Python code?

t = '%(a)s, %(b)s, %(c)s'
t % dict(a='hello', b='world', c='universe')

22 / 60

What is the two’s complement of -44?

 

23 / 60

What is the output of print 0.1 + 0.2 == 0.3?

24 / 60

What will be the output of the following Python expression if X=345?

print(“%06d”%X)

25 / 60

What will be the output of the following Python code?

if (9 < 0) and (0 < -9):
    print("hello")
elif (9 > 0) or False:
    print("good")
else:
    print("bad")

 

26 / 60

What will be the output of the following Python code?

'%x %d' %(255, 255)

27 / 60

What will be the output of the following Python code?

i = 0
while i < 3:
    print(i)
    i += 1
else:
    print(0)

28 / 60

What will be the output of the following Python code?

for i in range(float('inf')):
    print (i)

29 / 60

Which of the following results in a SyntaxError?

30 / 60

Which of the following functions is a built-in function in python?

31 / 60

Which of the following expressions results in an error?

32 / 60

The output of the two codes shown below is the same.

i. '{0:.2f}'.format(1/3.0)
ii. '%.2f'%(1/3.0)

33 / 60

Which of the following is not a complex number?

34 / 60

What will be the output of the following Python expression?

24//6%3, 24//4//2

 

35 / 60

Which of the following is a feature of Python DocString?

36 / 60

What will be the output of the following Python code if a=10 and b =20?

a=10
b=20
a=a^b
b=a^b
a=a^b
print(a,b)

37 / 60

The expression 2**2**3 is evaluates as: (2**2)**3.

38 / 60

What will be the value of the following Python expression?

4 + 3 % 5

 

39 / 60

What does ~~~~~~5 evaluate to?
a) +5
b) -11
c) +11
d) -5

40 / 60

What will be the output of the following Python code?

i = 1
while True:
    if i%3 == 0:
        break
    print(i)
 
    i + = 1

 

41 / 60

Machines developed in mechanical era include the following except

42 / 60

What will be the output of the following Python code?

x = 123
for i in x:
    print(i)

 

43 / 60

The correct sequence of the history of modern era is

44 / 60

What will be the output of the following Python code?

'{0:.2f}'.format(1.234)

45 / 60

What will be the output of the following Python code snippet if x=1?

x<<2

 

46 / 60

Any odd number on being AND-ed with ________ always gives 1. Hint: Any even number on being AND-ed with this value always gives 0.
a) 10
b) 2
c) 1
d) 0

47 / 60

What will be the output of the following Python code?

def f(x):
    def f1(*args, **kwargs):
        print("*"* 5)
        x(*args, **kwargs)
        print("*"* 5)
    return f1
def a(x):
    def f1(*args, **kwargs):
        print("%"* 5)
        x(*args, **kwargs)
        print("%"* 5)
    return f1
@f
@a
def p(m):
    print(m)
p("hello")

48 / 60

What will be the output of the following Python code?

>>>list1 = [1, 3]
>>>list2 = list1
>>>list1[0] = 4
>>>print(list2)

49 / 60

What will be the output of the following Python code?

i = 1
while False:
    if i%2 == 0:
        break
    print(i)
    i += 2

 

Control does not enter the loop because of False.

50 / 60

Which of the following is used to define a block of code in Python language?

51 / 60

What will be the output of the following Python function?

def f(p, q):
	return p%q
f(0, 2)
f(2, 0)



                            

52 / 60

What will be the value of the following Python expression?

4+2**5//10

53 / 60

Given a function that does not return any value, What value is thrown by default when executed in shell.

54 / 60

What will be the output of the following Python code?

'{a}{b}{a}'.format(a='hello', b='world')

55 / 60

Operating Systems includes the following except

56 / 60

Python was created in what year

57 / 60

What is the order of precedence in python?

58 / 60

What will be the output of the following Python code?

'%s' %((1.23,),)

 

59 / 60

Which of the following expressions can be used to multiply a given number ‘a’ by 4?

8.

60 / 60

Which of the following is the correct extension of the Python file?

Your score is

The average score is 22%

0%


Discover more from 9jabaz

Subscribe to get the latest posts to your email.

Advertisement
Comments
Scroll Up

Discover more from 9jabaz

Subscribe now to keep reading and get access to the full archive.

Continue reading

..

9jabaz.