Creative Writing with Programming

LESSON – Creative Writing with programming

Lesson Objectives

  • Using programming skills to write a story

Success Criteria

  • Capture input data and store in a┬ávariable
  • Compare input value to create selection
  • Using┬ábasic data types, string, integer, float and Boolean to create working program.

Keywords

  • Input
  • Selection
  • Variable
  • Output

Commands

  • input()
  • if :
  • elif :
  • else :

Starter

What do you think, what will happen next?

‘Is that The Mountain?’ asked Bilbo in a solemn voice, looking at it with round eyes. He had never seen a thing that looked so big before.

What do you think how this story should continue. Write your own version of The Hobbit. Show your true imagination and be creative. Try to remember the original story if you have read the story or watched the film sequels.

You will share your story with the class

Task 1 – Write the following program

Use script mode in python and create above program. Save it in your python folder as story.py and run (F5) it.
And see what the program does? And discuss how you can improve it with the person next to you.

Task 2 – Modify your program

Modify the program that you have just written to continue with the story.

  • You can introduce a hero character to your story
  • or you can have a friendly ogre to ask questions to direct you to your destination
  • else the door will lead you to unknown dungeon where the hidden treasures and gems are with some dangerous obstacles along the way
  • you can have as much as levels to your story make it interesting and make it people curious for the next stage of your story.
  • be creative and be fearless!
  • Do not forget to use
    • variable name for your new questions
    • use input() function to prompt questions and answers
    • also Boolean operators
    • ==
    • <
    • >
    • and if statements
    • if ….:
    • elif ..:
    • else :
    • finally print() function to print responses or output of the actions on screen

  • Once you have finished with your story, save as mystory.py in your python folder and run (F5) it.

    Task 3 – Do further modification

    Modify your program even further checking knowledge of the user to carry on with your story.

    • Include a quiz in your story and let the reader to go different direction in the story depending to their given answers
    • For example if the person answers all your questions correctly you will reward them with a safe root map to the hidden treasures. Otherwise the person will end up fighting with a dragon who protects the treasures.
    • Be imaginative beyond everyone’s expectation.

    Once you have finished with your story, save as mystory.py in your python folder and run (F5) it.

    Home learning – due in in two weeks

    Follow the instructions on the home learning document and complete your task, if you having problem understating the task you need to see me before the due date.
    You need to write a quiz program on a paper (You do not need to use Python for this activity)
    Download your Home Learning by clicking here due in week of 2nd May 2017
    You can also find this homework in your Show My Homework account.
    Use the below links to help you with your task
    if-else
    if-elif-else