Assignment_3
Assignment_3
Take X = Your Roll No., Y = Your MIS No. and Z = Your Age
2. Check whether X is greater than Y ? If yes then print result " X is greater than Y" else
print "Y is greater than X"
3. Check values of X and Y for condition X>Y, X==Y and X<Y. Print Answer.
4. Write a program to check whether the given number is even or odd?
5. Write a program to check greatest value in X, Y and Z. (Assign new value to variable
Z)
6. Print veriable i as long as i is less than 8
7. Stop the above loop if i = 3.
8. Write a Program to print characters present in your name using for loop
9. Display numbers from 0 to 15 using for loop
10. Display odd numbers from 0 to 15 using for loop
11. Write a program to dispaly *'s in Right angled triangled form
12. Use break command if items in list do not satisfy condition? (condition: item >200)
Cart=[70,50,180,220,50,290]
13. Use continue command if items in list do not satisfy condition? (condition: item
>200)
Cart=[70,50,180,220,50,290]
14. Use break command if items in list do not satisfy condition otherwise print else
statement? (condition: item >200)
Cart=[70,50,80,20,50,90]
15. Write a program to create a function that takes your name and roll no, and print their
value.
16. Write a program to create function that can accept two variables and calculate
addition and subtraction
17. Python Program to calculate the area of a Tetrahedron
18. Python Program to Find the perimeter of a cylinder