This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 9 Practical Work Python Exercises – Quiz 36 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 36 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. My ..... name = "Awesome"My ..... name in this string is ..... A) A variable. B) Syntax. C) My name. D) Prompt. Show Answer Correct Answer: A) A variable. 2. How do i remove something from a list? A) Variable.append(). B) Variable.delete(). C) Variable.remove(). D) Variable=(new variable). Show Answer Correct Answer: C) Variable.remove(). 3. People = ["John", "Rob", "Bob"]print (people[4]) what would this result be? A) John. B) Rob. C) Bob. D) Error. Show Answer Correct Answer: D) Error. 4. Python is the fastest growing programming language: A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: A) True. 5. Choose the correct data type:"£" A) Character. B) String. C) Integer. D) Real/Float. E) Boolean. Show Answer Correct Answer: A) Character. 6. What is the name of the built-in command in python to output data? A) Print. B) Input. C) Print. D) Display. Show Answer Correct Answer: A) Print. 7. Is python an interpreter or compiler programming language? A) Compiler. B) Interpreter. C) All the above. D) None of the above. Show Answer Correct Answer: B) Interpreter. 8. Which of the following best describes where you should define your function in your code? A) Near the bottom of the source file, after that function is called by any main program code. B) Always place functions in a separate source file. C) Near the top of the source file, before that function is called by any main program code. D) The location is not important, so place the function wherever you like. Show Answer Correct Answer: C) Near the top of the source file, before that function is called by any main program code. 9. Please select all correct way delete the following dictionarystudent = \{ "name": "Emma", "class":9, "marks":75 \} A) Del student. B) Del student[0:2]. C) Student.clear(). D) Student.remove(). Show Answer Correct Answer: A) Del student. 10. Which of the following sequences would be generated by the given line of code?range (10, 0, -5) A) 10, 9, 8, 7, 6, 5. B) 10, 5. C) 0, 5, 10. D) 10, 5, 0. Show Answer Correct Answer: B) 10, 5. 11. Extension of Python A) Py. B) .py. C) .PYS. D) .PYE. Show Answer Correct Answer: B) .py. 12. You have the following dictionary definition:d = \{'foo':100, 'bar':200, 'baz':300\}What method call will delete the entry whose value is 200? A) Delete d('bar'). B) D.pop("bar"). C) D.remove("bar"). D) None of the above. Show Answer Correct Answer: B) D.pop("bar"). 13. What does the following code do? myAge = int(myAge) A) Converts the variable myAge to a integer. B) Syntax Error. C) Converts the variable myAge from a integer to a string. D) Missing input. Show Answer Correct Answer: A) Converts the variable myAge to a integer. 14. Which function truncates the fractional part of given number and returns only the integer or whole part. A) Int(). B) Round(). C) Oct(). D) Hex(). Show Answer Correct Answer: A) Int(). 15. What is the correct definition for 'pseudo code?' A) A notation resembling a complex programming language, used in program design. B) A notation resembling a simplified programming language, used in program design. C) All the above. D) None of the above. Show Answer Correct Answer: B) A notation resembling a simplified programming language, used in program design. 16. Grades = [2.0, 3.0, 4.0]How do you get the length of the list above A) Len(grades). B) Length(grades). C) List.length(grades). D) List.len(grades). Show Answer Correct Answer: A) Len(grades). 17. A = ['foo', 'bar', 'baz', 'qux', 'quux', 'corge']Which display correct output from below? A) Print(a[-5:-3])['bar', 'baz']. B) Print(a[4::-1])['quux', 'baz', 'foo']. C) None. D) Print(a[2])['bar']. Show Answer Correct Answer: A) Print(a[-5:-3])['bar', 'baz']. 18. Mr. Whiting is 45 years old. This is an example of: A) Input. B) Output. C) Processing. D) Storage. Show Answer Correct Answer: B) Output. 19. Which two statements are used to implement iteration/Repetition)? A) IF and WHILE. B) ELSE and WHILE. C) FOR and WHILE. D) IF and ELSE. Show Answer Correct Answer: C) FOR and WHILE. 20. How do you access the first element of a list in Python? A) List name[0]. B) List name[1]. C) List name[first]. D) List name[-1]. Show Answer Correct Answer: A) List name[0]. 21. How will the following code look on the screen?print ("I love programming.") print ("I love programming.") A) "I love programming.""I love programming.". B) I love programming.I love programming. C) I love programming. I love programming. D) I LOVE PROGRAMMINGI LOVE PROGRAMMING. Show Answer Correct Answer: B) I love programming.I love programming. 22. Str1='101'x=int(str1)z=x+400print(z) A) 101400. B) X400. C) 501. D) None of above. Show Answer Correct Answer: C) 501. 23. In the following code, what value will be assigned to the variable "cat" ?mouse + cat + dog = "small" + "medium" + "large" A) Small, medium, large. B) Small. C) Medium. D) Large. E) Nothing, that operation will throw an error. Show Answer Correct Answer: E) Nothing, that operation will throw an error. 24. WHILE loops are A) Loops which run an unknown number of times. B) Loops which run for a specific number of times. C) The same as if statements. D) Not part of programming. Show Answer Correct Answer: A) Loops which run an unknown number of times. 25. In Python the subtraction sign is ..... A) -. B) :. C) /. D) >. Show Answer Correct Answer: A) -. ← PreviousNext →Related QuizzesClass 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 1Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 2Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 3Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 4Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 5Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 6Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 7Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 8Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 9Class 11 Computer Science Chapter 9 Practical Work Python Exercises Quiz 10 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books