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

Python Programming Exercises

I want question paper
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)
14 views1 page

Python Programming Exercises

I want question paper
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

Programming assignment for Python - Module 1

Loops

1. Print natural numbers from 1 to a given number using while loop/ for loop.
2. Calculate the sum of all numbers from 1 to a given number
3. Print the multiplication table of a given number.
4. Count the total number of digits in a number.
5. Display numbers from -10 to -1 using for loop/while loop.
6. Determine whether a given number is prime or not.
7. Print all prime numbers within a range
8. Display Fibonacci series up to 10 terms
9. Find the factorial of a given number
10. Reverse an integer number ( eg if input is 4261, then output should be 1624)

Functions

1. Write a function to print a given name


2. Write a function to subtract 2 numbers
3. Write a function to return the division of 2 numbers. Use exception handling.
4. Write a function to convert kilometres to metres, return the value in meters
5. Write a function which takes the radius and returns area of a circle
6. Write a function to check if a given number is even or odd. Return value should be True
or False

You might also like