Input two numbers and display the larger number.
- Details
- Category: 11th Class computer practicals
- Published: Friday, 11 June 2021 05:41
- Written by Super User
- Hits: 422
a=float(input('please enter first number'))
b=float(input('please enter second number'))
if(a>b):
print('first number is big')
else :
print('second number is big')
Explanation:-in this program we have taken 2 floating inputs and assigned them to 2 variables a and b . after that we have applied if decision construct in python to apply our logic. If a is greater than b then control will execute statements under if construct otherwise statements in else construct will execute. Program is self explanatory.