teachwithict
  • Home
  • Teaching & Learning
    • Tools for Teachers >
      • Web 2.0 >
        • Top 10 Web 2.0 Tools
        • Classroom Response Tools
      • Quiz Tools
      • Classroom Management Tools
      • Software >
        • Media Conversion Tools
        • Application Software
      • Multimedia >
        • Free Music
    • Digital Leaders >
      • Digital Leaders Blog >
        • DL Archive
      • DL Tips
      • Quotes
      • Links
    • BYOD
    • Flipped Learning >
      • Flipped Classroom vs. Blended Classroom
    • Gamification >
      • Gamification vs. Game Based Learning vs. Game Design
    • Game Based Learning >
      • Minecraft >
        • Minecraft in Education
        • Minecraft Lesson Ideas
        • Minecraft Literacy
        • Minecraft Coding Tutorials >
          • Minecraft Code Builder Setup
          • Minecraft Code: Walking on Air
          • Minecraft Code: Hello World
          • Minecraft Code: Functions
          • Minecraft Code: Rainbow
          • Minecraft Code: Skyscraper
          • Minecraft Pixel Art
    • The magic of >
      • The magic of Computing
      • The magic of Maths
      • The magic of Science
      • The magic of Literacy
    • Breakout Edu
    • PLN Challenge >
      • Covering your backside
      • Twitter Challenge >
        • Challenge 1
        • Challenge 2
        • Challenge 3
        • Tips for staying safe on Twitter
        • Tips for hosting Edu Twitter Chats
        • Tips for taking part in Twitter chats
        • How to storify a chat
        • How to schedule Tweets
        • Twitter Lists
        • It's all about the hashtag! Essential chats for educators
      • Facebook Challenge >
        • Challenge 4
        • Challenge 5
        • Challenge 6
        • Tips for staying safe on Facebook
      • Google Challenge >
        • Challenge 7
        • Challenge 8
        • Challenge 9
      • Pinterest Challenge >
        • Challenge 10
        • Challenge 11
        • Challenge 12
        • Tips for using Pinterest
      • Blog Challenge >
        • Challenge 13
        • Challenge 14
        • Challenge 15
        • How to create a classroom blog
      • Staffrm Challenge >
        • Challenge 16
        • Challenge 17
        • Challenge 18
      • Skype Challenge >
        • Challenge 19
        • Challenge 20
        • Challenge 21
      • Edmodo Challenge >
        • Challenge 22
        • Challenge 23
        • Challenge 24
      • TeachMeet Challenge >
        • Challenge 25
        • Challenge 26
        • Challenge 27
      • In-school challenge >
        • Challenge 28
        • Challenge 29
        • Challenge 30
      • 30 ways to grow your PLN
    • T&L Blog
  • Computing
    • Computing Blog >
      • GCSE Computer Science
      • General
    • CPD >
      • Blocks to Code
      • Tutorials >
        • How to embed Flash into PowerPoint
        • How to embed YouTube videos in to PowerPoint
        • How to create a wiki
        • How to create a classroom blog
    • Teaching Computer Science >
      • Schemes of Work
      • Programming Resources
      • Theory
      • Posters
    • Theory Lessons >
      • Theory Tests
      • Computer Hardware >
        • Input / Output
        • CPU
        • LMC
        • Storage Devices
        • Memory (RAM / ROM)
      • Binary Lessons >
        • Units of Data
        • Binary Representation
        • Binary Representation of Images
        • Binary Representation of Characters
        • Binary Representation of Sound
        • Binary Representation of Instructions
        • Binary Addition
        • Hexadecimal
      • Software >
        • Operating System
        • Types of Software
        • Utility Software
      • Programming >
        • Flowcharts
    • Game Design
    • App Creation
    • Digital Literacy >
      • Social Media (Good or Bad thing?)
      • Cyberbullying
      • Staying Safe Online
    • ICT Strand >
      • Spreadsheet Modelling
      • Superhero Movie Trailer
      • PowerPoint Task
      • Paint 3D Tutorial
    • Programming Lessons >
      • Microbit >
        • Magic 8 Ball
        • Harry Potter Sorting Hat
        • Music
        • Music (Festive)
        • Quick Start Guide
        • Microbit Simulator
      • TouchDevelop >
        • TouchDevelop Challenge
        • Scheme of Work
        • TouchDevelop Lessons >
          • 8 bit challenge
          • Turing Test
          • Turtle Power
          • 8 Ball
          • Under the hood
        • Tutorials
      • Raspberry Pi >
        • Networking the Pi
        • Minecraft Pi
        • Harry Potter Sorting Hat >
          • Harry Potter Sorting Hat (GPIO)
        • Raspberry Pi LTSP (Networked Classroom)
        • Astro Pi
      • Scratch
      • Python >
        • Chatbot
        • Coding Golf
        • Magic 8 ball
        • Python Mad Libs
        • Shakespearean Insult Generator >
          • Shakespearean Insult Generator Part 2
        • Sorting Hat
      • Little Man Computer
      • Hour of Code >
        • HoC 8-Bit Challenge
  • 21 Things
  • Microbit
    • Physical Computing >
      • micro:bit LEDs
  • About
  • Blog
  • Home
  • Teaching & Learning
    • Tools for Teachers >
      • Web 2.0 >
        • Top 10 Web 2.0 Tools
        • Classroom Response Tools
      • Quiz Tools
      • Classroom Management Tools
      • Software >
        • Media Conversion Tools
        • Application Software
      • Multimedia >
        • Free Music
    • Digital Leaders >
      • Digital Leaders Blog >
        • DL Archive
      • DL Tips
      • Quotes
      • Links
    • BYOD
    • Flipped Learning >
      • Flipped Classroom vs. Blended Classroom
    • Gamification >
      • Gamification vs. Game Based Learning vs. Game Design
    • Game Based Learning >
      • Minecraft >
        • Minecraft in Education
        • Minecraft Lesson Ideas
        • Minecraft Literacy
        • Minecraft Coding Tutorials >
          • Minecraft Code Builder Setup
          • Minecraft Code: Walking on Air
          • Minecraft Code: Hello World
          • Minecraft Code: Functions
          • Minecraft Code: Rainbow
          • Minecraft Code: Skyscraper
          • Minecraft Pixel Art
    • The magic of >
      • The magic of Computing
      • The magic of Maths
      • The magic of Science
      • The magic of Literacy
    • Breakout Edu
    • PLN Challenge >
      • Covering your backside
      • Twitter Challenge >
        • Challenge 1
        • Challenge 2
        • Challenge 3
        • Tips for staying safe on Twitter
        • Tips for hosting Edu Twitter Chats
        • Tips for taking part in Twitter chats
        • How to storify a chat
        • How to schedule Tweets
        • Twitter Lists
        • It's all about the hashtag! Essential chats for educators
      • Facebook Challenge >
        • Challenge 4
        • Challenge 5
        • Challenge 6
        • Tips for staying safe on Facebook
      • Google Challenge >
        • Challenge 7
        • Challenge 8
        • Challenge 9
      • Pinterest Challenge >
        • Challenge 10
        • Challenge 11
        • Challenge 12
        • Tips for using Pinterest
      • Blog Challenge >
        • Challenge 13
        • Challenge 14
        • Challenge 15
        • How to create a classroom blog
      • Staffrm Challenge >
        • Challenge 16
        • Challenge 17
        • Challenge 18
      • Skype Challenge >
        • Challenge 19
        • Challenge 20
        • Challenge 21
      • Edmodo Challenge >
        • Challenge 22
        • Challenge 23
        • Challenge 24
      • TeachMeet Challenge >
        • Challenge 25
        • Challenge 26
        • Challenge 27
      • In-school challenge >
        • Challenge 28
        • Challenge 29
        • Challenge 30
      • 30 ways to grow your PLN
    • T&L Blog
  • Computing
    • Computing Blog >
      • GCSE Computer Science
      • General
    • CPD >
      • Blocks to Code
      • Tutorials >
        • How to embed Flash into PowerPoint
        • How to embed YouTube videos in to PowerPoint
        • How to create a wiki
        • How to create a classroom blog
    • Teaching Computer Science >
      • Schemes of Work
      • Programming Resources
      • Theory
      • Posters
    • Theory Lessons >
      • Theory Tests
      • Computer Hardware >
        • Input / Output
        • CPU
        • LMC
        • Storage Devices
        • Memory (RAM / ROM)
      • Binary Lessons >
        • Units of Data
        • Binary Representation
        • Binary Representation of Images
        • Binary Representation of Characters
        • Binary Representation of Sound
        • Binary Representation of Instructions
        • Binary Addition
        • Hexadecimal
      • Software >
        • Operating System
        • Types of Software
        • Utility Software
      • Programming >
        • Flowcharts
    • Game Design
    • App Creation
    • Digital Literacy >
      • Social Media (Good or Bad thing?)
      • Cyberbullying
      • Staying Safe Online
    • ICT Strand >
      • Spreadsheet Modelling
      • Superhero Movie Trailer
      • PowerPoint Task
      • Paint 3D Tutorial
    • Programming Lessons >
      • Microbit >
        • Magic 8 Ball
        • Harry Potter Sorting Hat
        • Music
        • Music (Festive)
        • Quick Start Guide
        • Microbit Simulator
      • TouchDevelop >
        • TouchDevelop Challenge
        • Scheme of Work
        • TouchDevelop Lessons >
          • 8 bit challenge
          • Turing Test
          • Turtle Power
          • 8 Ball
          • Under the hood
        • Tutorials
      • Raspberry Pi >
        • Networking the Pi
        • Minecraft Pi
        • Harry Potter Sorting Hat >
          • Harry Potter Sorting Hat (GPIO)
        • Raspberry Pi LTSP (Networked Classroom)
        • Astro Pi
      • Scratch
      • Python >
        • Chatbot
        • Coding Golf
        • Magic 8 ball
        • Python Mad Libs
        • Shakespearean Insult Generator >
          • Shakespearean Insult Generator Part 2
        • Sorting Hat
      • Little Man Computer
      • Hour of Code >
        • HoC 8-Bit Challenge
  • 21 Things
  • Microbit
    • Physical Computing >
      • micro:bit LEDs
  • About
  • Blog
