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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What is the output of the following code? print('Hello' + ' World!')
2. Which data type would be most suitable for storing a collection of items of different types?
3. Bagaimana cara menambahkan komentar di Python?
4. What does the 'range()' function do in Python?
5. What will print(2 ** 3) output?
6. What is Django primarily used for?
7. Which of the following assignment will return an error?
8. What function would you use to convert a string to an integer?
9. How many local and global variables are there in the following Python code?var1=5def fn():var1=2var2=var1+5var1=10fn()
10. Who created the Python programming language?
11. What are floats in Python?
12. Which of the following is the first step in program development?
13. The features of Python
14. To get the users input what function do we use?
15. What is the correct way to add comments in Python code?
16. Strings must always be written inside quotation marks in Python.
17. A student wants the output to be Aisha Khan. Which line should they use?
18. What will happen if you tell Tracy 'forward 50' and run the code?
19. What is the function of syntax error?
20. What is the result of the following code? "'pythonweight = 12.5print(type(weight)) "'
21. What data type will the variable 'age' have after executing the following code?age = input("Enter your age: ")
22. What is the first step to execute Python code?
23. In PLS, which of the following is NOT a primitive data type?
24. TRUE or FALSE:Python is named after a snake.
25. What should you do if you want to output the lines of your favorite song in Python?