This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 4 Conditional And Iterative Statements – Quiz 7 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 4 Conditional And Iterative Statements Quiz 7 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. Which of the following is true about the conditional statement below?If you are flying, then you are in ajet. A) Hypothesis:you are flyingConclusion:you are in ajet. B) Hypothesis:IF you are flyingConclusion:THEN you are in ajet. C) Hypothesis:THEN you are in ajetConclusion:IF you are flying. D) Hypothesis:you are in ajetConclusion:you are flying. Show Answer Correct Answer: A) Hypothesis:you are flyingConclusion:you are in ajet. 2. How do you write a nested if statement in Python? A) Use the 'else' keyword to nest if statements. B) Use the 'for' loop to nest if statements. C) Use the 'elif' keyword to nest if statements. D) Include an if statement within the body of another if statement. Show Answer Correct Answer: D) Include an if statement within the body of another if statement. 3. Mr. Anton ..... (go) on holiday if he ..... (have) time. A) Will go, have. B) Will go, has. C) Go, will have. D) Goes, will have. Show Answer Correct Answer: B) Will go, has. 4. In a Python program, a control structure: A) Directs the order of execution of the statements in the program. B) Manages the input and output of control characters. C) Defines program-specific data structures. D) Dictates what happens before the program starts and after it terminates. Show Answer Correct Answer: A) Directs the order of execution of the statements in the program. 5. Given, "If I have a Siberian Husky, then I have a dog." Identify the contrapositive. A) If I do not have a Siberian Husky, then I do not have a dog. B) If I have a dog, then I have a Siberian Husky. C) If I do not have a dog, then I do not have a Siberian Husky. D) If I do not have a Siberian Husky, then I have a dog. Show Answer Correct Answer: C) If I do not have a dog, then I do not have a Siberian Husky. 6. Logical OperatorsWhat is &&? A) And. B) Or. C) Not. D) Less than. Show Answer Correct Answer: A) And. 7. For checking some condition, What do we need to use? A) Iterative statements. B) Jumping statements. C) Conditional statements. D) None of the above. Show Answer Correct Answer: C) Conditional statements. 8. Consider the statement:If Ed lives South of Canada, then he lives in Texas.Which of the following is a COUNTEREXAMPLE to this false statement? A) If Ed lives South of Canada, then he lives in Minnesota. B) If Ed lives North of Canada, then he lives in Texas. C) All the above. D) None of the above. Show Answer Correct Answer: A) If Ed lives South of Canada, then he lives in Minnesota. 9. What is the output of the following code snippet:if 'bar' in \{'foo':1, 'bar':2, 'baz':3\}:print(1) print(2) if 'a' in 'qux':print(3)print(4) A) 4. B) 1234. C) It doesn't generate any output. D) 124. Show Answer Correct Answer: D) 124. 10. Original:If Tiffany buys a guitar, then she will not buy a keyboard.What is this? If Tiffany does buy a keyboard, then she will not buy a guitar. A) Converse. B) Inverse. C) Contrapositive. D) Negation. Show Answer Correct Answer: C) Contrapositive. 11. Which one of the following if statements will not execute successfully: A) If (1, 2):print('foo'). B) If (1, 2):print('foo'). C) If (1, 2):print('foo'). D) If (1, 2):print('foo'). Show Answer Correct Answer: A) If (1, 2):print('foo'). 12. When taking the converse we ..... the hypothesis and conclusion. A) Don't change. B) Switch. C) Highlight. D) Delete. Show Answer Correct Answer: B) Switch. 13. John ..... (stay) in London if he ..... (get) a job. A) Will stay, gets. B) Stays, will get. C) Stays, gets. D) Will stay, will get. Show Answer Correct Answer: A) Will stay, gets. 14. Check the output. i=10while i<=1:print(i) i=+1 A) 123456789. B) No output will be shown. C) 12345678910. D) None of the above. Show Answer Correct Answer: B) No output will be shown. 15. If Hendry ..... (come), his family ..... (be) surprised. A) Come, is. B) Comes, will be. C) Comes, are. D) Come, will be. Show Answer Correct Answer: B) Comes, will be. 16. Given, "If I have a Siberian Husky, then I have a dog." Identify the converse. A) If I do not have a Siberian Husky, then I do not have a dog. B) If I have a dog, then I have a Siberian Husky. C) If I do not have a dog, then I do not have a Siberian Husky. D) If I do not have a Siberian Husky, then I have a dog. Show Answer Correct Answer: B) If I have a dog, then I have a Siberian Husky. 17. Which of the following is a valid conditional statement for the following phrase:An acute angle has a measure less than 90$^\circ$. A) If an angle is acute, then it has a measure less than 90$^\circ$. B) If an angle is not acute, then it does not have a measure less than 90$^\circ$. C) If an angle is acute, then it is acute. D) If an angle does not measure less than 90$^\circ$, then it is not acute. Show Answer Correct Answer: A) If an angle is acute, then it has a measure less than 90$^\circ$. 18. If Ron ..... (eat) all this cake, he ..... (feel) sick. A) Eats, will feel. B) Eats, feels. C) Will eat, feels. D) Will eat, eat. Show Answer Correct Answer: A) Eats, will feel. 19. Read the statement, then the phrase. Determine whether the phrase is the hypothesis or conclusion of the conditional statement."If a square is inscribed in a circle, then a diagonal of the square is a diameter of the circle. a square is inscribed in a circle A) Hypothesis. B) Conclusion. C) All the above. D) None of the above. Show Answer Correct Answer: A) Hypothesis. 20. If a number is a natural number, then it is a whole number.If a number is a whole number, then it is a natural number. A) Converse. B) Inverse. C) Contrapositive. D) Biconditional Statement. Show Answer Correct Answer: A) Converse. 21. What is value of this expression:'a' + 'x' if '123'.isdigit() else 'y' + 'b' A) 'axb'. B) 'ax'. C) 'axyb'. D) 'ab'. Show Answer Correct Answer: B) 'ax'. 22. Identify the hypothesis of the statement "A parallelogram whose diagonals are congruent is a rectangle" . A) The parallelogram is a rectangle. B) The diagonals of a parallelogram are congruent. C) Parallelogram whose diagonals are congruent. D) Is a rectangle. Show Answer Correct Answer: C) Parallelogram whose diagonals are congruent. 23. Original:If angles are congruent, then the measures of the angles are equal. What is this? If angles are not congruent, then the measures of the angles are not equal. A) Conditional. B) Converse. C) Inverse. D) Converse. Show Answer Correct Answer: C) Inverse. 24. When taking the inverse we ..... the hypothesis and conculsion A) Negate. B) Switch. C) Switch and negate. D) Keep the same. Show Answer Correct Answer: A) Negate. 25. Which of the following is the CONVERSE of the statement below?If an object is a ring, then it ismade of gold. A) If an object is made of gold, then it is a ring. B) If an object is not a ring, then it is not made of god. C) If an object is not made of gold, then it is not a ring. D) There is no converse of the statement. Show Answer Correct Answer: A) If an object is made of gold, then it is a ring. ← PreviousNext →Related QuizzesClass 11 Computer Science Chapter 4 Conditional And Iterative Statements Quiz 1Class 11 Computer Science Chapter 4 Conditional And Iterative Statements Quiz 2Class 11 Computer Science Chapter 4 Conditional And Iterative Statements Quiz 3Class 11 Computer Science Chapter 4 Conditional And Iterative Statements Quiz 4Class 11 Computer Science Chapter 4 Conditional And Iterative Statements Quiz 5Class 11 Computer Science Chapter 4 Conditional And Iterative Statements Quiz 6Class 11 Computer Science Chapter 4 Conditional And Iterative Statements Quiz 8Class 11 Computer Science Chapter 4 Conditional And Iterative Statements Quiz 9Class 11 Computer Science Chapter 4 Conditional And Iterative Statements Quiz 10Class 11 Computer Science Chapter 4 Conditional And Iterative Statements Quiz 11 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books