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

Which of the following is an invalid statement?

2 / 60

Select all options that print.

hello-how-are-you

 

3 / 60

‘Bit’ stands for

4 / 60

The following python program can work with ____ parameters.

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

 

5 / 60

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

6 / 60

Operating Systems includes the following except

7 / 60

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

8 / 60

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

x=3.3456789
'%-6.2f | %05.2f | %+06.1f' %(x, x, x)

 

9 / 60

What is the value of the following expression?

2+4.00, 2**4.0

 

10 / 60

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

x = 2
for i in range(x):
    x += 1
    print (x)

 

11 / 60

In the following Python code, which function is the decorator?

def mk(x):
    def mk1():
        print("Decorated")
        x()
    return mk1
def mk2():
    print("Ordinary")
p = mk(mk2)
p()

12 / 60

What will be the output of the following Python code?

['f', 't'][bool('spam')]

a) t
b) f
c) No output
d) Error

13 / 60

In flow charts, a terminal is represented with what shape

14 / 60

Mathematical operations can be performed on a string.

15 / 60

What will be the output of the following Python code?

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

 

16 / 60

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

x = 2
for i in range(x):
    x -= 2
    print (x)

17 / 60

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

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

 

18 / 60

Who developed Python Programming Language?

19 / 60

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

20 / 60

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

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

21 / 60

What will be the output of the following Python code?

True = False
while True:
    print(True)
    break

22 / 60

Which of the following will run without errors?

23 / 60

Which of the following results in a SyntaxError?

24 / 60

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

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

25 / 60

What will be the output of the following Python code?

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

 

26 / 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

 

27 / 60

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

  1. >>>grade1 = 80
  2. >>>grade2 = 90
  3. >>>average = (grade1 + grade2) / 2

28 / 60

What will be the output of the following Python code?

def f(x):
    def f1(a, b):
        print("hello")
        if b==0:
            print("NO")
            return
        return f(a, b)
    return f1
@f
def f(a, b):
    return a%b
f(4,0)

29 / 60

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

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

30 / 60

What will be the output of the following Python expression?

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

 

31 / 60

Which one of the following has the same precedence level?

32 / 60

Which of the following cannot be a variable?

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

 

34 / 60

Which among the following list of operators has the highest precedence?

“` +, -, **, %, /, <<, >>, |“`

35 / 60

Which of these in not a core data type?

36 / 60

The following are high-level languages except

37 / 60

Which of the following functions can help us to find the version of python that we are currently working on?

38 / 60

What will be the output of the following Python code?

x = 'abcd'
for i in x:
    print(i.upper())

39 / 60

What will be the output of the following Python code?

for i in range(2.0):
    print(i)

 

40 / 60

6. In python we do not specify types, it is directly interpreted by the compiler, so consider the following operation to be performed.

  1.  >>>x = 13 ? 2

objective is to make sure x has a integer value, select all that apply (python 3.xx)

41 / 60

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

bool(False)
bool()

I

   True 
   True
II
   False
   True

III

   False
   False

IV

   True
   False

Which of I-IV is correct?

42 / 60

What will be the output of the following Python expression if x=15 and y=12?

x & y

 

43 / 60

Which type of Programming does Python support?

44 / 60

Which of the following character is used to give single-line comments in Python?

45 / 60

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

46 / 60

What will be the output of the following Python code?

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

 

47 / 60

What is the two’s complement of -44?

 

48 / 60

What will be the output of the following Python expression?

0x35 | 0x75

49 / 60

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

x<<2

 

50 / 60

Machines developed in mechanical era include the following except

51 / 60

What will be the output of the following Python code?

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

 

52 / 60

What will be the value of the following Python expression?

float(4+int(2.39)%2)

 

53 / 60

The following python code can work with ____ parameters.

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

 

 

54 / 60

What will be the output of the following Python code?

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

 

55 / 60

Which among the following list of operators has the highest precedence?

 +, -, **, %, /, <<, >>, |

56 / 60

What will be the output of the following Python code?

'The {} side {1} {2}'.format('bright', 'of', 'life')

 

57 / 60

Which of the following is the use of id() function in python?

58 / 60

What will be the output of the following Python code?

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

59 / 60

Is Python code compiled or interpreted?

60 / 60

Which of the following expressions results in an error?

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.