0% found this document useful (0 votes)
2 views13 pages

Python Assignment1&2

The document contains assignments completed by student Shoaib Pathan, detailing various programming tasks. These tasks include checking if numbers are even or odd, determining if a shape is a square, calculating bonuses based on service years, finding the oldest and youngest among three people, and checking student attendance for exam eligibility. Additional assignments involve reversing numbers, calculating factorials, generating Fibonacci series, and checking properties of numbers like Armstrong, palindrome, and prime.

Uploaded by

jodshoaib786
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 views13 pages

Python Assignment1&2

The document contains assignments completed by student Shoaib Pathan, detailing various programming tasks. These tasks include checking if numbers are even or odd, determining if a shape is a square, calculating bonuses based on service years, finding the oldest and youngest among three people, and checking student attendance for exam eligibility. Additional assignments involve reversing numbers, calculating factorials, generating Fibonacci series, and checking properties of numbers like Armstrong, palindrome, and prime.

Uploaded by

jodshoaib786
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

Student Name :- Shoaib Pathan

Roll Number :- 50
Student ID :- 5593808
Class :- FYDS
Batch No. :- 2
Assignment 1
1. write a program to check entered number is even or odd.
Code:-

Output:-
2. Write a program to check whether entered length and
breadth is Square.
Code:-

Output:-
3. A Company decided to give bonus of 5% to employees if
his/her service is more than 5 years.
Code:-

Output:-
4. Among the age of 3 people entered by user determine oldest
and youngest.
Code:-

Output:-
5. To check whether a student is allowed to sit in exam or not
(By checking their attendance).
Code:-

Output:-
6. Write a program to input percentage from user and print the
grade.
Code:-

Output:-
Assignment 2
1. Write a program to reverse the given number.
Code:-

Output:-
2. Write a program to find factorial of a number.
Code:-

Output:-
3. Write a Python program to generate the Fibonacci series up
to n terms, using particular range also.
Code:-

Output:-
4. Write a Python program to check whether a given number is
an Armstrong number or not.
Code:-

Output:-
5. Write a Python program to check whether a given number is
a palindrome.
Code:-

Output:-
6. Write a Python program to check whether a given number is
a prime number or not.
Code:-

Output:-

You might also like