Answer:
Program:
First_number = int(input("Enter first number")) # The first number is entered by the user.
second_number = int(input("Enter second number")) # The second number is entered by the user.
third_number = int(input("Enter Third number")) # The Third number is entered by the user.
if(First_number<second_number)and(second_number<third_number):# compare the first number with second number and the second number with the third number.
store ='A' # assign the 'A' value on store variable.
else:
store= 'D' # Assign the D value on store variable.
Output:
- If the user inputs 4,5,6 then store variable holds 'A'.
- If the user inputs 6,5,4 then store variable holds 'D'.
Step-by-step explanation:
- The above program is written in python language in which the first, second and the third line of the program is used to rendering the message to the user and take the inputs from the user and stored the value on First_number, second_number, and third_number after converting the value on int.
- Then the fourth line of the program is used to compare that the first number and second number are in ascending order or not and it also checks that the second number and third number are in ascending order or not.
- Then assign the 'A' character for the store variable if both the condition is true because it is separated by 'and' operator which gives true if both the condition is true.
- Otherwise, assign the 'D' character on the store variable.