Conditional Statements & Loop
Conditional Statements & Loop
1. Write a Python program to find those numbers which are divisible by 7 and
fahrenheit.
fahrenheit ]
Expected Output :
45°F is 7 in Celsius
Note : User is prompted to enter a guess. If the user guesses wrong then the
prompt appears again until the guess is correct, on successful guess, user will
**
***
****
*****
****
***
**
4. Write a Python program to construct the following pattern, using a nested for
loop.
5. Write a Python program that accepts a word from the user and reverse it.
6. Write a Python program to count the number of even and odd numbers from a
Ambuja Foundation
1/561A, Mansarovar Park, GT Road, Shahdara, 110032
series of numbers.
Expected Output :
PYTHON
7. Write a Python program that prints each item and its corresponding type from
Sample List : datalist = [1452, 11.23, 1+2j, True, 'Python foundation', (0, -1), [5,
8. Write a Python program that prints all the numbers from 0 to 6 except 3 and 6.
Expected Output : 0 1 2 4 5
Every next number is found by adding up the two numbers before it.
Expected Output : 1 1 2 3 5 8 13 21 34
10. Write a Python program which iterates the integers from 1 to 50. For
multiples of three print "Fizz" instead of the number and for the multiples of five
print "Buzz". For numbers which are multiples of both three and five print
"FizzBuzz".
Sample Output :
fizzbuzz
fizz
4
Ambuja Foundation
1/561A, Mansarovar Park, GT Road, Shahdara, 110032
buzz
Ambuja Foundation
1/561A, Mansarovar Park, GT Road, Shahdara, 110032