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