Extend it:

Use and store data in variables

Python Variables: Use and store data in variables

Now that we’ve learnt how to ask the user a question and store the answer they give in a variable, you can go back and make your code from the output activity slightly more ‘intelligent’ so that it reacts to what the user says.

Here’s a starting point for a chatbot.

Challenges:

There’s only one challenge this time but you can choose whatever questions you want your chatbot to ask.

You must ask at least 5 questions and save the answer to each question into different variables.

Page 1: Intro

Page 2: The theory: learn what you need to know as fast as possible.

Page 3: Try it: try out and adapt some working python code snippets.

Page 4: Debug it: Learn how to find and fix common mistakes.

Page 5: Extend it: Choose a project idea to use your newfound python skills.