Join Our Whatsapp Channel
CBT TEST

CSC 201 CBT PRACTICE

Sorry it is coming late

CSC 201 CBT PRACTICE

1 / 40

What will be the output of the following Python code?

 def foo(i,  x=[]):     x. append(i)     return x for i in range(3):     print(foo(i))

2 / 40

What will be the output of the following Python code?

 def foo(k):     k = [1] q = [0] foo(q) print(q)

3 / 40

How are variable length arguments specified in the function heading?

4 / 40

Which module in the python standard library parses options received from the command line?

5 / 40

What is the type of sys.argv?

6 / 40

How many keyword arguments can be passed to a function in a single function call?

7 / 40

What will be the output of the following Python code?

 def foo(fname,  val):     print(fname(val)) foo(max, [1, 2, 3]) foo(min, [1, 2, 3]) 

8 / 40

What will be the output of the following Python code?

 def foo():     return total + 1  total = 0 print(foo())

9 / 40

What will be the output of the following Python code?

 def foo():     total += 1     return total total = 0 print(foo())

10 / 40

What will be the output of the following Python code?

 def foo(x):     x = ['def', 'abc/]     return id(x) q = ['abc', 'def/] print(id(q) == foo(q))

11 / 40

Actual instructions in flowcharting are represented in __________

12 / 40

There should be certain set standards on the amount of details that should be provided in a flowchart.

13 / 40

A detailed flowchart is called ______

14 / 40

Which of the following is not an advantage of a flowchart?

15 / 40

A flowchart that outlines the main segments of a program.

16 / 40

The symbol denotes _______

17 / 40

In computer science, algorithm refers to a pictorial representation of a flowchart.

18 / 40

The process of drawing a flowchart for an algorithm is called __________

19 / 40

Actual instructions in flowcharting are represented in __________

20 / 40

The following box denotes ?

21 / 40

When an algorithm is written in the form of a programming language, it becomes a _________

22 / 40

When an algorithm is written in the form of a programming language, it becomes a _________

23 / 40

A data structure that follows the FIFO principle.

24 / 40

A system wherein items are added from one and removed from the other end.

25 / 40

Another name for 1-D arrays.

26 / 40

The word ____________comes from the name of a Persian mathematician Abu Ja’far Mohammed ibn-i Musa al Khowarizmi.

27 / 40

In computer science, algorithm refers to a special method usable by a computer for the solution to a problem.

28 / 40

This characteristic often draws the line between what is feasible and what is impossible.

29 / 40

The time that depends on the input: an already sorted sequence that is easier to sort.

30 / 40

Which of the following is incorrect?
Algorithms can be represented as:

31 / 40

What will be the output of the following Python code?

 def find(a,  **b):     print(type(b)) find('letters', A='1', B='2') 

32 / 40

What is the type of each element in sys.argv?

33 / 40

34 / 40

What will be the output of the following Python code?

 def foo(k):     k[0] = 1 q = [0] foo(q) print(q)

35 / 40

36 / 40

What will be the output of the following Python code?

 a=10 b=20 def change():     global b     a=45     b=56 change() print(a) print(b)

37 / 40

What will be the output of the following Python code?

 def change(i = 1,  j = 2):     i = i + j     j = j + 1     print(i,  j) change(j = 1,  i = 2) 

38 / 40

What will be the output of the following Python code?

 def change(one,  *two):     print(type(two)) change(1, 2, 3, 4) 

39 / 40

If a function doesn’t have a return statement, which of the following does the function return?

40 / 40

What will be the output of the following Python code?

 def display(b,  n):     while n > 0:         print(b, end="")         n=n-1 display('z', 3) 

Your score is

The average score is 31%

0%

Phil

Phil aka Undergragra is a Computer Engineering Graduate at the Federal University Oye-Ekiti. He is a lover of God, a passionate teacher, writer and an educational consultant.
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

You cannot copy content of this page

0
Would love your thoughts, please comment.x
()
x