0% found this document useful (0 votes)
6 views

Assignment_3

The document outlines a programming assignment consisting of various tasks involving input handling, conditional statements, loops, and functions in Python. Tasks include comparisons of variables, checking even/odd numbers, finding the greatest value, and manipulating lists with break and continue commands. Additionally, it includes calculations for geometric shapes and printing characters from a name.

Uploaded by

Dilip Radkar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Assignment_3

The document outlines a programming assignment consisting of various tasks involving input handling, conditional statements, loops, and functions in Python. Tasks include comparisons of variables, checking even/odd numbers, finding the greatest value, and manipulating lists with break and continue commands. Additionally, it includes calculations for geometric shapes and printing characters from a name.

Uploaded by

Dilip Radkar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment_3

Take X = Your Roll No., Y = Your MIS No. and Z = Your Age

1. Assign values to variable X and Y using input function

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

You might also like