Tel No. (+91) 7015535114

CONDITIONAL STATEMENT AND LOOPS IN PYTHON

Level 1


Question 1

Take two int values from user and find greatest among them.




Try YourSelf

View Solution

Video Solution

Question 2

Take length and breadth of a rectangle from user and check if it is a square or not.


Try YourSelf

View Solution

Video Solution

Question 3

Take input of age of 3 person and find out youngest and oldest.



Try YourSelf

View Solution

Video Solution

Question 4

Write a Python program to find those numbers which are divisible by 7 and multiple of 5, between 1500 and 2700 (both included).

Try YourSelf

View Solution

Video Solution

Level 2


Question 1

Write a program to print if the given number is a positive or a negative using elif statement.




Try YourSelf

View Solution

Video Solution

Question 2

Write a Python program to test whether a passed letter is a vowel or not.



Try YourSelf

View Solution

Video Solution

Question 3

Write a Python program to check whether year entered by user is a leap year or not.




Try YourSelf

View Solution

Video Solution

Question 4

Write a Python program that prints all the numbers from 0 to 6 except 3 and 6. Note : Use 'continue' statement. Expected Output : 0 1 2 4 5


Try YourSelf

View Solution

Video Solution

Level 3


Question 1

A shop will give discount of 10% if the cost of purchased quantity is more than 1000. Ask user for quantity Suppose, one unit will cost 100. Judge and print total cost for user.



Try YourSelf

View Solution

Video Solution

Question 2

A school has following rules for grading system:
a. Below 25 - F b. 25 to 45 - E c. 45 to 50 - D d. 50 to 60 - C e. 60 to 80 - B f. Above 80 - A
Ask user to enter marks and print the corresponding grade

Try YourSelf

View Solution

Video Solution

Question 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".

Try YourSelf

View Solution

Video Solution

Question 4

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).




Try YourSelf

View Solution

Video Solution

Level 4


Question 1

Write a Python program that accepts a string and calculate the number of digits and letters.
Sample Data : Python 3.2
Expected Output :
Letters 6 Digits 2





Try YourSelf

View Solution

Video Solution

Question 2

Write a Python program to check the validity of password input by users. Go to the editor 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 characters. Maximum length 16 characters.


Try YourSelf

View Solution

Video Solution

Question 3

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.




Try YourSelf

View Solution

Video Solution

Question 4

Write a Python program to calculate a dog's age in dog's years. Note: For the first two years, a dog year is equal to 10.5 human years. After that, each dog year equals 4 human years.





Try YourSelf

View Solution

Video Solution

Level 5


Question 1

Write a Python program to print alphabet pattern 'A'.


Try YourSelf

View Solution

Video Solution

Question 2

Write a Python program to print alphabet pattern 'D'


Try YourSelf

View Solution

Video Solution

Question 3

Write a Python program to print alphabet pattern 'E'.


Try YourSelf

View Solution

Video Solution

Question 4

Write a Python program to print alphabet pattern 'G'.


Try YourSelf

View Solution

Video Solution