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

Quiz Instructions

Select an option to see the correct answer instantly.

1. How can you add a new column to a DataFrame?
2. In which decade was Python conceived?
3. Which of the following is not a valid comparison operator in Python?
4. What is the output of the following code:t=(10, 20, 30, 40, 50, 50, 70)print(t[:::])
5. Which of the following is the correct way to assign the value 3.5 to a variable called 'length'?
6. What is the output of:print(5 + 4 * 2)
7. How do you create a DataFrame from a list of tuples?
8. Name three built-in data types in Python.
9. How do you print the number 123 in Python?
10. What does the 'circle' command do?
11. What will the following code output?x = 10while x > 5:print(x)x-= 2
12. Which of the following is an invalid variable name?
13. What is syntax?
14. What is the output of the expression 'Hello' + ' World'?
15. Extra programs for a language that other people can use are called
16. Why should you NOT write print("place ..... of ..... birth") when you want the value?
17. Which of the following statements will cause an error in Python?
18. Which of the following is a correct way to iterate over a list using a for loop?
19. Which of the following is used to check if '5' is in the list 'numbers'?
20. How do you close a file in Python?
21. When creating a rectangle with the turtle, what angle is needed when turning?
22. What is a correct way to declare a Python variable?
23. What is the correct way to check if a variable 'age' is greater than 12 in Python?
24. When you run this program what will this line of code do?name = input("Enter your name: ")
25. Which of these would work as a piece of code?