Year 7 Coding CAT 2

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

MOOROOLBARK

COLLEGE
PERSONAL DETAILS

Name:

Form:

Teacher’s Name:

Year 7 Coding CAT 2 2024


CAT 2: Writing a Mad-Libs Story in Python
DUE DATE: ________________
Structure of assessment

Component Description of component Number of marks


1 Correctness 5
2 User Interface and Clarity 5
3 Story Generation 5
4 Code Structure and Organization 5

TOTAL 20

Materials
 Students are permitted to bring into the CAT room materials they require in order to complete the
CAT.
 It is the student’s responsibility to have all the necessary materials to complete the assessment
task. There is to be NO sharing of materials.
Instructions
 Write your name, form and your teacher’s name in the sections provided.
 All written responses must be in English

Rules
 Students must know and understand all rules listed in the Mooroolbark College Code of
Conduct.

Students are NOT permitted to bring mobile phones and/or any other electronic communication
devices (including smart watches) into the CAT room.
Year 7 Coding CAT 2 – Writing a Mad-Libs Story in Python
This CAT requires you to write a script in Python to create a Mad Libs story, where you will input a series of
adjectives, nouns, verbs, and adverbs, and produce a singular output creating a story with those inputs.

Task: Writing a Mad-Libs Story in Python


Your task is to create a Python program that generates a Mad Libs-style story by taking user inputs for various parts
of speech (e.g., nouns, verbs, adjectives) and inserting them into a predefined story template. This requires you to
input the correct number of adjectives, nouns, verbs, and adverbs. Once the words are substituted into the story, the
entire story is then printed to the screen.

The predefined story template reads as such:

Once upon a [adjective] time, in a [noun] far, far away, there was a [adjective] [noun]. This [noun] had a
special ability to [verb] [adverb]. One day, the [noun] decided to [verb] to the top of the [noun] to find a
[adjective] [noun]. Along the way, the [noun] encountered a [adjective] [noun] who [verb] [adverb]. Together,
they [verb] to overcome the [adjective] challenges that lay ahead.

The requirements for your Python program are:

 Create a Python script or program for the Mad Libs story generator.
 The program should start by providing a brief introduction or explanation of the game to the user.
 Prompt the user to input words for each blank category (which includes nouns, verbs, adjectives, and
adverbs, or others as you choose), ensuring that the input is appropriate for the specified part of speech.
 Replace the blanks in the story template with the user's inputs.
 Display the completed Mad Libs story to the user.
 Make sure the program is user-friendly, providing clear prompts and instructions.

Enhanced User Experience:

 Using a timer to slow the input for the user to make the story more engaging
 Using validation to check for user input starting with vowels for the correct use of a or an

Your submission will be evaluated based on the following criteria:

 Correctness of the program's logic and functionality.


o Program runs correctly
 User-friendliness and clarity of prompts.
o Easy to read
o Prompts make sense
 Proper handling of user input, ensuring it aligns with the specified part of speech.
o Variable use naming convention
 Creativity and humor in the generated Mad Libs story.
 Overall code structure and organisation.
o Use of comments
o Lines not too long
CAT Rubric (Total Marks: 20)
Not Completed
High Medium Low
(0 marks)
(5 marks) (3 marks) (1 mark)

The program runs error-free, demonstrating a


Programs generally run with occasional minor
strong grasp of Python syntax. Program runs with noticeable errors that
Correctness errors that do not significantly impact overall Not shown.
significantly hinder functionality.
functionality.
Use of validation for a / an

The program provides a clear and engaging Mad Lack of clear or engaging Mad Libs introduction
The program offers a basic introduction to Mad
Libs introduction, ensuring user understanding of causes user confusion.
User Interface and Libs but lacks some details or engaging elements.
purpose and mechanics. Unclear prompts make it challenging for users to Not shown.
Clarity Prompts for user input are generally clear, as is
understand required input. User Interface is
the user interface.
Prompts are clear and the user interface is clear. cramped or messy.

Program effortlessly replaces blanks with user


Program successfully replaces blanks in the story
inputs, crafting a cohesive and grammatically
template, but occasional grammatical issues or
correct narrative.
inconsistencies may arise in the generated
narrative. Struggles in replacing blanks result in a narrative
Completed Mad Libs story is displayed in a
Story Generation lacking cohesion and containing noticeable Not shown.
visually appealing and organized format.
Completed Mad Libs story is displayed in a grammatical errors.
generally readable format, with minor formatting
Timers are used to enhance user experience.
issues.

Has added original content to the story.

The code is exceptionally well-organised with Code is generally well-organised with some
clear comments for enhanced understanding. comments providing clarity.
Code lacks organization.
Code Structure and
Minimal or unclear comments. Not shown.
Organization Lines of code are not too long. Variable names are mostly descriptive and follow
a naming convention.
Variable names are sensible.

You might also like