Question

Write a python program to find the largest of three numbers

Hint: Use if and elif

Program:

 

Explanation:

Three numbers are accepted from the user ‘nos1′,’nos2′,’nos3’.

First ‘nos1’ is checked.If it is greater than both ‘nos2’ and ‘nos3’, then ‘large’ is allocated wth the value of ‘nos1’

Otherwise ‘nos2’ is checked. If it is greater than both ‘nos1’ and ‘nos2’,then ‘large’ is allocated with the value of ‘nos2’

Otherwise ‘large’ is allocated with ‘nos3’

Output:

Do share your feedback in comments to help us adding more programs like this.

Checkout more Python Programs

Click here

Leave a Reply

bodrum escort - eskişehir esc - mersin escort - mersin escort bayan - mersin esc