Search by typing & pressing enter

YOUR CART

Creating a Shakespearen Insult Generator – Part 1 (Python Tutorial)

Like this lesson? Share it with your followers by clicking on the image below.
Picture
Suggested time: 60 mins

Learning Objectives:

  • Understand and use sequence in an algorithm
  • Understand and use iteration in an algorithm (FOR and WHILE loops)
  • Understand and use selection in an algorithm (IF, Else and Else if)
  • Understand and use data structures in an algorithm (for example, Lists, Tables or Arrays)


Curriculum Mapping:

KS2:

  • Design, write and debug programs that accomplish specific goals; solve problems by breaking them into smaller parts. Select, use and combine a variety of software on a range of digital devices to design and create a range of programs.
  • Use sequence, selection and repetition in programs; work with variables and various forms of input and output
  • Use logical reasoning to explain how some simple algorithms work; detect and correct errors in algorithms and programs


KS3:

  • Use two or more programming languages, at least one of which is textual, to solve a variety of computational problems. 
  • Make appropriate use of data structures [for example, lists, tables or arrays]; design and develop modular programs that use procedures or functions

Introduction:

How to make an Insult

To make an insult, pick one word from each of the columns (below), combine them to make a sentence and add the word “Thou” at the beginning. For example: If we were to take the first word from each of the 3 columns we would get:
“Thou artless base-court apple-john”

