This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 2 Introduction To Python – Quiz 33 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 2 Introduction To Python Quiz 33 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What data type is the result of the following expression:'5 + 3.0'? A) Integer. B) String. C) Float. D) Boolean. Show Answer Correct Answer: C) Float. 2. Which data type is used to store:TRUE A) Boolean. B) Double. C) String. D) Integer. Show Answer Correct Answer: A) Boolean. 3. Which of the following is the correct way to create a list containing the values 4, 5, and 6? A) List = (4, 5, 6). B) List = [4, 5, 6]. C) List = \{4, 5, 6\}. D) List = "4, 5, 6". Show Answer Correct Answer: B) List = [4, 5, 6]. 4. Aturan apa yang harus diperhatikan dalam memberi nama variabel dalam Python? A) Nama variabel harus diawali dengan huruf atau underscore ( ), tidak boleh dengan angka atau simbol lain. B) Nama variabel harus diakhiri dengan titik (.), koma (, ), atau tanda seru (!). C) Nama variabel harus menggunakan huruf kapital semua, misalnya NAMA. D) Nama variabel harus menggunakan spasi antara setiap kata, misalnya nama lengkap. Show Answer Correct Answer: A) Nama variabel harus diawali dengan huruf atau underscore ( ), tidak boleh dengan angka atau simbol lain. 5. When a value or text string entered in Interactive Mode it is immediately shown on the screen. A) Echo. B) Keyword. C) Variable. D) QRU (quick response unit). Show Answer Correct Answer: A) Echo. 6. What is the name of the environment in Python that write your programs and then test them out? A) Shell. B) Window. C) IDLE. D) CLI. Show Answer Correct Answer: C) IDLE. 7. What is the standard function used in Python to prompt the user to type in a value from the keyboard? A) Get ( ). B) Read ( ). C) Input ( ). D) Prompt ( ). Show Answer Correct Answer: C) Input ( ). 8. Write the output of the following code:s = None; s A) Shows Error. B) None of the above. C) None. D) Nothing will be printed. Show Answer Correct Answer: D) Nothing will be printed. 9. How are statements terminated in Python and most text-based programming languages? A) With a comma. B) With a question mark. C) With a full stop. D) With a semi-colon. Show Answer Correct Answer: D) With a semi-colon. 10. Which of the following will create a variable called 'temperature' and assign it the value $15^\circ$ A) Temperature = 15. B) Temperature:= 15. C) Temperature == 15. D) Temperature <-15. Show Answer Correct Answer: A) Temperature = 15. 11. What symbol would you use to add a comment to your code? A) //. B) #. C) -. D) ]]. Show Answer Correct Answer: B) #. 12. What will be the output of the following code? print(5 + 3 * 2) A) 16. B) 11. C) 13. D) 10. Show Answer Correct Answer: B) 11. 13. An error in a code is called a- A) Bug. B) Glitch. C) Error Code. D) Syntax Error. Show Answer Correct Answer: A) Bug. 14. Which is NOT a programming language. A) Jave. B) C ++. C) Python. D) Microsoft. Show Answer Correct Answer: D) Microsoft. 15. What will be the output of the following code? name = input("Enter your name: ") print("Hello, '' + name) A) Hello, name. B) Hello, Enter your name:. C) Hello, followed by the user's input. D) Error. Show Answer Correct Answer: C) Hello, followed by the user's input. 16. Which of the following expressions will evaluate to False in Python? A) 12 <= 12. B) 7 != 8. C) 4 > 5. D) 3 == 3. Show Answer Correct Answer: C) 4 > 5. 17. What is the main advantage of using Python for web development? A) Python is not suitable for web development. B) Python provides a robust framework for web development. C) Python is only used for desktop applications. D) Python is too complex for web development. Show Answer Correct Answer: B) Python provides a robust framework for web development. 18. The syntax in Python (TM) is one of the main advantages over other high level programming languages. A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 19. Adding strings together is called ..... & ..... is used in it A) Concatenation-+. B) Annotation-%. C) Division-**. D) Joining-#. Show Answer Correct Answer: A) Concatenation-+. 20. A mini programme used inside a larger programme A) Algorithm. B) Function. C) Variable. D) Concatenate. Show Answer Correct Answer: B) Function. 21. To show some text on the screen in Python we can use the ..... function: A) Show(). B) Input(). C) Float(). D) Print(). Show Answer Correct Answer: D) Print(). 22. What is the correct way to open the file file ..... in.txt for reading? A) Open('file in.txt', 'r'). B) Open('file in.txt', 'r+'). C) Open('file in.txt', 'w'). D) Open('file in.txt', 'a'). Show Answer Correct Answer: A) Open('file in.txt', 'r'). 23. What are the two main types of loops in Python? A) For loop, while loop. B) Foreach loop. C) Repeat until loop. D) Do while loop. Show Answer Correct Answer: A) For loop, while loop. 24. Which of the following is a string in Python? A) "Hello". B) Hello. C) 123. D) 12.3. Show Answer Correct Answer: A) "Hello". 25. How do you access the first element of a list named 'colours'? A) Colours[0]. B) Colours(0). C) Colours\{0\}. D) Colours.0. Show Answer Correct Answer: A) Colours[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