Sorry it is coming late
Home/CBT TEST/CSC 201 CBT PRACTICE CBT TESTCSC 201 CBT PRACTICE Phil Follow on Twitter Send an email May 2, 20240 80 Less than a minute Sorry it is coming late CSC 201 CBT PRACTICE 1 / 40What 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)) [0] [1] [2] [0] [0, 1] [0, 1, 2] [1] [2] [3] [1] [1, 2] [1, 2, 3] 2 / 40What will be the output of the following Python code? def foo(k): k = [1] q = [0] foo(q) print(q) [0] [1] [1, 0] [0, 1] 3 / 40How are variable length arguments specified in the function heading? one star followed by a valid identifier one underscore followed by a valid identifier two stars followed by a valid identifier two underscores followed by a valid identifier 4 / 40Which module in the python standard library parses options received from the command line? getopt os getarg main 5 / 40What is the type of sys.argv? set list tuple string 6 / 40How many keyword arguments can be passed to a function in a single function call? Zero One Zero or more One or more 7 / 40What 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]) 3 1 1 3 Error None of the mentioned 8 / 40What will be the output of the following Python code? def foo(): return total + 1 total = 0 print(foo()) 0 1 Error None of the mentioned 9 / 40What will be the output of the following Python code? def foo(): total += 1 return total total = 0 print(foo()) 1 0 Error None of the options 10 / 40What 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)) True False 11 / 40Actual instructions in flowcharting are represented in __________ Rectangle Diamond Circle Paralleogram 12 / 40There should be certain set standards on the amount of details that should be provided in a flowchart. True False 13 / 40A detailed flowchart is called ______ Stack Macro Micro Union 14 / 40Which of the following is not an advantage of a flowchart? Better communication Effective coding Systematic testing Improper documentation 15 / 40A flowchart that outlines the main segments of a program. Queue Micro Macro Union 16 / 40The symbol denotes _______ I/O Flow Terminal Decision 17 / 40In computer science, algorithm refers to a pictorial representation of a flowchart. True False 18 / 40The process of drawing a flowchart for an algorithm is called __________ Performance Evaluation Algorithmic representation Flowcharting 19 / 40Actual instructions in flowcharting are represented in __________ Circles Arrows Boxes Lines 20 / 40The following box denotes ? Decision Initiation Initialization I/O 21 / 40When an algorithm is written in the form of a programming language, it becomes a _________ Flow chart Program Pseudo Code Syntax 22 / 40When an algorithm is written in the form of a programming language, it becomes a _________ True False 23 / 40A data structure that follows the FIFO principle. Queue Stack LL Union 24 / 40A system wherein items are added from one and removed from the other end. Stack Queue Array Linked List 25 / 40Another name for 1-D arrays. Linear Arrays Vertical Arrays Horizontal Arrays Lists 26 / 40The word ____________comes from the name of a Persian mathematician Abu Ja’far Mohammed ibn-i Musa al Khowarizmi. Flowchart Flow Algorithm Syntax 27 / 40In computer science, algorithm refers to a special method usable by a computer for the solution to a problem. True False 28 / 40This characteristic often draws the line between what is feasible and what is impossible. Performance System Evaluation Modularity Reliability 29 / 40The time that depends on the input: an already sorted sequence that is easier to sort. Process Evaluation Running Input 30 / 40Which of the following is incorrect?Algorithms can be represented as: Syntax Pseudo codes Programs Flow charts 31 / 40What will be the output of the following Python code? def find(a, **b): print(type(b)) find('letters', A='1', B='2') String Tuple Dictionary An exception is thrown because of conflicting values 32 / 40What is the type of each element in sys.argv? set list tuple string 33 / 40What is the length of sys.argv? number of arguments number of arguments + 1 number of arguments - 1 none of the mentioned 34 / 40What will be the output of the following Python code? def foo(k): k[0] = 1 q = [0] foo(q) print(q) 0 1 1,0 0,1 35 / 40How are keyword arguments specified in the function heading? two underscores followed by a valid identifier two stars followed by a valid identifier one underscore followed by a valid identifier one-star followed by a valid identifier 36 / 40What 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) 10, 56 45, 56 10, 20 Syntax Error 37 / 40What 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) An exception is thrown because of conflicting values 12 33 32 38 / 40What will be the output of the following Python code? def change(one, *two): print(type(two)) change(1, 2, 3, 4) Integer Tuple Dictionary An exception is thrown 39 / 40If a function doesn’t have a return statement, which of the following does the function return? Int Null None An exception is thrown without the return statement 40 / 40What 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) zzz zz An infinite loop An exception is executed Your score isThe average score is 31% 0% Restart quiz Related posts:FUOYE PHY 101 CBT TEST EXAM MODESOC 101 CBT TEST TYPE AFUOYE MTH 102 CBT PRACTICE TESTFSS 101 CBT PRACTICE Phil Follow on Twitter Send an email May 2, 20240 80 Less than a minute Share Facebook Twitter LinkedIn Tumblr Pinterest Reddit VKontakte Odnoklassniki Pocket Share via Email Print