Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Computer Science – Python Revision Tour, Exams of Computer science

Computer Science – Python Revision Tour – 331 Multiple Choice Questions with Answers – 150 Assertion & Reasoning Type Questions with Answers – 160 True or False Type Questions with Answers – 244 Pages - Very Helpful for Students and Teachers

Typology: Exams

2024/2025

Available from 09/02/2024

kbzone1973
kbzone1973 🇮🇳

143 documents

1 / 244

Toggle sidebar

Related documents


Partial preview of the text

Download Computer Science – Python Revision Tour and more Exams Computer science in PDF only on Docsity! Name of the Chapter - Python Revision Tour Question No Question Content Learning Objective (if Provided) 1. Full Form of IDLE A. INDUSTRIAL DEVELOPMENT LEARNING ENVIRONMENT B. INTEGRATE DRIVE LEARNING ENVIRONMENT C. INTEGRATED DEVELOPMENT LEARNING ENVIRONMENT D. INTEGRATED DEVELOPMENT LEARNING ENGINEERING Knowledge 2. Python is ……………….language A. High level language B. Low level language C. Medium level language D. Machine language Knowledge 3. Which statement is correct A. Python is Upper case sensitive B. Python is Case-Sensitive C. Python is Lower case sensitive D. Python is Case-Insensitive Understanding 4. Which statement is correct A. It is free language B. It is open source language Knowledge C. It is free and open source language D. None of the above 5. Tick the correct statement to print hello. A. print(hello) B. print(“hello”) C. Print(“hello”) D. Print(hello) Application 6. Python programs are executed by which language processor? A. Compiler B. Interpreter C. Assembler D. All of the above Knowledge 7. Which of the statement is correct? A. Python is not portable and platform independent. B. Python is portable and platform dependent. C. Python is portable and platform independent. D. Python is not portable and platform dependent. Understanding 8. Which of the following is not high level programming language? A. JAVA B. Visual basic C. Python D. Machine language Analysis 17 Question:Which of the following is not the feature of python language? (A) Python is proprietary software. (B)Python is not case-sensitive. (C)Python uses brackets for blocks and nested blocks. (D)All of the above Understanding, 18 Question:By default, the Python scripts are saved with ____________ extension. (A) .pyp (B).pys (C).py (D)None of the above Understanding, 19 Question:Which of the following is String literal? (A) “ABC” (B)“123” (C)Both of the above (D)None of the above Understanding 20 Question:print(“I” + “am” + “in” + “school”) display (A) I am in school (B)I Am In School (C)Iaminschool (D)iaminschool Application 21 Question:print(“I” , “am” , “in” , “school”) display (A) I am in school (B)I Am In School (C)Iaminschool (D)iaminschool Application 22 Question:Which of the following is parameter of print( ) function? (A) sep (B) end (C) Both of the above Evaluation (D) None of the above 23 Question:The process of removing errors from programs is called __ (A) Programming (B)Documentation (C)Debugging (D)None of the above Understanding, 24 Question:IDLE stands for __________ (A) Integrated Development LEarning (B)Integrated Development Learning Environment (C)Intelligent Development Learning Environment (D)None of the above Knowledge, 25 Question:Which of the following statement is correct syntactically? (A) print(“Hello” , sep == ‘@’ , end = ‘ ‘) (B)print(“Hello” , sep = ‘@’ , end = ‘ ‘) (C)Print(“Hello” , sep = ‘@’ , end = ‘ ‘) (D)print(“Hello” , sep = ‘@’ , end = ‘ ‘ Application 26 Question:Who developed the Python language? (A) Zim Den (B)Wick van Rossum (C)Guido Van Rossum (D)NieneStom Knowledge, 27 Question:In which year was the Python language developed? (A) 1990 (B)1989 (C)1971 (D)1975 Knowledge, 28 Question:Which of the following is an escape sequence for a newline character? (A) \a Application (B) \t (C) \n (D) \b 29 Question:Which of the following functions print the output to the console? (A) Output( ) (B)Print( ) (C)Echo( ) (D)print( ) Knowledge, 30 Question:The default separator character of print( ) is ………. (A) tab (B)space (C)newline (D)dot Understanding 31 Which of the following is correct about python? a. Python is an open source language. b. Python is not based on ABC language. c. Python is not a case sensitive d. All of the above Knowledge 38 What is the output after executing the following code: Print(“Hello World!”) a. >>>Hello World! b. Hello World c. Hello World! d. Error Evaluation 39 What is the result after executing the following: >>>print(20/4 *5+8-10) a. 1 b. 23 c. 23.0 d. 24 Evaluation 40 What will be the output of the following code ? print(“150+300”) (i) 450 (ii) 150300 (iii) 150+300 (iv) 300 Evaluation 41 What do we use to define a block of code in Python language? 1. Key 2. Brackets 3. Indentation 4. None of these Analysis 42 Python interpreter executes ……………………….statement (Command) at a time. 1. Two 2. Three 3. One 4. All command Analysis 43 Which one is not the feature of Python- 1. Cross-platform 2. Interpreted 3. Free and Open source 4. Not a case-sensitive Understanding 44 A program written in a high-level language is called ……………… 1. Compile code 2. Object code 3. Source code 4. Binary Code Understanding 45 IDLE stands for a. Integrated Development or Learning Environment b. Integrated Development and Learning Environment c. Integrate Development and Learning Environment d. Integrated Development and Learned Environment Analysis 46 What is the maximum possible length of an identifier in python? (A) 16 (B) 32 (C) 64 (D) None of these Knowledge 47 Which of the following is not a keyword in python? (A) eval (B) assert (C) nonlocal (D) pass Knowledge 54 Which of the characters is used in python to make a single line comment? (A) / (B) // (C) # (D) ! Knowledge 55 Which of the following is not a core data type in python? (A) List (B) Dictionary (C) Tuple (D) Class Knowledge 56 What data type is the object listed below? L=[1,3,”Hello”,5] (A) List (B) Tuple (C) Class (D) Dictionary Analysis 57 Which one of these is the floor division operator? (A) / (B) // (C) % (D) * Knowledge 58 Which of the following has the highest precedence in python? (A) Exponential (B) Additin (C) Parenthesis (D) Division Knowledge 59 What will be the output of the following statement? >>>a+bc (A) a (B) b (C) ab (D) abc Analysis 60 What is math.factorial(4.0)? (A) 20 (B) 24 (C) 16 (D) 64 Evaluation 61 Which of the following belongs to integer datatype A) -12 B) 4.0 C) 3+4J D) -2.05 Knowledge 62 Which of the following belongs to float datatype A) -12 B) -14.0 C) 3+4J D) 4 Knowledge 69 _________ is an unordered collection of items separated by commas and the items are enclosed in curly brackets { } A) LIST B) SETS C) STRING D) TUPLE Application 70 None is a special data type with a single value. It is used to signify the absence of value in a situation A) TRUE B) FALSE C) NONE D) NULL knowlegde 71 Datatype conversion can happen : A) ONLY EXPLICITY B) ONLY IMPLICITY C) BOTH EXPLICITLY AND IMPLICITLY D) NONE OF THE ABOVE Understanding 72 Which of the following is mutable datatype: A) INTEGER B) FLOAT C) STRING D) LIST Analysis 73 Which of the following is immutable A) LIST B) DICTIONARY C) STRING D)NONE OF THE ABOVE Analysis 74 A list can contain the following: A) ONLY NUMBERS B) ONLY STRINGS C) BOTH NUMBERS AND STRING D)ONLY INTEGERS Application 75 String is a group of characters. These characters may be A) ALPHABETS, B) DIGITS C) SPECIAL CHARACTERS INCLUDING SPACES. D) ALL OF THE ABOVE Application 76 Numbers = [ 4, 8, 9, 2.6, 5 ] is a type of which data type in python? A. List B. Tuple C. Set D. None of these Application 77 If x=3.123, then int(x) will give ? A. 3.1 B. 0 C. 1 D. 3 Evaluation 82 Consider the following sequence of statements : A=100 B=A Following the execution of above statements, python has created how many objects and how many references? A. One object Two reference B. One object One reference C. Two object Two reference D. Two object One reference Application 83 What data type is the object below? L = {1:”One”,2:”Two”} A. list B. dictionary C. array D. tuple Knowledge 84 Find Example of sequence datatype. A. List B. Tuple C. Both of them D. None of them Application 85 Which of these about a dictionary is false? A. The values of a dictionary can be accessed using keys B. The keys of a dictionary can be accessed using values C. Dictionaries aren’t ordered D. Dictionaries are mutable Knowledge 86 Can tuple be used as dictionary key in python? A. True B. False C. Tuple is not used in python D. None of the above Understanding 87 Which statement is correct? A. List is immutable && Tuple is mutable B. List is mutable && Tuple is immutable C. Both are Mutable. D. Both are Immutable Understanding 88 Which of the following option is a core data type in the python language? A. Dictionary B. List C. String D. d. All of the above Knowledge 89 In order to store values in terms of key and value we use that core data type in python? A. List B. Class C. Dictionary D. Tuple Knowledge 96 Find output of following given program : str1_ = "Aeiou" str2_ = "Machine learning has no alternative" for i in str1_: if i not in str2_: print(i,end='') a) Au b) ou c) Syntax Error d) value Error Application 97 Which of the following operator can not be used with string value a) - b) is c) + d) * Knowledge 98 Find output for following given program a=10 b=20 c=1 print(a !=b and not c) a) 10 b) 20 c) True d) False Analysis 99 Find output for following given program : a=2 b=3 print( a*b**2) a) 18 b) 16 c) 64 d)12 Understandin g 100 Observe the presence of operator * in following program and predict the output: list1=[10,20] list2=[2,3] list1= list1*list2[0] print(list1) a) Error b)[20,40] c)[10,10,20,20] d)[10, 20, 10, 20] Analysis 101 Find output for following given code a=12 print(not(a>=0 and a<=10)) a) True b) False c) 0 d)1 Evaluation 102 Evaluate expression in following given program and find the output : a=56 b=a//7//4 print(b) a. 0 b. 2 c. 0.0 d. 2.0 Evaluation 103 What output following program will produce a=12 b=a%10 c=a%100 print(b,c) A) 2 12 B) 12 2 C) 0 0 D) Error Understandin g 104 What will be value of diff c1='A' c2='a' diff= ord(c1)-ord(c2) print(diff) a) Error : unsupported operator ‘-’ b) 32 c)-32 d)0 Application 113 What is the output of the following statements: A=5 B=6 print(A,B) (A )5 6 (B) 5,6 (C) 5 6 (D) none of the above Creation 114 What is the value of the expression 32% 3.0? (A) 2 (B) 2.0 (C) 10.6666 (D) 10 Evaluation 115 What is the output of the expression print(4.00/(2.0+2.0))? (A) 1 (B) 1.0 (C) Error (D) 1.00 Understanding 116 What is the output of the following: print(“Hello\nWorld”) (A) Hello World (B) Hello World (C) Hello World (D) None of the Above Application 117 Which of the following is an example of type casting? (A) 3.2+5.3 (B) 2.0+5 (C) int(4.7)+3 (D) all of the above Understanding 118 What is the output of the following? S1=”my” S2=”string” print (int(s1+s2)) (A) my string (B) mystring (C) 2563859 (D) Error Creation 119 What is the output of the following? print(“Python “, end= “ “) print(“world”) (A) Python world (B) Python world (C) Python end world (D) Python end world Creation 120 Evaluate the expression 6*2/5+5*2 (A) 2.4 (B) 2 (C) 12.4 (D) 12 Evaluation 121 Which of the following defines SyntaxError? a) It is raised when the file specified in a program statement cannot be opened. b) It is raised when there is an error in the syntax of the Python code. c) It is raised when the requested module definition is not found. d) It is raised due to incorrect indentation in the program code. Understanding 126 Which of the following defines EOFError? a) It is raised when the file specified in a program statement cannot be opened. b) It is raised when there is an error in the syntax of the Python code. c) It is raised when a built-in method or operation receives an argument that has the right data type but mismatched or inappropriate values. d) It is raised when the end of file condition is reached without reading any data by input(). Understanding 127 It is raised when the denominator in a division operation is zero. a) IndexError b) IndentationError c) ZeroDivisionError d) TypeError Understanding 128 It is raised when the index or subscript in a sequence is out of range. a) IndexError b) IndentationError c) ZeroDivisionError d) TypeError Understanding 129 It is raised when a local or global variable name is not defined. a) IndexError b) IndentationError c) ZeroDivisionError d) NameError Understanding 130 It is raised due to incorrect indentation in the program code. a) IndexError b) IndentationError c) ZeroDivisionError d) NameError Understanding 131 It is raised when an operator is supplied with a value of incorrect data type. a) IndexError b) TypeError c) ZeroDivisionError d) NameError Understanding 132 It is raised when the result of a calculation exceeds the maximum limit for numeric data type. a) OverFlowError b) TypeError c) ZeroDivisionError d) NameError Understanding 133 ZeroDivisionError is a type of: a) SyntaxError b) Logical Error c) Runtime Error d) Other Understanding 134 IndentationError is a type of: a) SyntaxError b) Logical Error c) Runtime Error d) Other Understanding 135 KeyboardInterrupt is a type of: a) SyntaxError b) Logical Error c) Runtime Error d) Other Understanding 140 The for loop in Python is an _____________ a. Entry Controlled Loop b. Exit Controlled Loop c. Both of the above d. None of the above Knowledge, Understanding 141 The ………….statement terminates the execution of the whole loop. a. continue b. exit c. breake d. break Knowledge, Understanding 142 An empty /null statement in Python is ……………. a. pass b. none c. null d. none Knowledge, Understanding 143 The ……….. operator tests if a given value is contained in a sequence or not. a. In: b in c. not in d. none Knowledge, Understanding 144 The order of statement execution in the form of top to bottom is known as ___________________________construct. a. alternate b.sequence c.flow of data d. flow chart Knowledge, Understanding 145 What will be the output of given Python code? str1="hello" c=0 for x in str1: if(x!="l"): c=c+1 else: pass print(c) a. 2 b. 0 c. 4 d. 3 Knowledge Application Evaluation 150 To access a list which contains ten elements, which of the following uses of range() would produce a list of the desired indexes? a. range(1,10) b. range(0,9) c. range(10) d. range(1,11) Knowledge Application Evaluation 151 Which statement is used to iterate itself over a range of values or a sequence (A) if (B) while (C) do-while (D) for Knowledge 152 What abandons the current iteration of the loop? (A) continue (B) break (C) stop (D) infinite Understanding 153 Which of the following is not a loop statement in python? (A) do-while (B) while (C) for (D) all of these Knowledge, 154 Which of the following is a valid keyword? (A) IF (B) if (C) If (D) None of them Knowledge, 155 Symbol used to end the if statement is: (A) ; (B) : (C) _ (D) # Understanding 156 A graphical representation of an algorithm to solve a given problem: (A) Flow chart (B) Pie Chart (C) Bar chart (D) Column Chart Knowledge, 157 Which of the following is not a decision making statement? (A) if-elif (B) for (C) if-else (D) if Understanding 158 A loopthat never ends is called as (A) infinite loop (B) continue (C) break loop (D) none of them Application 159 Find the output of the following: if True: print(101) else: print(202) (A) 101 (B) 202 (C) 303 (D) 102 Application 167 Can we write if/else into one line in Python? (A) No (B) Yes (C) if/else not used in Python (D) None of the above. Analysis 168 What keyword would you use to add an alternative condition to an if statement? (A) else if (B) elseif (C) elif (D) None of the above Knowledge 169 Which one of the following is a valid Python if statement? (A) if a>=9: (B) if (a>=9) (C) if (a=>9) (D) if a>=9 Analysis 170 Which statement will check if a is equal to b? (A) if a=b: (B) if a==b: (C) if a===b: (D) if a==b Analysis 171 What does the following source code print? if 4+5 == 10: print (“True”) else: print (“False”) print (“True”) (A) True (B) True False (C) False True (D) True False True Evaluation 172 What does the following source code print? x = -100 if x < 100: print (“The negative number”,x,”is not print here”) print (“It is always printed”) (A) It is always printed (B) The negative number -100 is not print here It is always printed (C) The negative number -100 is not print here (D) It will cause an error. Evaluation 176 What does the following Python program display? x=3 if x = = 0: print (“Am I here?”,end=’ ’) elif x = = 3: print (“Or here?”, end=’ ‘) else: pass print(“Or over here?”) (A) Am I here ? (B) Am I here ? Or here ? (C) Or here ? Or over here? (D) Am I here ? Or over here? Evaluation 177 Which of the following is a pictorial representation of an algorithm? (A) Pseudocode (B) Program (C) Flowchart (D) Algorithm Knowledge 178 Terminal symbol in a flowchart indicates: (A) End (B) Processing (C) Input and Output (D) Decision Analysis 179 In flowchart, diamond shaped symbol is used to represent: (A) Decision box (B) Statement box (C) Error box (D) if-statement box Understanding 180 Symbol used in flowchart such as rectangle with the horizontal lines on two sides is used for: (A) Defined statement (B) Predefined process (C) Error fix (D) Variables defined Analysis 181 What is the result of executing the following code? number = 5 while number <= 5: if number < 5: number = number + 1 print(number) A. The program will loop indefinitely B. The value of number will be printed exactly 1 time C. The while loop will never get executed D. The value of number will be printed exactly 5 times Knowledge and application of while loop 184 What is the last thing printed when the following code is run? number = 0 while number <= 10: print("Number: ", number) number = number + 1 A. Number: 10 B. Number: number C. Number: 0 D. Number: 11 Knowledge and application of while loop 185 How many asterisks will be printed when the following code executes? for x in [0, 1, 2, 3]: for y in [0, 1, 2, 3, 4]: print('*') A. 0 B. 4 C. 20 D. This is an infinite loop, so nothing will be printed Knowledge and application of nested loop 186 The following code contains an infinite loop. Which is the best explanation for why the loop does not terminate? n = 10 answer = 1 while n > 0: answer = answer + n n = n + 1 print(answer) A. n starts at 10 and is incremented by 1 each time through the loop, so it will always be positive. B. answer starts at 1 and is incremented by n each time, so it will always be positive. C. You cannot compare n to 0 in the while loop. You must compare it to another variable. D. In the while loop body, we must set n to False, and this code does not do that. Knowledge and application of while loop 190 Which of the following will print five rows with five ‘*’ in each row? 1. for i in range(0,5): print("*" * i) 2. for i in range(0,5): print("*" * 5) 3. for i range(1,5): print("*" * i) 4. for i in range(1,5): print("*" * 5) A. 1. B. 2. C. 3. D. 4. Knowledge and application of range() 191 What will the following code print? for i in range(1,4): for j in range(1,4): print(i, j, end=' ') A. 1 1 2 2 3 3 B. 1 2 3 1 2 3 1 2 3 C. 1 1 1 2 1 3 2 1 2 2 2 3 3 1 3 2 3 3 D. 1 1 2 1 3 1 2 1 2 2 2 3 3 1 3 2 3 3 Knowledge and application of nested for loop 192 What will be the output of the following Python code? for i in range(0,2,-1): print("Hello") A. Hello B. Hello Hello C. No Output D. Error Knowledge and application of for loop 193 Which of the following is a valid for loop in Python? A. for(i=0; i < n; i++) B. for i in range(0,5): C. for i in range(0,5) D. for i in range(5) Knowledge and application of for loop 194 When does the else statement written after loop executes? A. When break statement is executed in the loop B. When loop condition becomes false C. Else statement is always executed D. None of the above else Statements and it’s use 195 Flowchart and Algorithms are used for A. Better Programming B. Easy Testing and Debugging C. Efficient Coding D. All Knowledge and application of Flowchart 200 What will be the output of the following Python code? i = 0 sum = 0 while i < 9: if i%4 == 0: sum = sum + i i = i + 2 print(sum) (A) Infinite Loop (B) 12 (C) 14 (D) 10 Knowledge 201 Which of the following is considered as an infinite loop? (A) while(infinite): (B) while(1): (C) while(False): (D) while(not True): Understanding 202 What is the result of executing the following code? count = 10 while count <= 10: if count < 10: Count = count + 1 print(count) (A) The value of count will be printed exactly one(1) time. (B) The while loop will never be executed. (C) The program will run indefinitely. (D) The value of count will be printed exactly nine(9) times. Application 203 When does the else statement written after the for loop execute? (A) When a break statement is executed in the loop (B) else statement is always executed (C) When loop condition becomes false (D) When a continue statement is executed in the loop Understanding 204 Which of the following symbols is used to represent decision making in flowcharts? (A) (B) (C) (D) Knowledge 205 What will be the output of the following Python code? num = 0 for num in range(6): num = num + 1 if num == 3: continue print(num, end=“ ”) (A) 1 2 3 4 5 6 (B) 0 1 2 4 5 (C) 1 2 4 5 6 (D) 0 1 2 3 4 5 Application 208 X wants to allow the program to repeatedly ask the user to enter their Choice if it does not equal the Answer. Which loop option should X use? (A) while Choice = Answer: Choice = input() (B) while Choice != Answer: Choice = input() (C) while Choice =! Answer: Choice = input() (D) while Choice == Answer: Choice = input() Application 209 Which of the following loops is not supported by the python programming language? (A) for loop (B) while loop (C) do…...while loop (D) None of the above Knowledge 210 How would you create a loop to iterate over the contents of the list given as monthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] and print out each element? (A) for days in range(monthDays): print(days) (B) for days in monthDays: print(days) (C) for days in range(len(monthDays)): print(days) (D) for days in monthDays: print(monthDays) Application 211 What will be the result of the following command:- >>>"i love python".capitalize() (A) 'I Love Python' (B) 'I love python' (C) 'I LOVE PYTHON' (D) None of the above Applying 212 The following string function returns True if the characters in the strings are: >>>str.isalnum() (A) alphabets only (B) numbers only (C) alphabet and number only (D) Alphabet and Space Only Analysing 213 What will be the output of the following command: >>>string= "A quick fox jump over a lazy fox" >>>string.find("fox",9,34) (A) 28 (B) 29 (C) 8 (D) 7 Evaluating 219 Function “string.islower()” is used to :- (A) To find the first lower case character in the string (B) To check whether string is in lower case of not (C) To convert the string into lower case. (D) Display the strings lowercase character only Understanding 220 String function rstrip( ) matches from (A) Left to right (B) Both from right and left (C) Right to left (D) Matches from anywhere Understanding 221 What will be the output of the following Code: >>>"India is my Country. I love my Country India".replace("Country","India") (A) India is my Country. I love my Country India". (B) Country is my Country. I love my Country Country (C)'India is my India. I love my India India' (D) ERROR Understanding 222 The return type of string.split() is a (A) string (B) List (C) Tuple (D) Dictionary Analysing 223 Write the correct code for the following output:- Output: 'W$O$R$L$D' (A) >>>str="$" >>>str.join("WORLD") (B) >>>str="$" >>> join("WORLD",’$’) (C) >>> "$" = str >>> join("WORLD",’$’) (D) >>>str="$" >>> join("WORLD").str Applying 224 The return type of x in the below code is txt = "I could eat bananas all day" x = txt.partition("bananas") (A) string (B) List (C) Tuple (D) Dictionary Understanding 225 The number of element return from the partition function is >>>“I love to study python”.partition("study") (A) 1 (B) 3 (C) 4 (D) 5 Analysing 226 Which of the following commands will create a list? a) list1 = list() b) list1 = [] c) list1 = list([1, 2, 3]) d) all of the above Knowledge 233 What is the output when following code is executed ? >>>names = ['Amir', 'Bear', 'Charlton', 'Daman'] >>>print(names[-1][-1]) a) A b) Daman c) Error d) n Knowledge 234 Suppose list1 = [0.5 * x for x in range(0, 4)], list1 is : a) [0, 1, 2, 3]. b) [0, 1, 2, 3, 4]. c) [0.0, 0.5, 1.0, 1.5] d) [0.0, 0.5, 1.0, 1.5, 2.0]. Knowledge 235 What is the output when following code is executed ? >>>list1 = [11, 2, 23] >>>list2 = [11, 2, 2] >>>list1 < list2 is a) True b) False c) Error d) None Knowledge 236 To add a new element to a list we use which command ? a) list1.add(5) b) list1.append(5) c) list1.addLast(5) d) list1.addEnd(5) Knowledge 237 To insert 5 to the third position in list1, we use which command ? a) list1.insert(3, 5) b) list1.insert(2, 5) c) list1.add(3, 5) d) list1.append(3, 5) Knowledge 238 Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.reverse() ? a) [3, 4, 5, 20, 5, 25, 1, 3]. b) [1, 3, 3, 4, 5, 5, 20, 25]. c) [25, 20, 5, 5, 4, 3, 3, 1]. d) [3, 1, 25, 5, 20, 5, 4, 3] Knowledge 239 What is the output when the following code is executed ? >>>"Welcome to Python".split() a) [“Welcome”, “to”, “Python”]. b) (“Welcome”, “to”, “Python”) c) {“Welcome”, “to”, “Python”} d) “Welcome”, “to”, “Python” Knowledge 240 What is the output when following code is executed? >>>list("a#b#c#d".split('#')) a) [‘a’, ‘b’, ‘c’, ‘d’]. b) [‘a b c d’]. c) [‘a#b#c#d’]. d) [‘abcd’]. Knowledge 241 Q.No.14 D Q.No.15 C 16 Answer:- A 17 Answer:- D 18 Answer:- C 19 Answer:- C 20 Answer:- C 21 Answer:- A 22 Answer:- C 23 Answer:- C 24 Answer:- B 25 Answer:- B 26 Answer:- C 27 Answer:- A 28 Answer:- C 29 Answer:- B 30 Answer:- B 31 Python is an open source language 32 ABC language and Modula 3 33 Python was released in February 1991 34 Cross-platform 35 Interpreter 36 Python shell 37 >>> 38 Error 39 23.0 40 150+300 41 Indentation 42 One 43 Not a case-sensitive 44 Source code 45 Integrated Development and Learning Environment 46 (D) None of these 47 (A) eval 48 (A) Lower case 49 (B) in 50 (B)a**b 51 (B) Guido van Rossum 52 (C) 1989 53 (A) .py 54 (C) # 55 (D) class 56 (A) List 57 (B) // 58 (C) parenthesis 59 (D) abc