Python Mock Test 01 This mock test is specially designed for you. There are 50 questions in this mock test, for which 45 minutes time has been given, here you will get the same questions which are often asked in the exam, so read the test comfortably. If you have any problem then please tell in comment box. Abhay Excel Computer-Your Own Family To start the mock test, enter your email id and your name and get ready to do better. Gmail Name 1. What is output in python? print(r"\nhi") Deselect Answer error new line and hi hi \nhi question1370 2. list, tuple dictionary are which types of Data Types. Deselect Answer Binary Types None of the above Sequence Types Boolean Types question1377 3. Who developed Python Programming Language? Deselect Answer Rasmus Lerdorf Wick van Rossum Guido van Rossum Niene Stom question1342 4. Which is not a feature of Python language? Deselect Answer Interpreted language High level language Portable Case Insensitive question1350 5. What is Numeric Types of Data Types ? Deselect Answer Complex a+bj Float a=5.0 All of the above Int- a=5 ,b=1234568 question1364 6. What is the output of the following code? 4+2**5//10 Deselect Answer 77 3 7 0 question1388 7. Flowcharts and algorithms are used for Deselect Answer Better programming All of the Above Easy testing and debugging Efficient coding question1352 8. What is the order of precedence in python? Deselect Answer Exponential, Parentheses, Division, Multiplication, Addition, Subtraction Exponential, Parentheses, Multiplication, Division, Addition, Subtraction Parentheses, Exponential, Multiplication, Division, Addition, Subtraction Parentheses, Exponential, Multiplication, Division, Subtraction, Addition question1378 9. What will be the value of the following Python expression? 4+3%5 Deselect Answer 4 1 7 2 question1359 10. Which of the following is true for variable names in Python? Deselect Answer none of the mentioned underscore and ampersand are the only two special characters allowed unlimited length all private members must have leading and trailing underscores question1391 11. What will be the output of the following Python code snippet if x=1? x<<2 Deselect Answer 2 4 8 1 question1381 12. Algorithm when transalated into a programming language is called. Deselect Answer Flowchart Identifier Debugging code question1389 13. What will be the output of the following code snippet? example = ["Sunday", "Monday", "Tuesday", "Wednesday"]; print(example[-3:-1]) Deselect Answer ['Sunday', 'Monday'] ['Tuesday', 'Wednesday'] ['Monday', 'Tuesday'] ['Wednesday', 'Monday'] question1374 14. Python is a .………….object-oriented programming language. Deselect Answer All of the mentioned above Medium level programming language General purpose Special purpose question1353 15. Which of the following is the use of function in python? Deselect Answer Functions are reusable pieces of programs You cannot also create your own functions Functions do not provide better modularity for your application All of mentions question1373 16. Method which uses a list of well defined instructions to complete a task starting from a given initial state to end state is called as---------- Deselect Answer Program Both A and C Algorithm Flowchart question1354 17. Which of the following functions can help us to find the version of python that we are currently working on? Deselect Answer sys.version ( ) sys.version sys.version ( 0 ) sys.version ( 1 ) question1372 18. Python supports the creation of anonymous functions at runtime, using a construct called Deselect Answer pi anonymous lambda none of the mentioned question1376 19. The examination of changing values of variables is called stepping Deselect Answer Can’t s say False True May be question1347 20. What does pip stand for python? Deselect Answer Pip Installs Packages Pip Installs Python Preferred Installer Program All of the mentioned question1384 21. Which statement will move file pointer 10 bytes backward from current position? Deselect Answer f.seek(-10,1) f.seek(10,0) f.seek(-10,0) None of above question1369 22. Python is a case sensitive language when dealing with identifiers. Deselect Answer True Sometimes False Never question1344 23. What is the name of the operator ** in Python? Deselect Answer Exponentiation ** Floor division // None of the these Modulus % question1382 24. Which are the application areas of Python programming? Deselect Answer Artificial Intelligence and Machine Learning Game Development Web Development All of the above question1360 25. - -------- is a connector showing the relationship between the representative shapes. Deselect Answer Process Box Arrow Line question1356 26. A flowchart that outlines the main segment of a program. Deselect Answer Queue Macro oval start/end Union processing rectangle Decision Micro input/output question1367 27. The action performed by a -------structure must eventually cause the loop to terminate. Deselect Answer Repetition Sequence Process Case question1361 28. NumPy stands for Deselect Answer Numerical Python Numbering Python Number in Python None of these question1365 29. Each module should also be divided into sub modules according software engineering to and programming style. Deselect Answer Top down Method None of Mentioned Coding Bottom up Method question1387 30. Which statement will check if a is equal to b? Deselect Answer if a == b: if a = b: if a == b if a === c: question1371 31. Which of the following character is used to give single-line comments in Python? Deselect Answer ! // /* # question1368 32. Which mode creates a new line file if the file does not exist? Deselect Answer None of the these Both A & B Write mode Append mode question1386 33. ---------------------- scans the entire program and translates it as a whole into machine code. Deselect Answer Interpreter None of Above Compiler Debugger question1358 34. Is Python code compiled or interpreted? Deselect Answer Python code is both compiled and interpreted Python code is only compiled Python code is neither compiled nor interpreted Python code is only interpreted question1351 35. What keyword would you use to add an alternative condition to an if statement? Deselect Answer None of the above else else if elif question1363 36. What will be the output of the following code snippet? print(2**3+(5+6)**(1+1)) Deselect Answer 8 None of the above. 129 121 question1375 37. Which of the following is true for variable names? Deselect Answer Limited length Ampersand can be used in its name Unlimited length None of the Above question1346 38. What is the output in python language? Round(.4)-Round(-.5) Deselect Answer 2 0 1 9 question1357 39. Which of the following is the correct extension of the Python file? Deselect Answer .p .py .python .pl question1348 40. In Python, which of the following functions is a built-in function? Deselect Answer print ( ) func_k ( ) None of these val ( ) question1383 41. What is the data type of following object? A = [5,’abc’,3,2,6] Deselect Answer Tuple List Array Dictionary question1349 42. Which of the following is used to define a block of code in Python language? Deselect Answer All of the mentioned Key Indentation Brackets question1362 43. Designing the problem? Deselect Answer Algorithm Debugging Testing logical error question1390 44. Actual instructions in flowcharts are represented in ----- Deselect Answer Circles Arrows Boxes Line question1379 45. Which keyword is used for function in Python language? Deselect Answer def Fun Define Function question1366 46. If a is a dictionary with some key-value pairs, what does a.popitem() do? Deselect Answer Removes the key-value pair for the key given as an argument Invalid method for dictionary Removes all the key-value pairs Removes an arbitrary element question1385 47. What is the output for − 'python ' [-3]? Deselect Answer 't' 'o' 'h' Negative index error. question1343 48. All keywords in Python are in _________ Deselect Answer UPPER CASE lower case Capitalized True ,False ,None None of the mentioned question1355 49. Which type of Programming does Python support? Deselect Answer object-oriented programming structured programming all of the mentioned functional programming question1345 50. Which types of logical operators in Python? Deselect Answer All of the above OR NOT AND question1380 1 out of 50 Please fill in the comment box below.