In a make task you use the skills you have learned to create a program from scratch. There is no starter code: you begin with an empty editor.
Lots of websites use chatbots to talk to their customers. Those chatbots are often very sophisticated and use AI to learn and adapt to the user. Yours is going to be a little bit simpler.
Write a chatbot that:
The questions are fixed, so that the answers arrive in a predictable order and
the lines your program prints can be checked automatically. Ask exactly these
four questions, in this order, each with its own print, followed by an
input() on the next line that collects the answer:
What is your name?What is your favourite colour?What is your favourite food?What is your favourite animal?The questions are part of the checked output, so spelling, capital letters and punctuation count. You can respond to each answer as soon as you have collected it, or collect all three answers first and then respond to each of them in turn. Either way works, as long as the questions are asked in the order above.
Your program must print exactly these nine lines, in this order. NAME,
COLOUR, FOOD and ANIMAL stand for whatever the user typed:
What is your name?
Hello NAME, nice to meet you!
What is your favourite colour?
COLOUR is a great colour, NAME.
What is your favourite food?
I like FOOD too, NAME.
What is your favourite animal?
Nice one, NAME. I would have picked ANIMAL as well.
So, NAME, your favourites are COLOUR, FOOD and ANIMAL.
Input:
Aisha
purple
pizza
otters
Output:
What is your name?
Hello Aisha, nice to meet you!
What is your favourite colour?
purple is a great colour, Aisha.
What is your favourite food?
I like pizza too, Aisha.
What is your favourite animal?
Nice one, Aisha. I would have picked otters as well.
So, Aisha, your favourites are purple, pizza and otters.
Input:
sam
dark green
fish and chips
Highland cow
Output:
What is your name?
Hello sam, nice to meet you!
What is your favourite colour?
dark green is a great colour, sam.
What is your favourite food?
I like fish and chips too, sam.
What is your favourite animal?
Nice one, sam. I would have picked Highland cow as well.
So, sam, your favourites are dark green, fish and chips and Highland cow.
(the answers are used exactly as they were typed, capital letters and all)
Make sure that you check for the following things:
input is assigned to a variable, or the answer is thrown away.+ between each string and variable that needs concatenating.