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