0% found this document useful (0 votes)
5 views

WS-4 Grade 7 Conditional Statements

This document is an ICT assignment for Grade 7 students at Bishop Scott Senior Secondary Girls' School, focusing on conditional statements in Python. It includes a series of questions requiring one-word or one-line answers related to Python syntax, decision-making, and conditional logic. The assignment aims to assess students' understanding of conditional statements and their application in programming.

Uploaded by

studyprisha1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

WS-4 Grade 7 Conditional Statements

This document is an ICT assignment for Grade 7 students at Bishop Scott Senior Secondary Girls' School, focusing on conditional statements in Python. It includes a series of questions requiring one-word or one-line answers related to Python syntax, decision-making, and conditional logic. The assignment aims to assess students' understanding of conditional statements and their application in programming.

Uploaded by

studyprisha1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

BISHOP SCOTT SENIOR SECONDARY GIRLS’ SCHOOL

GRADE-7 / ICT ASSIGNMENT -3 / (2024-25)


CHAPTER 10 : CONDITIONAL STATEMENTS IN PYTHON
NAME : ………………………………… Sec. : …………………….. Roll. No. : …………………………
Date of distribution : ………………………….. Date of submission : …………………………………..
One word or one line answers questions:-
If a=8,b=2 and c=20 ,then what will be the output of the following statements ?(Q1-Q5)

1. print (a>b and b<c)= ___________________________________.

2. print (a**b+c)=__________________________________________.

3. print (a,b,c )=____________________________________________.

4. print(a>b or b>c)=______________________________________.

5. print(a//b-2+c) = _______________________________________.

6. Decision making in python is done by using ______________________________________.

7. If the condition stands True then the _______________________or a collection of


____________________________within the If block is executed.

8. If a condition stands False then the control of execution is passed to the


____________________________________________________________________________________.

9. In Python the _____________________________value is interpreted as True.

10. In Python the _________________and ______________are interpreted as False.

11. In If ….else statement if the condition evaluates to True , the indented


block________________________________________________.

12. In If…..else statement if the condition evaluates to False, the indented block
________________________________________________________________________________.

13. The nested if statement means _________________________________________________________________________.

14. In the nested if statement, the second nested if indented block will run only when
__________________________________________________________________________________.

15. It helps us to test multiple conditions and follows a _____________________________________.

16. In the if….elif….else…ladder, as soon as the condition of the if evaluates to be true, the indented
block associated with their if is executed and the _____________________________is avoided.

17. In the if…elif…else ladder if the none conditions evaluates to true , then the final
____________________________________________.

18. Python allows nested ____________________________.

19. The if….elif…elif..else ladder helps us to test multiple conditions and ___________________________.

Page 1 of 4
20. What is the answer of the expression, 3**2**2?____________________.

21. The _______________________statement is the simplest conditional statement.

22. In Python, the non-zero value is interpreted as ____________________________.

23. Decision statements may give the result true or ____________________.

24. The __________________________block will be executed if and only if the provided condition evaluates to
false.

25. The conditional statements in Python decide the flow of program execution is also called
____________________________________.

26. a= 200, b=33

If b>a :

Print (“b is greatest than a”)

Else :

Print(“b is not greater than a ”)

( Output:_____________________________________.

27. Write the syntax of the if statement_______________________________________________.

28. Write the syntax of If…else statement______________________________________________.

29. Write the syntax of Nested If Statement____________________________________________.

30. Write the syntax of if….elif….elif..else


statement________________________________________________________________________.

31. What is the correct syntax for an if statement in Python?

(a) if (x > 10) { } (b) if x > 10: (c) if x > 10 then: (d) if (x > 10):

___________________________

32. How do you check for multiple conditions in a single if statement?

(a) if x > 10 and y < 5: (b) if x > 10 && y < 5: (c) if (x > 10) && (y < 5):
(d) if x > 10 & y < 5:
____________________________
33. How would you write an if statement that executes when x is not equal to 10?

(a) if x != 10: (b) if x =! 10: (c) if x <> 10: (d) if x not 10:
______________________________
34. Which keyword is used for executing a block of code if the if condition is false?

(a) else (b) otherwise (c) elif (d) except____________________________.

Page 2 of 4
35. How do you implement multiple conditions that trigger different blocks of code?
(a) if … elif … else (b) if … else if … else
(c) if … then … else (d) if … or … else
________________________________.

36. What is the output of the following code?


x = 10
if x > 10:
print("Greater")
elif x == 10:
print("Equal")
else:
print("Lesser")
(a) Greater (b) Equal (c) Lesser (d) No output
____________________________.

37. How do you write a one-line if statement in Python?

(a) if x > 10: print(x) (b) print(x) if x > 10


(c) print(x) where x > 10 (d) (print x) if x > 10
________________________________.

38. What is the correct way to check if a list is empty in an if statement?

(a) if len(my_list) == 0: (b) if my_list == []:


(c) if not my_list: (d) All of the above
___________________________________.

39. Can an if statement contain only an else clause without elif?

(a) Yes (b) No (c) Only inside a function


(d) Only if there is no code in the else clause
____________________________.

40. Which keyword allows you to check if a condition is false in an if statement?

(a) not (b) false (c) invert (d) negate


______________________________.
41. Difference between if and if…else statements is
____________________________________________________________________________________.
42. Is there any limit to statement that can appear under an If Block______________________.

43. Write the condition to check whether a number is divisible by 7 or not ________________________.

Page 3 of 4
44. Write a condition to check whether a number is even or odd _________________________.

45. Write a condition to check if a number is divisible by both 5 and 7 _______________________________.

46. Write a condition to check whether a number is positive or not_____________________________.

47. Write a condition in which age greater than 23 and experience greater than 8 then eligible else not
eligible ____________________________________________________________________________.

48. Write a condition for checking if marks is greater than 50 then pass else fail
_____________________________________________________________________________.

49. x = 5 if x > 10 result = "High" else "Low"


print(result)
Find Errors and give output.

____________________________________________________________________________________.

50. Give the output of the following

if '1':

print("Inside the if block") Output:______________________________________________________.

Page 4 of 4

You might also like