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

Python Assignment

This document provides examples of 11 Python programming assignments, including calculating the sum of numbers from 1 to a given number, counting digits in a number, printing a list in reverse order using a loop, displaying numbers from -10 to -1 using a for loop, finding the factorial of a given number, calculating the cube of numbers from 1 to a given number, finding the area of a triangle, converting Celsius to Fahrenheit, calculating simple interest, finding the area of a circle, and finding the sum of a list.

Uploaded by

shubham joshi
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)
49 views1 page

Python Assignment

This document provides examples of 11 Python programming assignments, including calculating the sum of numbers from 1 to a given number, counting digits in a number, printing a list in reverse order using a loop, displaying numbers from -10 to -1 using a for loop, finding the factorial of a given number, calculating the cube of numbers from 1 to a given number, finding the area of a triangle, converting Celsius to Fahrenheit, calculating simple interest, finding the area of a circle, and finding the sum of a list.

Uploaded by

shubham joshi
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
You are on page 1/ 1

Python Assignment

1. Python program to calculate the sum of all numbers from 1 to a given


number.
2. Python program to count the total number of digits in a number.
3. Print list in reverse order using a loop
4. Display numbers from -10 to -1 using for loop
5. Find the factorial of a given number
Example:- 5! = 5 × 4 × 3 × 2 × 1 = 120
6. Calculate the cube of all numbers from 1 to a given number
Example - input_number = 6

Expected output:

Current Number is : 1 and the cube is 1


Current Number is : 2 and the cube is 8
Current Number is : 3 and the cube is 27
Current Number is : 4 and the cube is 64
Current Number is : 5 and the cube is 125
Current Number is : 6 and the cube is 216

7. Python program to find the area of a triangle.


8. Python Program to Convert Celsius To Fahrenheit.
9. Python Program for simple interest
10.Python Program to find the area of a circle
11. Python Program to find sum of list

You might also like