Class 11 Computer Science Chapter 2 Introduction To Python Quiz 37 (25 MCQs)

Quiz Instructions

Select an option to see the correct answer instantly.

1. What is the output of the following code? "'pythonounces = 16print("There are", ounces, "ounces in a pint.") "'
2. Which of the following is a valid way to assign multiple values to variables in Python?
3. Which data type is used to store text?
4. What will the following code output? print('Hello' + str(5))
5. Which of the following is used to store a sequence of items in Python?
6. What does turn(90) do?
7. What command is used to run a Python script in IDLE?
8. The boolean expression True or Falseevaluates to:
9. What is the output of the following code? "'pythonprint(7 + 3) "'
10. Which of the following represents "equal to" in Python?
11. What does the 'values' attribute of a DataFrame return?
12. Which of these is NOT a core component of a computer?
13. What is the correct way to exit a while loop prematurely in Python?
14. Choose the correct syntax for lambda function.
15. How can you make an exception more reusable in Python?
16. How do you create your own module in Python?
17. How do you take input in python?
18. What extension must you add to the end of a file when saving?
19. Code forFive is greater than two!
20. The items listed in the parenthesis of a procedure definition are called .....
21. A programmer types flt(price), what type of data are they assigning to the price?
22. What is the result of the expression '5 + 3 * 2' in Python?
23. Which operator is used for division?
24. Bagaimana cara menyisipkan komentar dalam kode Python?
25. Which of the following is NOT a sequence type in Python?