Advertisements
Advertisements
Question
Write an algorithm that performs the following:
Ask a user to enter a number. If the number is between 5 and 15, write the word GREEN. If the number is between 15 and 25, write the word BLUE. if the number is between 25 and 35, write the word ORANGE. If it is any other number, write that ALL COLOURS ARE BEAUTIFUL.
Short/Brief Note
Advertisements
Solution
Input number
If 5 < number < 15 then
Print GREEN
elif 15 < number < 25then
Print BLUE
elif 25 < number < 35 then
Print ORANGE
else :
Print ALL COLOURS ARE BEAUTIFUL.shaalaa.com
Representation of Algorithms
Is there an error in this question or solution?
