Python Foundation

+91-7982108418
`                          PYTHON CONDITIONAL STATEMENT & LOOP`
1. Write a Python program to find those numbers which are divisible by 7 and multiple of 5, between 1500 and 2700 (both included).
2. Write a Python program to convert temperatures to and from celsius, fahrenheit.
3. Write a Python program to guess a number between 1 to 9.
4. Write a Python program to construct the following pattern, using a nested for loop.

*

* *

* * *

* * * *

* * * * *

* * * *

* * *

* *

*

1. 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 series of

Sample numbers : numbers = (1, 2, 3, 4, 5, 6, 7, 8, 9)

1. Write a Python program that prints each item and its corresponding type from the following

Sample List : datalist = [1452, 11.23, 1+2j, True, ‘Python foundation’, (0, -1), [5,12], {“class”:’V’, “section”:’A’}]

1. Write a Python program that prints all the numbers from 0 to 6 except 3 and 6.
2. Write a Python program to get the Fibonacci series between 0 to 50.                                                                                          0, 1, 1, 2, 3, 5, 8, 13, 21, ….
3. 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”
4. Write a Python program which takes two digits m (row) and n (column) as input and generates a two-dimensional array. The element value in the i-th row and j-th column of the array should be i*j. ………
1. Write a Python program that accepts a sequence of lines (blank line to terminate) as input and prints the lines as output (all characters in lower case).
1. Write a Python program which accepts a sequence of comma separated 4 digit binary numbers as its input and print the numbers that are divisible by 5 in a comma separated sequence.

Sample Data : 0100,0011,1010,1001,1100,1001

1. Write a Python program that accepts a string and calculate the number of digits and letters.

Sample Data : Python 3.2

1. Write a Python program to check the validity of password input by users. Validation :
• At least 1 letter between [a-z] and 1 letter between [A-Z].
• At least 1 number between [0-9].
• At least 1 character from [\$#@].
• Minimum length 6
• Maximum length 16
1. Write a Python program to find numbers between 100 and 400 (both included) where each digit of a number is an even number. The numbers obtained should be printed in a comma-separated sequence.

17. Write a Python program to print alphabet pattern ‘A’.

1. Write a Python program to print alphabet pattern ‘D’.
1. Write a Python program to print alphabet pattern ‘E’.
1. Write a Python program to print alphabet pattern ‘G’.
1. Write a Python program to print alphabet pattern ‘L’.
1. Write a Python program to print alphabet pattern ‘M’.
1. Write a Python program to print alphabet pattern ‘O’.
1. Write a Python program to print alphabet pattern ‘T’.
1. Write a Python program to print alphabet pattern ‘U’.
1. Write a Python program to print alphabet pattern ‘X’.
1. Write a Python program to print alphabet pattern ‘Z’.
1. Write a Python program to calculate a dog’s age in dog’s Years.
1. Write a Python program to check whether an alphabet is a vowel or Consonant.
1. Write a Python program to convert month name to a number of Days
1. Write a Python program to sum of two given integers. However, if the sum is between 15 to 20 it will return 20.
1. Write a Python program to check a string represent an integer or not.
1. Write a Python program to check a triangle is equilateral, isosceles or Scalene.
1. Write a Python program that reads two integers representing a month and day and prints the season for that month and  day.
1. Write a Python program to display astrological sign for given date of birth.
1. Write a Python program to display the sign of the Chinese Zodiac for given year in which you were born.
1. Write a Python program to find the median of three values.
1. Write a Python program to get next day of a given date.
1. Write a Python program to calculate the sum and average of n integer numbers (input from the user). Input 0 to Finish.
1. Write a Python program to create the multiplication table (from 1 to 10) of a number.
1. Write a Python program to construct the following pattern, using a nested loop Number.