You are on page 1of 2

Assignment 1

Name: Date:
Roll #: Marks: 25
1. Write a program to print the Fibonacci series till the number
enter by the user. The output should be look like this:
0, 1, 1, 2, 3, 5, 8, 13, 21, 34….
2. Print the diamond pattern using Nested for loop.
*
***
*****
*******
*****
***
*
3. Write a program in Python that takes price of a pen input
from the user and prints the price of 1, 2, 3, 4, 5, 6, 7, 8, 9 and
10 pens on the screen.
4. Ask user for temperature and humidity. If humidity is below
30 and temperature below 25 print “You can go for picnic”.
Otherwise, print “A day too hot for picnic”. (used nested if).
5. Write a program to find the number of days present in a
month and we know that during a leap year the number of
days will change. Ask the used to enter the year and month.

You might also like