Computer Science LearnITWithMrC ⛯ Year 7 Year 8 Year 9 GCSE
Responsive image

Picture it

What am I Learning today?

I am learning how to use selection in python with IF ELSE statements
I am learning how to get user input and output different results based upon a true or false condition
I am learning how to obtain data via user input in python

Knowledge Organiser

×

Lesson

Task 0 - Continuing our Adventure Click to see more

Last lesson we created an opening screen with some variables for our text adventure.

We are now going to add some more detail to our adventure sheet

If you didn't finish the code for the character attributes you can find it below the picture! Otherwise go to Task 1

Code

Here is the additional code you might need, you can use the line numbers to help you add this code in the correct place in your file


Lets try the following tasks:

Tick each task when you have successfully done it in the following list:

Complete the following tasks

Open your python file called 'My_Text_Adventure'



Task 1 - Pixel Art Masterpiece Click to see more

Objective: Create your own pixel art character and save it as a GIF file.
  • Guidelines:
    • Go to pixilart.com and design a character for your adventure.
    • Click on the image below to go to pixelart.com

    • Download your creation as a GIF file and ensure it is saved in the same folder as your Python project file, named "My_Text_Adventure".


    We will need to convert our image into a 161 x 161 pixel GIF in order for it to fit our Character Portrait box

    To adjust the size of your image go to

    and resize your GIF image to 161 x 161 pixels and then download it.
  • Outcome: You will create and download a personalized pixel art GIF, understanding how to integrate custom assets into their programming projects.

Task 2 - Picture Perfect Portraits Click to see more

Objective: Add your pixel art as the character's portrait in the Python program and handle any potential errors.

  • Guidelines:
    • Modify the existing code to display your pixel art in the portrait area using the turtle module.


    • Implement an exception to catch any errors if the GIF fails to load and display an appropriate message.

    Code


  • You will be able to integrate external media using exceptions for better code robustness.

Task 3 - Box It Up! Click to see more

Objective: Add decorative boxes around the character's attributes for a professional-looking character sheet.

  • Part 1:
    • Let's firstly use turtle to draw boxes around the class and race attributes on the character sheet.

    • Code


    • Part 2:
    • Now let's do the and draw boxes around the other attributes on the character sheet.

    • Code


    • Ensure the boxes are aligned and colored to enhance the sheet’s aesthetics.

  • Outcome: You will enhance your coding skills by practicing structured drawing with turtle and improving your program’s visual appeal.

Task 4 - Zigzag Finishing Touches Click to see more

Objective: Create a patterned zigzag at the bottom of the character sheet and add an option to clear the screen.

  • Guidelines:
    • Write a function to plot a zigzag pattern using turtle.
      • Let's firstly use turtle to draw boxes around the class and race attributes on the character sheet.

      • Code


      • Implement a user prompt with screen.textinput() to clear the screen when desired.
    • Outcome: you will develop more advanced turtle drawing techniques and implement interactive features to refine their user interface.

Task 5 - What are we aiming for? Click to see more

Task 4: Final Character Sheet

Next lesson we will be creating an image and adding it to our character sheet as well as making the whole thing more colourful and interesting.


Summing it all up

Lets look at the learning outcomes and decide which one best describes our current level of understanding :

Tick the one you feel is closest to your level

Learning Outcomes I need to learn how to get user input and output different results based upon a true or false condition

  • I have a basic understanding of how I can get user input and output different results based upon a true or false condition with a little help from my teacher
  • I can show my teacher that I can get user input and output different results based upon a true or false condition without their help.
  • I can get user input and output different results based upon a true or false condition independently and I can also explain it to others and can complete any extension tasks I am given.

🠜 Now update your learning objectivesClick on the Assessment image



My Notes: Text_Programming

Student_Comment_2 not found

Task Notes/Comments - Add here Click to see more

Comments/Notes