By the picture the name in Spanish for the color red is rojo or roja
Since there are 3 times more blue favorite kids, the ratio is
i am still a beginner in this but i hope it helps.add scanner object;declare string FavColour;print msg to ask user for inputscan input FavColour;print msg (" your favourite colour is " + FavColour)
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"
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.
So, I can't necessarily write this program for you. Firstly, that would be cheating. Secondly, I don't know the programming language you're using!
I can write some pseudocode to help guide you with this task!
Alright, so let's work on understanding the question...
We have to write some little thingy kabob which will have to evaluate input data, that data of which containing pairs of a name, and a favourite colour.
Then we have to print out the data, which will display the person's name and their favourite colour.
So, what can we already determine from this task?
We're going to need to gather input, then output that data.
What data are we collecting? How will we collect it, and how will we store it?
The data we're collecting is an individuals name (which they will enter from what I'm assuming will be the console), and we're going to collect their favourite colour.
This will come in pairs, and they need to be grouped together.
Now, let's reach the part you probably wish happened already. How will we do this?
Since I don't know your specific programming language, I can't tell you what functions or methods to use, but I can still help you.
You need to read their data. You need to use the function or method which will allow the user to input a piece of information, and then let that piece of information be stored.
One part which is unclear to me is this -
When does this program terminate? Will someone just enter their favourite colour with their name a certain amount of times, or will this be a continuous loop which will terminate when they say so? Figure this part out on your own! =)
Besides that, let's get back to the point. Thus far, we have:
prompt user input
What's next? Well, we need to re-route that input into a storage container. Depending on the language, they may call this a list or an array.
Now we have -
prompt user input
Alright, now what? Well, as mentioned earlier I don't know how this program is supposed to terminate, so you will have to figure that out on your own.
Anyways, let's discuss a bit more how we will store this data.
We need to probably assign a variable to the user's piece of data. A variable name would be something like name or favouriteColour.
Once that variable has a value, we need to plug it into our storage container. One of the ways to do this is to have two arrays. One array would be names and the other array would be favouriteColours.
Since the data would be stored in groups of pairs, index 0 of each array would hold the corresponding value. What I mean by this, is that index 0 in the names array will be the name of the person who has their favourite colour in index 0 of the favouriteColours array.
So, now that we have an idea of how to store the data, and you know when to terminate, we just need to print out the information we collect.
Since those arrays will have corresponding values, we would just need a loop that will continue until the last value in the array is met.
We would print out starting from index 0, and probably do it in the format of 'name: favouriteColour'.
Let's look at our final outline:
prompt user input
terminate input loop
Hopefully, this helps you! If you have more questions, just send me a private message and we can work together on writing this program. If I don't know the specific programming language, I can still try my best to help you. =)
write the answer in Spanish