This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 12 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 12 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. A, b=0, 30a=30/(2*b)print(a) A) 15. B) 1.5. C) 0.5. D) 0. Show Answer Correct Answer: C) 0.5. 2. What is ASCII? A) A graphical programming language. B) A system for representing numbers in binary. C) A standard mapping of numbers to letters. D) A system for representing strings in python. Show Answer Correct Answer: C) A standard mapping of numbers to letters. 3. What will be the output of the following code?x = 10y = 4print (x // y) A) 2. B) 2.5. C) 3. D) 2.0. Show Answer Correct Answer: C) 3. 4. What is the first program going to draw? A) A square. B) A slinky. C) A line. D) A triangle. Show Answer Correct Answer: B) A slinky. 5. What is the output for the following:def func (a, b = 8, c = 10):return a + b + cprint (func (4, c = 13) ) A) 22. B) 25. C) 27. D) Error. Show Answer Correct Answer: B) 25. 6. What will be the output of the following code? "'pythonif 10 > 5:print("Ten is greater than five") "' A) 'Ten is greater than five'. B) 'Error'. C) 'Nothing'. D) '5 is less than 10'. Show Answer Correct Answer: A) 'Ten is greater than five'. 7. Which of the following is a method in Python? A) 'append()'. B) 'print()'. C) 'input()'. D) All of the above. Show Answer Correct Answer: D) All of the above. 8. What will be the output of the following code? print(5 // 2) A) 2. B) 2.5. C) 3. D) 5. Show Answer Correct Answer: A) 2. 9. What is the purpose of the print() function in Python? A) Display something in the console. B) Read user input. C) Perform mathematical calculations. D) Create a loop. Show Answer Correct Answer: A) Display something in the console. 10. Which of these is a floating point? A) 5. B) 23.5. C) True/False. D) Not Me!. Show Answer Correct Answer: B) 23.5. 11. Is Python case sensitive when dealing with identifiers? A) Yes. B) No. C) All the above. D) None of the above. Show Answer Correct Answer: A) Yes. 12. Consider t = (3, 5, 7). Which unpacking is valid? A) A, b = t. B) A, b, c, d = t. C) A, b, c = t. D) A = t[0], b = t[1]. Show Answer Correct Answer: C) A, b, c = t. 13. How can you print the string 'Hello! "Python" is fun.' with the quotes around Python? A) Print('Hello! "Python" is fun.'). B) Print("Hello! \"Python\" is fun."). C) Both A and B. D) Print(Hello! "Python" is fun.). Show Answer Correct Answer: C) Both A and B. 14. According to BEDMAS/PEMDAS, what is the correct order of operations? A) It is evaluated strictly from left to right. B) Addition, Subtraction, Multiplication, Division, Exponents, Brackets. C) Brackets, Exponents, Division/Multiplication, Addition/Subtraction. D) Brackets, Division, Exponents, Multiplication, Addition, Subtraction. Show Answer Correct Answer: C) Brackets, Exponents, Division/Multiplication, Addition/Subtraction. 15. Conditional statement adalah pernyataan yang digunakan untuk ..... A) Mengevaluasi kondisi atau ekspresi yang bernilai benar atau salah. B) Menjalankan blok kode tertentu berdasarkan hasil evaluasi kondisi atau ekspresi. C) Mengontrol alur atau logika dari program. D) Semua jawaban benar. Show Answer Correct Answer: D) Semua jawaban benar. 16. What is the function of a programming language? A) To create software and applications. B) To design websites. C) To send emails. D) To play games. Show Answer Correct Answer: A) To create software and applications. 17. How do you access the first character of a string in Python? A) S[1]. B) S[0]. C) S.first(). D) S.get(0). Show Answer Correct Answer: B) S[0]. 18. In computers science, variables: A) Are numbers like pi. B) Represent parts of an experiment that are measured or tested. C) Are placeholders for storing information which can change while a program runs. D) Are unchangeable. Show Answer Correct Answer: C) Are placeholders for storing information which can change while a program runs. 19. Colors = ["red", "orange", "yellow", "green", "blue", "indigo", "violet"]Choose the answer that will output False. A) Colors[0] == red. B) Colors[-1] == "violet". C) Len(colors) == 7. D) Len(colors) == 6. Show Answer Correct Answer: D) Len(colors) == 6. 20. How do you declare a comment in Python? A) //. B) . C) #. D) /* */. Show Answer Correct Answer: C) #. 21. Which of the following is NOT a feature of Python? A) Free and open-source. B) Dynamically typed. C) Interpreted language. D) Compiled language. Show Answer Correct Answer: D) Compiled language. 22. Which of the following is invalid identifier? A) 1stName. B) 1st. C) While. D) . Show Answer Correct Answer: A) 1stName. 23. What will print(type(name)) return if name = 'Abhishek'? A) Str. B) Int. C) Bool. D) None of the above. Show Answer Correct Answer: A) Str. 24. Which of these tools could a Python programmer build? A) A car engine. B) An educational website. C) A painting canvas. D) A garden hose. Show Answer Correct Answer: B) An educational website. 25. What is the output of the following code?x = int("10")y = float(x)print(y) A) 10. B) 10.0. C) "10". D) Error. Show Answer Correct Answer: B) 10.0. ← 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