0% found this document useful (0 votes)
2 views2 pages

Day4 Python

The document outlines homework instructions for programming tasks related to conditional statements, including if statements, multiple conditions, boolean expressions, and nested conditions. It provides specific practice tasks for each topic, such as writing programs for determining eligibility to vote and grading systems based on marks. Additionally, it includes a temperature checker program and worksheet questions to reinforce understanding of the concepts.

Uploaded by

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

Day4 Python

The document outlines homework instructions for programming tasks related to conditional statements, including if statements, multiple conditions, boolean expressions, and nested conditions. It provides specific practice tasks for each topic, such as writing programs for determining eligibility to vote and grading systems based on marks. Additionally, it includes a temperature checker program and worksheet questions to reinforce understanding of the concepts.

Uploaded by

TECH-QUEEN
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

“Edit the same file, write the answers, save it, and submit your homework.

If you have any


queries, please ask me on WhatsApp; I will respond at the earliest.”

Time-Lapse from Video:

00:58:17 – 01:20:43

Topics:

If statements

Multiple conditions

Boolean expressions

Nested conditions

Temperature program
[Link]

Topic 1: If Statements
1. Practice Task 1 – Basic If
Write a program that:
Takes a number as input
Prints "Positive number" if the number is greater than 0
-----------------------------------------------------------------------------------------------------------------
2. Topic 2: Multiple Conditions
Practice Task 2 – If–Else
Write a program that:
Takes age as input
Prints "Eligible to vote" if age ≥ 18
Otherwise prints "Not eligible to vote"
------------------------------------------------------------------------------------------------------------
3. Topic 3: Boolean Expressions
Practice Task 3 – Boolean Check
Predict the output (True / False):
10 > 5 and 3 < 1
not (7 == 7)
5 >= 2 or 1 > 9
-------------------------------------------------------------------------------------------------------
4. Topic 4: Nested Conditions
Practice Task 4 – Grading System
Write a program that:
 Takes marks as input
 If marks ≥ 90 → Print "Grade A"
 Else if marks ≥ 70 → Print "Grade B"
 Else → Print "Grade C"
-------------------------------------------------------------------------------------------------------
5. Topic 5: Temperature Program (Video-Based Task)
Main Integrated Task – Temperature Checker
Problem Statement (Student Version):
Write a program that:
Asks the user to enter the temperature.
If temperature is greater than 30 → Print "It's a hot day"
If temperature is between 20 and 30 → Print "It's a pleasant day"
If temperature is less than 20 → Print "It's a cold day"
-------------------------------------------------------------------------------------------------------
6. Worksheet Questions (Concept Check)
7. What is a Boolean expression?
8. What is the difference between if and elif?
9. Why is indentation important in conditional statements?
10. When do we use nested conditions?

You might also like