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

Python Lab1 - Cyber Security

Uploaded by

HKR K
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)
2 views1 page

Python Lab1 - Cyber Security

Uploaded by

HKR K
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 Lab-1

1. Write a program to find simple interest.


2. write a program to find area of circle
3. Write a Python program to convert temperatures to and from Celsius and Fahrenheit.
4. Write a program to swap two numbers (with and without using third variable)
5. Write a program to check whether a person is eligible for voting or not (accept age from
user).
6. Write a program to check whether a number entered by user is even or odd.
7. Write a program to find Maximum of two numbers.
8. Write a program to check whether the last digit of a number (entered by user) is
divisible by 3 or not.
9. Write a program to find largest among three numbers.
10. Write a program to design the grading system.
11. A store gives discounts based on membership status and the amount spent. Members
spending over Rs.100 get a 10% discount, non-members spending over Rs.150 get a 5%
discount, and all others get no discount. Write a program to decide the discount based
on membership and purchase amount.
12. Write a program to print all the even number from 1 to 15.
13. Write a program to find factorial of a number.
14. Write a program to find number of digit in a number.
15. Write a program to check whether the given number if prime or not.
16. Write a program to generate all the prime numbers from 1 to 20.
17. Write a program to find reverse of number.
18. Write a program to find nth Fibonacci number.

You might also like