Variable Stories with Scratch
  • 📃Introduction
  • 📚Teacher Guide
  • ✍️Learner Introduction Instructions
  • 🎲Activities
    • 1️⃣Learner Challenge 1
    • 2️⃣Learner Challenge 2
    • 3️⃣Learner Challenge 3
    • ➕Extension Challenge
Powered by GitBook
On this page
  1. Activities

Extension Challenge

PreviousLearner Challenge 3

Last updated 2 years ago

Challenge 1: Using lists in Scratch to create random stories.

A list is a type of variable that lets you store more than one piece of information inside. In this challenge, you can create a list of nouns, a list of verbs, a list of adjectives, and any other lists and then have your code pick one at random to complete your story.

Tips for doing this:

· In Variables you can make a list

· You can ask for a word to add to the list by using the ask block in Sensing and adding answer to your list

o When you want to use a random word in your story there are three things you must do:

o Create a variable to use in the story

o Use a random number block from Operators to get a word from a random place in your list

o Then set your story variable to be this random word

· Fill your lists when you click the green flag and tell your story when you hit space

· Can you hide your lists after you fill them?

Challenge 2: Code a mad lib using Python coding language.

You can write and execute python code using this free web-based editor, clicking <>Start Coding, and selecting python:

Tips for doing this:

· Can you use arrays to create random stories as above?

· Use to set the value of all of your variables – watch what type of information you’re gathering: string, integer, etc. This may affect how the story is shown

· Use the command to show your story once you’ve gathered all your information

Python Reference Documentation:

You can watch a basic tutorial here:

🎲
➕
https://repl.it/
input
print
https://www.w3schools.com/python/python_reference.asp
https://www.mikedane.com/programming-languages/python/building-a-mad-libs-game/