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

Python Programming Assignment Tasks

The document outlines a Python assignment with various tasks including collecting personal information, swapping values, calculating areas, checking leap years, reversing numbers, implementing FizzBuzz, creating a shopping list, counting vowels, converting temperatures, and building a simple calculator. Each task specifies the required inputs and expected outputs. The assignment must be submitted by October 9, 2025.

Uploaded by

jagatthakur215
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)
8 views2 pages

Python Programming Assignment Tasks

The document outlines a Python assignment with various tasks including collecting personal information, swapping values, calculating areas, checking leap years, reversing numbers, implementing FizzBuzz, creating a shopping list, counting vowels, converting temperatures, and building a simple calculator. Each task specifies the required inputs and expected outputs. The assignment must be submitted by October 9, 2025.

Uploaded by

jagatthakur215
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

Python Assignment

Instructions
A. Write down your code in an assignment copy or a file.
B. Use `input()` wherever required.
C. Submit on or before 9 October 2025.

1. Personal Info
◦ Ask the user their name, age, and favorite color.
◦ Print a sentence like: 'Hello Rahul, you are 20 years old and your favorite color is
Blue.'
2. Swapping Values
◦ Take two numbers as input.
◦ Swap their values without using a third variable.
3. Area Calculator
◦ Ask user to choose: 1 → Circle, 2 → Rectangle, 3 → Triangle
◦ Then take the required inputs (radius / length, breadth / base, height).
◦ Print the area.
4. Leap Year Checker
◦ Take a year as input and check if it is a leap year or not.
5. Reverse a Number
◦ Take a number from the user.
◦ Print its reverse (e.g., 123 → 321).
6. FizzBuzz
◦ Print numbers from 1 to 30:
◦ Print 'Fizz' if divisible by 3
◦ Print 'Buzz' if divisible by 5
◦ Print 'FizzBuzz' if divisible by both
7. Shopping List
◦ Ask the user to enter 5 items (store in a list).
◦ Print the list.
◦ Print the list in reverse order.
8. Vowel Counter
◦ Take a string input from the user.
◦ Count how many vowels (a, e, i, o, u) are in it.
9. Temperature Converter
◦ Write a function c_to_f(c) that converts Celsius to Fahrenheit.
◦ Write another function f_to_c(f) that converts Fahrenheit to Celsius.
◦ Let the user pick which conversion they want.
10. Simple Calculator Function
◦ Define functions for add, subtract, multiply, divide.
◦ Let user pick an operation and enter two numbers.
◦ Print the result.

You might also like