The document outlines a Day-4 lab session focused on Python control statements, with a minimum of two labs assigned by the teacher. It includes assignments such as checking for leap years, finding the largest of three numbers, determining if a number is positive, negative, or zero, calculating discounts on toy orders based on product codes, and fare calculations for a transport company based on distance. Each assignment is designed to enhance understanding of control statements in Python programming.
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 ratings0% found this document useful (0 votes)
37 views1 page
Day - 4 Lab (Control Statements)
The document outlines a Day-4 lab session focused on Python control statements, with a minimum of two labs assigned by the teacher. It includes assignments such as checking for leap years, finding the largest of three numbers, determining if a number is positive, negative, or zero, calculating discounts on toy orders based on product codes, and fare calculations for a transport company based on distance. Each assignment is designed to enhance understanding of control statements in Python programming.
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/ 1
Day-4 Lab
(PN: Teacher should assign minimum 2 labs)
In this lab session we will understand the python control statements.
Assignment:
1. Python program to check leap year
2. Python Program to Find the Largest Among Three Numbers 3. Python Program to Check if a Number is Positive, Negative or 0 4. A toy vendor supplies three types of toys: Battery Based Toys, Key-based Toys, and Electrical Charging Based Toys. The vendor gives a discount of 10% on orders for battery-based toys if the order is for more than Rs. 1000. On orders of more than Rs. 100 for key-based toys, a discount of 5% is given, and a discount of 10% is given on orders for electrical charging based toys of value more than Rs. 500. Assume that the numeric codes 1,2 and 3 are used for battery based toys, key-based toys, and electrical charging based toys respectively. Write a program that reads the product code and the order amount and prints out the net amount that the customer is required to pay after the discount. 5. A transport company charges the fare according to following table:
Ingleside Reviews’ Ultimate Guide to Electronics & Gadgets: Making Smart, Cost-Effective Choices: Ingleside Reviews’ Comprehensive Lifestyle Library: Your Ultimate Resource for Modern Living., #1