This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 81 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 81 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Read the Python program below:number = 13if number == 0:print("zero")number = 0When this program is executed, what will be displayed on the screen? A) Zero. B) Nothing will be displayed on the screen. C) 130. D) None of the above. Show Answer Correct Answer: B) Nothing will be displayed on the screen. 2. Which data structure allows duplicate elements? A) Set. B) Dictionary. C) List. D) None. Show Answer Correct Answer: C) List. 3. What is the output of print(len('Hello'))? A) 4. B) 6. C) 5. D) Hello. Show Answer Correct Answer: C) 5. 4. What will be the output of the following code? "'pythonprint("Python" .lower()) "' A) Python. B) PYTHON. C) Python. D) PYTHON. Show Answer Correct Answer: A) Python. 5. Which operator is used for logical operations in Python? A) And. B) Or. C) ||. D) &&. Show Answer Correct Answer: A) And. 6. What does the else statement do? A) Handles false conditions. B) Defines a function. C) Repeats code. D) Stores data. Show Answer Correct Answer: A) Handles false conditions. 7. Which operator is used for subtraction? A) -. B) +. C) *. D) /. Show Answer Correct Answer: A) -. 8. What will be the output of the following code?print("Welcome to", "Python", "Programming!") A) Welcome to Python Programming!. B) Welcome toPythonProgramming!. C) Welcome to, Python, Programming!. D) Welcome to-Python-Programming!. Show Answer Correct Answer: A) Welcome to Python Programming!. 9. Which of the following is the correct way to output the value of a variable called 'height' in Python? A) Print(height). B) Echo(height). C) Output(height). D) Display(height). Show Answer Correct Answer: A) Print(height). 10. What is the name of the data type of True? A) Int. B) Boolean. C) Float. D) String. Show Answer Correct Answer: B) Boolean. 11. Which statement prints I am 10 years old? A) Pint("I am 10 years old."). B) Print('I am 10 years old.). C) Print(" )I am 10 years old. D) Print("I am 10 years old."). Show Answer Correct Answer: D) Print("I am 10 years old."). 12. How does high-level get translated into low-level? A) Interpreters and compilers. B) Only interpreters. C) Only compilers. D) None of the above. Show Answer Correct Answer: A) Interpreters and compilers. 13. Name=input("What is your name? ")print("Your name is '' + name)What will be displayed if the user types in "Bob" ? A) Your name is name. B) Name. C) Bob. D) Your name is Bob. Show Answer Correct Answer: D) Your name is Bob. 14. The ..... loop is used when you are sure about how many times a loop body is executed. A) While. B) For. C) While else. D) None of the above. Show Answer Correct Answer: B) For. 15. Which control structure will execute an instruction only after the computer evaluates conditions to determine if a certain condition exists? A) Selection. B) Loop. C) Functional. D) Sequence. Show Answer Correct Answer: A) Selection. 16. How do you create an empty list in Python? A) 'list = []'. B) 'list = \{\}'. C) 'list = ()'. D) 'list = <>'. Show Answer Correct Answer: A) 'list = []'. 17. What is the correct syntax to take user input? A) Name = input('Enter name:'). B) Name = read('Enter name:'). C) Name = get('Enter name:'). D) None of the above. Show Answer Correct Answer: A) Name = input('Enter name:'). 18. Tipe data list pada Python ditandai dengan tanda ..... A) \{\}. B) []. C) (). D) "". Show Answer Correct Answer: B) []. 19. How do you make the turtle invisible on the screen? A) Turtle.showturtle(). B) Turtle.fillcolor(). C) Turtle.hideturtle(). D) Turtle.begin fill(). Show Answer Correct Answer: C) Turtle.hideturtle(). 20. What is the purpose of the 'continue' statement in a loop? A) To restart the loop. B) To exit the loop. C) To skip the current iteration. D) To pause the loop. Show Answer Correct Answer: C) To skip the current iteration. 21. What type of loop is 'for'? A) Conditional. B) Fixed. C) Repeat. D) Selection. Show Answer Correct Answer: B) Fixed. 22. What data type will the variable 'weight' have after this code runs? "'pythonweight = input("Enter your weight in pounds: ") "' A) Int. B) Float. C) Str. D) Bool. Show Answer Correct Answer: C) Str. 23. True and False are sample of ..... ? A) Booleen. B) Boolean. C) Boleam. D) Booleam. Show Answer Correct Answer: B) Boolean. 24. Colors = ["red", "orange", "yellow", "green", "blue", "indigo", "violet"]Choose the answer that will output True. A) Colors[1] == red. B) Colors[0] == "red". C) Colors[-1] == "red". D) Colors[2] == "red". Show Answer Correct Answer: B) Colors[0] == "red". 25. Print (Today is Monday !) will display A) Today is Monday. B) An error message. C) Today is Monday!. D) None of the above. Show Answer Correct Answer: B) An error message. ← PreviousNext →Related QuizzesClass 11 Computer Science Chapter 2 Introduction To Python Quiz 1Class 11 Computer Science Chapter 2 Introduction To Python Quiz 2Class 11 Computer Science Chapter 2 Introduction To Python Quiz 3Class 11 Computer Science Chapter 2 Introduction To Python Quiz 4Class 11 Computer Science Chapter 2 Introduction To Python Quiz 5Class 11 Computer Science Chapter 2 Introduction To Python Quiz 6Class 11 Computer Science Chapter 2 Introduction To Python Quiz 7Class 11 Computer Science Chapter 2 Introduction To Python Quiz 8Class 11 Computer Science Chapter 2 Introduction To Python Quiz 9Class 11 Computer Science Chapter 2 Introduction To Python Quiz 10 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books