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