Connect with us

ACADEMICS

OAU CSC 201 Practice Quiz

Published

on

/60
3 votes, 3.3 avg
573
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 snippet?

for i in '':
    print (i)

2 / 60

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

3 / 60

Which type of Programming does Python support?

4 / 60

What will be the output of the following Python code?

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

5 / 60

Which of the following is an invalid statement?

6 / 60

Machines developed in transistor era include the following except

7 / 60

What will be the output of the following Python code?

x = 'abcd'
for i in range(len(x)):
    print(i)

 

8 / 60

The output of which of the codes shown below will be: “There are 4 blue birds.”?

 

9 / 60

Which of the following is true for variable names in Python?

10 / 60

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

11 / 60

What will be the output of the following Python code snippet?

X=”san-foundry”
print(“%56s”,X)

12 / 60

What will be the output of the following Python code?

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

13 / 60

Which is the correct operator for power(xy)?

14 / 60

What will be the output of the following Python code?

print("abc. DEF".capitalize())

15 / 60

Which of the following expressions involves coercion when evaluated in Python?

16 / 60

What will be the output of the following Python code snippet?

z=set('abc$de')
'a' in z

 

17 / 60

What will be the output of the following Python code?

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

 

18 / 60

What will be the output of the following Python code?

l=[1, 0, 2, 0, 'hello', '', []]
list(filter(bool, l))

19 / 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)

 

20 / 60

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

21 / 60

What will be the output of the following Python code snippet?

not(3>4)
not(1&1)

I

   True
   True

II

   True
   False

III

   False
   True

IV
   False
   False

Which of the answers from I - IV is correct?

22 / 60

Which of the following is not a complex number?

23 / 60

What will be the output of the following Python code?

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

24 / 60

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

25 / 60

Which of the following is an invalid variable?

26 / 60

What will be the output of the following Python code?

x = ['ab', 'cd']
for i in x:
    x.append(i.upper())
print(x)

27 / 60

Machines developed in mechanical era include the following except

28 / 60

What will be the output of the following Python code?

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

a) 1 2
b) 1 2 3
c) error
d) none of the mentioned

29 / 60

What will be the output of the following Python code snippet?

['hello', 'morning'][bool('')]

 

30 / 60

What will be the output of the following Python code?

print('*', "abcde".center(6), '*', sep='')

 

31 / 60

The one’s complement of 110010101 is:

32 / 60

What will be the output of the following Python code?

class Truth:
	pass
x=Truth()
bool(x)

33 / 60

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

print("-%06d"%X)

 

34 / 60

The outcome of a programming activity is a _________

35 / 60

The following python program can work with ____ parameters.

def f(x):
    def f1(*args, **kwargs):
           print("9jabaz")
           return x(*args, **kwargs)
    return f1

 

36 / 60

Which of the following is a Python tuple?

37 / 60

Which of the following is true for variable names in Python?

38 / 60

What will be the output of the following Python code snippet?

for i in 'abcd'[::-1]:
    print (i)

39 / 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)

40 / 60

All keywords in Python are in _________

41 / 60

What will be the value of the following Python expression?

 bin(10-2)+bin(12^4)

42 / 60

What will be the output of the following Python code?

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

43 / 60

Bitwise _________ gives 1 if either of the bits is 1 and 0 when both of the bits are 1.

44 / 60

What will be the output of the following Python code?

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

45 / 60

What will be the output of the following Python code?

l=list('HELLO')
p=l[0], l[-1], l[1:3]
'a={0}, b={1}, c={2}'.format(*p)

 

46 / 60

A ________ is a sequence of instructions telling the computer what to do.

47 / 60

What will be the output of the following Python statement?

  1. >>>"a"+bc

 

48 / 60

Operators with the same precedence are evaluated in which manner?

49 / 60

What will be the output of the following Python code?

d = {0: 'a', 1: 'b', 2: 'c'}
for x, y in d:
    print(x, y)
c

 

50 / 60

What will be the output of the following Python code snippet?

x = 'abcd'
for i in range(len(x)):
    print(x)
    x = 'a'

51 / 60

Which one of the following has the same precedence level?

52 / 60

What will be the output of the following Python code snippet?

x = 'abcd'
for i in range(len(x)):
    x = 'a'
    print(x)

53 / 60

What will be the output of the following Python function?

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



                            

54 / 60

What will be the output of the following Python code?

x = "abcdef"
i = "i"
while i in x:
    print(i, end=" ")

55 / 60

What will be the output of the following Python program?

z=set('abc')
z.add('san')
z.update(set(['p', 'q']))
z

 

56 / 60

What will be the output of the following Python code snippet?

X=”hi”
print(“05d”%X)

57 / 60

What is the average value of the following Python code snippet?

“`grade1 = 80“`

“`grade2 = 90“`

“`average = (grade1 + grade2) / 2“`

58 / 60

What arithmetic operators cannot be used with strings in Python?

59 / 60

What is the return value of trunc()?

60 / 60

Which type of Programming does Python support?

Your score is

The average score is 22%

0%


Discover more from 9jabaz

Subscribe to get the latest posts sent 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.