Make a chatbot
This challenge has been written by EU Code Week Team and is part of the EU CODE WEEK CHALLENGES.
Target Audience
- Teachers
- Students (12-18)
Experience
- Advanced
Duration
- 1 hour
Recommended Materials
Purpose
- Code interactive riddles
- Use code to create dialogues between a chatbot and a user
Description
Code a conversation between a chatbot and a user who is trying to solve a riddle. Try to make a chatbot that can chat like a person. Instead of a riddle you can create a dialogue between a chatbot and a user.
Instructions
- Think of a riddle.
- Log in to Pencil Code or create a new account. (When creating a new account keep in mind that real names are not allowed on Pencil Code due to privacy reasons.)
- Click Imagine and Make your own.
- Use blocks or text-based mode to write your riddle.
- Alternatively, you can use this code 1 and adapt it to your riddle or you can select Answering a riddle from the menu and edit it .
Share the link to your work in your Instagram Bio: tap the Edit Profile button on your Instagram and add the link to your work in the Website field. After that, create a new post, add a screenshot of your work, write “Link in Bio”, add the hashtag #CodeWeekChallenge and mention @CodeWeekEU.
You prefer to share your challenge(s) on Facebook? EU Code Week will pin a new Challenge post on their Facebook page . You then just need to comment on the post with the link to your work.
Winners will be selected and offered Code Week goodies every day during Code Week between 9 – 24 October and announced on our Instagram and Facebook channels, so don't forget to check your notifications regularly.
You prefer to share your challenge(s) on Facebook? EU Code Week will pin a new Challenge post on their Facebook page . You then just need to comment on the post with the link to your work.
Winners will be selected and offered Code Week goodies every day during Code Week between 9 – 24 October and announced on our Instagram and Facebook channels, so don't forget to check your notifications regularly.
Complete all the Challenges
Challenge completed? Print the bingo card and mark the little white bubble on the top left
Share your Challenge on social media and win some cool Code Week prizes
Just upload a picture with the completed row(s), column(s) or even better - the whole bingo - to Facebook, Instagram or Twitter
Make sure to use the #CodeWeekChallengesBingo
Make sure to use the #CodeWeekChallengesBingo
Example
Check out this example of a riddle.
1. This code has been Adapted from Pencil Code activity Answering the Riddle
Click here to download this challenge as a word document.
Copyright notice ©
The EU Code Week website for schools is a service supported by the European Commission
Except where stated otherwise, content made available on this site is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license
Licensing under Creative Commons licenses does not of itself affect the ownership of the copyright
Content from third party websites is subject to their own copyright restrictions; please refer to the site of origin for more information.
The EU Code Week website for schools is a service supported by the European Commission
Except where stated otherwise, content made available on this site is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license
Licensing under Creative Commons licenses does not of itself affect the ownership of the copyright
Content from third party websites is subject to their own copyright restrictions; please refer to the site of origin for more information.