Class 11 Computer Science Chapter 2 Introduction To Python Quiz 33 (60 MCQs)

Quiz Instructions

Select an option to see the correct answer instantly.

1. Write the output of the following:a=8; def abc(a):print(a); abc(7)
2. Code for Hello, World!
3. What will the following code return? type([1, 2, 3])
4. Suppose d = { "john" :40, "peter" :45}to delete the entry for "john" what command do we use?
5. The < ..... assignment operator in pseudocode is replaced by ..... in python
6. What is a syntax?
7. What will the following code output? print('Hello, ' + input('Enter your name:'))
8. Name one popular library in Python for machine learning.
9. What is one of the main reasons Python is popular among beginners?
10. What is the output of:print('Hi' + 'There')?
11. Fungsi dalam Python ditulis menggunakan kata kunci .....
12. What will be the output of the following code? "'pythonprint(type(3.5)) "'
13. Which of the following symbols is used to place a multiline comment?
14. What does forward(300) do?
15. How is computer science divided into strands?
16. What do we use to define a block of code in Python language?
17. What is the purpose of the else statement in a control structure?
18. You need to store GPS coordinates that should never change. Which Python data structure best fits this need?
19. What is Data Science?
20. Jenis data apa yang digunakan untuk menyimpan urutan karakter di Python?
21. Which of the following is a correct way to use the 'input()' function to ask for a user's name?
22. Which of the following is the correct way to call a function named 'greet'?
23. What should you do if you encounter an error message in Python?
24. How can you add a new column to a DataFrame?
25. In which decade was Python conceived?
26. What is the output of the following code:t=(10, 20, 30, 40, 50, 50, 70)print(t[:::])
27. Which of the following is the correct way to assign the value 3.5 to a variable called 'length'?
28. What is the output of:print(5 + 4 * 2)
29. How do you create a DataFrame from a list of tuples?
30. Name three built-in data types in Python.
31. How do you print the number 123 in Python?
32. What does the 'circle' command do?
33. What will the following code output?x = 10while x > 5:print(x)x-= 2
34. What is the output of the expression 'Hello' + ' World'?
35. Extra programs for a language that other people can use are called
36. Why should you NOT write print("place ..... of ..... birth") when you want the value?
37. Which of the following statements will cause an error in Python?
38. Which of the following is a correct way to iterate over a list using a for loop?
39. Which of the following is used to check if '5' is in the list 'numbers'?
40. How do you close a file in Python?
41. When creating a rectangle with the turtle, what angle is needed when turning?
42. When you run this program what will this line of code do?name = input("Enter your name: ")
43. Which of these would work as a piece of code?
44. X=6y=4print(x, y)
45. Which of the options is not an example of a text-based programming language?
46. Which one is the correct assigning of value 100 to the variable x
47. Which operator is used for string concatenation in Python?
48. How do you create an empty dictionary in Python?
49. What does the subprogram turtle.setposition(x, y) do?
50. Which of the following is the correct way to print a string in Python?
51. Features of Python
52. An algorithm can be best described as:
53. Which generation of computers started using Integrated Circuit based hardware?
54. What does the percentage sign-%-do in Python?
55. To display the following on screenHello World!the following command should be used:
56. X = 10print(type(x))
57. Str1="6/4"print("str1")
58. What is a global variable?
59. What is the result of the following operation?print(7 % 3)
60. Which statement is adding remainder of 8 divided by 3 to the product of 5 and 6?