Column 1

Column 2

Column 3

artless
bawdy
beslubbering
bootless
churlish
cockered
clouted
craven
currish
dankish
dissembling
droning
errant
fawning
fobbing
froward
frothy
gleeking
goatish
gorbellied
impertinent
infectious
jarring
loggerheaded
lumpish
mammering
mangled
mewling
paunchy
pribbling
puking
puny
quailing
rank
reeky
roguish
ruttish
saucy
spleeny
spongy
surly
tottering
unmuzzled
vain
venomed
villainous
warped
wayward
weedy
yeasty

base-court
bat-fowling
beef-witted
beetle-headed
boil-brained
clapper-clawed
clay-brained
common-kissing
crook-pated
dismal-dreaming
dizzy-eyed
doghearted
dread-bolted
earth-vexing
elf-skinned
fat-kidneyed
fen-sucked
flap-mouthed
fly-bitten
folly-fallen
fool-born
full-gorged
guts-griping
half-faced
hasty-witted
hedge-born
hell-hated
idle-headed
ill-breeding
ill-nurtured
knotty-pated
milk-livered
motley-minded
onion-eyed
plume-plucked
pottle-deep
pox-marked
reeling-ripe
rough-hewn
rude-growing
rump-fed
shard-borne
sheep-biting
spur-galled
swag-bellied
tardy-gaited
tickle-brained
toad-spotted
urchin-snouted
weather-bitten

apple-john
baggage
barnacle
bladder
boar-pig
bugbear
bum-bailey
canker-blossom
clack-dish
clotpole
coxcomb
codpiece
death-token
dewberry
flap-dragon
flax-wench
flirt-gill
foot-licker
fustilarian
giglet
gudgeon
haggard
harpy
hedge-pig
horn-beast
hugger-mugger
jolthead
lewdster
lout
maggot-pie
malt-worm
mammet
measle
minnow
miscreant
moldwarp
mumble-news
nut-hook
pigeon-egg
pignut
puttock
pumpion
ratsbane
scut
skainsmate
strumpet
varlet
vassal
whey-face
wagtail


