209k views
3 votes
Write a pseudocode program which asks the user to enter their favourite colour. It then calls a function which accepts the colour as a parameter and prints out a suitable comment. Test for at least 3 colours

What's the pseudocode

User Gurkan
by
6.9k points

1 Answer

3 votes

Answer:

START

DISPLAY " ENTER YOUR FAVORITE COLOR"

INPUT FAV COLOR

CALL FUNC PRINT COMMENT( FAV COLOR):

IF FAV COLOR == RED:

DISPLAY "YOU CHOOSE THE BEST COLOR"

IF FAV COLOR == ORANGE:

DISPLAY "YOU CHOOSE THE SECOND BEST COLOR"

IF FAV COLOR == YELLOW:

DISPLAY "YOU CHOOSE THE THIRD BEST COLOR"

END

Step-by-step explanation:

Remember Pseudo codes are the code that can be easily converted to programming language keywords. Or in other words, its easy to make a computer program out of them, like in the above display can be converted to print in python and so on.

User Krynio
by
7.6k points