Assignment1 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

DATA505_PRP : Assignment 1

1. A five-digit number is entered through the keyboard. Write a program to obtain the
reversed number and to determine whether the original and reversed numbers are equal
or not.

2. Write a program to randomly generate numbers between the range 1 to 500 and display
those numbers that are divisible by 3 and 5.

3. Write a python code to test the logic as below:


a. A function isprime() to check if a given number is prime
b. A function that takes 3 parameters and prints them in ascending order (Example:
my_function(5,6,4) would result in 4,5,6)

4. Write a python program to generate the patterns below:

5. Write a python code to generate the figure below:

------- END OF DOCUMENT --------

You might also like