0% found this document useful (0 votes)
5 views1 page

Python Lab Exercises for Beginners

The document outlines a Python lab assignment with six programming tasks. These tasks include calculating simple interest, computing BMI, swapping variable values, converting days into years and weeks, and demonstrating bitwise operators. The assignment is dated 22/08/2025.

Uploaded by

anshupal530
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)
5 views1 page

Python Lab Exercises for Beginners

The document outlines a Python lab assignment with six programming tasks. These tasks include calculating simple interest, computing BMI, swapping variable values, converting days into years and weeks, and demonstrating bitwise operators. The assignment is dated 22/08/2025.

Uploaded by

anshupal530
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

Python Lab 1

Date: 22/08/2025

1. Write a program that calculates and prints the simple interest. Take the principal, rate,
and time from the user as input.
2. Write a program that calculates the Body Mass Index (BMI) based on user's weight
and height.

Formula for BMI is weight in kilograms divided by height in meters squared.


3. Write a program that swaps the values of two variables using a temporary variable.
4. Write a program that swaps the values of two variables.
5. Write a program that converts a given number of days into years and weeks.
6. Wap that take two integers from the user and demonstrate the different bitwise operators:
bitwise AND, OR, XOR, NOT

You might also like