Lesson Outline:

In this lesson, students are going to create a Shakespearean Insult generator using lists in Python.


Starter:

Show students the online Shakespearean Insult generator (http://www.pangloss.com/seidel/Shaker/) or display a couple of random insults on the board as students enter the room e.g.
“Thou rank milk-livered malt-worm”

“Thou puny fly-bitten lout”

Explain to students that they are going to create their very own Shakespearean Insult generator using Python. 


Activity 1: Introducing the Random Function

Before students create their Shakespearean insult generator, they need to become familiar with the random function in Python. 

Tell students that they are going to write an algorithm to simulate the flipping of a coin.

Instruct students to type in and run the following code:

import random

cointoss = random.randint(1,2)

if cointoss == 1:
    print("Heads")
else:
    print("Tails")



Ask students to comment the code, using the hashtag (#), explaining what the code is doing.


Extension:

Ask students to modify the code to simulate the rolling of a dice i.e. if the random function returns a 6, print the word “Six”.


Activity 2: Creating a random “Minion” name creator

Next, explain to students that they are going to create a random name picker and this will form the basis of their Shakespearean Insult generator.

1. Instruct students to type in and run the following code:
import random

names = ["Bob", "Dave", "Stuart"]

print(names[random.randint(0,2)])


Ask students to comment their code, using the hashtag (#), explaining what the code is doing and why the random generator is returning a value between 0 and 2 rather than 1 and 3.

Explain to students that lists start at 0 NOT 1.

e.g. if we were to run the following code:

print(names[0])

The computer would return the name “Bob”


2. Ask the students to replace the last line with the following new code:

print(random.choice(names))

Ask students to run the new script and explain what the new code does.
 
3. Finally, inform students that we need to add (concatenate) the word “Minion” at the beginning of our randomly selected name.

Ask students to replace the last line with the following:
print(“Minion” + “ “ + random.choice(names))

Ask students to run the new script and explain what the new code does.


Extension:

Ask students to add more names to the list.


Activity 3: Creating the Insult generator

Explain to students how the online Shakespearean Insult generator works (see introduction) and direct them to the Shakespearean Insult toolkit (http://www.pangloss.com/seidel/shake_rule.html)

Instruct students to, using what they have learnt and using the resources at their disposal, create their very own Shakespearean Insult generator. Tell students that they will need to use lists and that they will also need to use the random function. 

Tip: If you prefer, you may wish to provide students with a template with the lists already created (see below) – this will save the students from having to type all the words. You can then ask the students to add a fourth list with alternate sentence starters e.g. “Thou”, “Thee”, “Ye Olde” etc.
shakespearean_insult_template.py
File Size: 1 kb
File Type: py
Download File

Example Solutions

insult_creator_v1.py
File Size: 2 kb
File Type: py
Download File



Extension: Tkinter

Tkinter is the default GUI that is shipped with Python. With tkinter, it is easy to create GUIs to use with your Python code such as windows and buttons.

Picture
1. Ask students to download and run the following code:

insult_creator_v2_tkinter.py
File Size: 2 kb
File Type: py
Download File



2. Ask students to comment their code, using the hashtag (#), explaining what the code is doing

Alternative:

Alternatively, you could ask students to create a random compliments generator.

 
Next: Part 2 – File handling


You may also be interested in:
  • Python Mad Libs
  • Python Chat Bot
  • Code Golf
  • Python Sorting Hat
  • Python Magic 8-Ball ​

Licence:

Unless otherwise specified, everything in this repository is covered by the following licence:
Picture
The Shakespearean Insult Generator is licenced under a Creative Commons Attribution 4.0 International License.

Based on the Shakespearean Insulter: http://www.pangloss.com/seidel/Shaker/

Tags: programming language python, python programming language, python coding language, programming languages python, python code language, python programming language example, what is the python programming language, python scripting, python language tutorial, what type of programming language is Python, python class, python how to learn, learn python, learn python from scratch, where to learn Python, coding on computer, computer coding,  best place to learn coding online, online coding, online code, computer programming and Coding, hour of code program, computer science degree programs, programs for computer science, what does coding mean in computers, how does computer code work, what is computer programmer.
Powered by Create your own unique website with customizable templates.