Vrindavan Public School
Lesson Plan
Sub- Computer Science
Class- 8 Teacher’s Name- AMIT MISHRA
Chapter Name More On Python Lesson 8
Number of Period Number of Lab Teacher’s Resource Student’s Resource
Required Periods
{including Lab
Periods}
7=4+3 3 Computer Lab Main Book
Projector Rooms Lab Book
Lab Notebook
Lesson Flow
Introduction Python Operators , Operator Precedence , Conditional Statements
Lab Activities Practical Name Remark
Input two nos and provide sum ,diff, and Calculator
multiplication of them in different lines.
Find the area of a triangle and print it. Area= 3.14* r*r
Check if the num. entered by user is Use if condition
divisible by 17.
Lab Based/ Case Study 1: Online Shopping Discount System
Application Based An online shopping website gives discounts based on the total bill amount:
Case Study Bill Amount (₹) Discount
Questions ≥ 2000 20%
≥ 1000 and < 2000 10%
< 1000 No Discount
Task:
Write a Python program using if–elif–else to calculate and print the final amount after
discount.
Project Based on Project 1: Smart Billing System for a Department Store.
Chapter Description:
Create a Python program that calculates the final bill amount after applying tax and
discounts.
Requirements:
Input: item price, quantity
Use arithmetic operators to calculate total
Use conditional statements:
If total ≥ 2000 → 15% discount
If total ≥ 1000 → 10% discount
Else no discount
Add GST: 5%
Display final payable amount
Expected Output:
A complete invoice with price, discount, GST, total.
Learning Outcomes 1. Understand Different Types of Operators
for the student. 2. Apply Operators in Real-Life Mathematical and Logical Expressions
{What student will 3. Understand Operator Precedence and Associativity
get from chapter?} 4. Use Conditional Statements for Decision Making
5. Develop Logical Thinking & Problem-Solving Skills
6. Write Practical Python Programs Using Conditions & Operators
7. Debug & Analyze Expressions and Conditional Code.
Guidelines for the Add Book Exercise answer key with this Lesson Plan while submission.
Teachers Add CCE Correction List of Both Book and Notebook.
Warm up
Q-1 a) Find the error in the following code and rewrite it.
Original:
if(age > 18)
print('You are eligible to vote')
else:
print('Not eligible to vote')
Ans- Corrected (add colon and proper indentation):
if age > 18:
print("You are eligible to vote")
else:
print("Not eligible to vote")
Q-1 Multiple choice (tick the correct option)
a)Which of the following conditional statements is used to test multiple conditions?
Answer: (iii) if...elif...else
b)What will be the output of the following code?
if(True):
print("Hello")
else:
print("Hi")
Answer: (i) Hello
c) Which of the following is not the conditional statement in Python?
Answer: (iii) if...elif...else Statement is actually a conditional statement, so the correct “not”
option in the intended list is (iv) None of these.
d) What is the answer of the expression, 222?
Answer: (ii) 16 (because it is evaluated as 2**(22) = 24 = 16)
e) If a = 20 and b = 10, then what will be the output of the following code?
if (False):
print(a + b)
else:
print(a - b)
Answer: (iii) 10
Q-2 Write ‘T’ for True and ‘F’ for False.
a) The if...else statement is the simplest conditional statement.
Answer: T
b) The if...elif...else ladder is not a conditional statement in Python.
Answer: F
c) The if statement executes a command if the provided condition evaluates to true.
Answer: T
d) The if...elif...else statement allows you to test multiple conditions.
Answer: T
Q-3 Fill in the blanks
Help box: Operators, unary, binary, +, *
a) The two types of arithmetic operators are unary and binary.
b) + operator can be used to concatenate strings.
c) * operator can be used to reprint the same string value again and again.
d) Indentation defines the body of the conditional statements in Python.
Q-4 Short answer type
a) What is operator precedence in Python?
Answer: Operator precedence is the set of rules that determines the order in which different
operators in an expression are evaluated.
b) What is the use of logical operators?
Answer: Logical operators (and, or, not) are used to combine or modify conditions and
control the flow of decision making in programs.
c) Write the syntax of the if...elif...else statement.
Answer:
if condition1:
statements
elif condition2:
statements
else:
statements
Q-5 Long answer type
a) What are the different types of conditional statements used in Python?
Answer: Python mainly uses if, if...else, and if...elif...else as conditional statements to control
the flow based on conditions.
b) What are the different types of arithmetic operators?
Answer: Arithmetic operators include addition (+), subtraction (-), multiplication (*),
division (/), floor division (//), modulus (%), and exponentiation (**), and they can be unary
or binary.
c) Explain the use of if...else statement with an example.
Answer: The if...else statement executes one block when a condition is true and another
when it is false, for example checking if a number is positive or not.
Activity time – outputs of programs
a)
a = 10
b = 20
if(a > b):
print(a)
else:
print(b)
Output: 20
b)
a = 100
if(1000 > a):
print(a)
else:
print("not a big number")
Output: 100
c)
a = int(input("Enter a First Number: "))
b = int(input("Enter a Second Number: "))
if a > b :
print("First number is greater than second number")
else:
print("Second number is greater than first number")
Output: Depends on the user input.
d)
num = 3.4
ifnum> 0:
print("Positive number")
elifnum == 0:
print("Zero")
else:
print("Negative number")
Output: Positive number