HOGWARTS SCHOOL OF WITCHCRAFT AND WIZARDRY PREPARES FOR DUELS. Grupptentamen i Programmeringsparadigm

Similar documents
DUMBLEDORE S ARMY VIMUNC I MARCH 21ST TO 22ND, 2014 HOSTED AT LANGLEY HIGH SCHOOL. 1 P a g e

Carnegie Mellon University Spring Programming Competition

Sample file. Authors: Crystal and Thomas Rende Cover Illustrator: Heather Tang. Novel Ideas Harry Potter and the Chamber of Secrets

SVENSKA STÅNDPUNKTER REGIONAL RADIOCOMMUNICATION CONFERENCE RRC-04

CHAPTER IV FINDINGS AND DISCUSSION

(10 th form, Home Reading Lesson)

SVENSK STANDARD SS ISO 10957:2010

3. Speaking task: as the pairs visit each poster they should. a) Identify the movie. b) Name any characters they can

Library Lessons. by Lynne Farrell Stover. Harry Potter and the Order of the Phoenix. Lesson 1: Phone Spell

Identifiering och beskrivning Internationellt standardnummer för böcker (ISBN) (ISO 2108:2005, IDT)

The Deathly Hallows. Library Lessons. by Lynne Farrell Stover. Harry Potter and the Deathly Hallows by J. K. Rowling. Lesson 1: Wizard World Wisdom

You re a Divergent, Harry

The Cure. I saved a Gryffindor from the hatred and prejudice of the Muggle World Hermione. I wonder why you never did anything about that.

SVENSK STANDARD SS

Literacy Skills Teacher's Guide for Harry Potter and the Half-Blood Prince by J.K. Rowling

Amazon books Kids Love Books

The Hero. Harry Potter

SVENSK STANDARD SS-ISO :2009

who entered my world and did beautiful things there. J.K. Rowling For Joe, Louis, Max, Sonny, and Merle... wizards all...

---===ooooooooo===---

DOWNLOAD OR READ : NINE DRAGONS A BEATRIX ROSE THRILLER HONG KONG STORIES VOLUME 1 BEATRIX ROSES HONG KONG STORIES BOOK 2 PDF EBOOK EPUB MOBI

EXAMENSARBETE. We don t need no education. A study on the motivational effects of cultural media in ESOL education. Fredrik Erlandsson

A Harry Potter Christmas Carol

ISSN Galaxy: International Multidisciplinary Research Journal Bi-Monthly Refereed and Indexed Open Access ejournal

Triwizard Redoux. DrT

The Defense Professor Chapter 1: Chapter 1

CHAPTER IV RESEARCH FINDING. Secret movie script, the syntactical realized of the expressive speech acts that were

By Zoe, Laila, Chloe, and Franca

Sample file. Authors: Crystal and Thomas Rende Cover Illustrator: Heather Tang. Novel Ideas Harry Potter and the Order of the Phoenix

The Object Lessons Trilogy Going For A Glass Of Water

DOWNLOAD OR READ : THE UNOFFICIAL HARRY POTTER INSULTS HANDBOOK 101 COMEBACKS FOR THE SLYTHERIN IN YOUR LIFE PDF EBOOK EPUB MOBI

Harry Potter competition

Blueprint A, 3.0. Ett utdrag från sidorna från huvudboken, BLUEPRINT A, 3.0. Så här arbetar du med provlektionen:

Compression efficiency of different picture coding structures in High Efficiency Video Coding (HEVC)

Harry Potter and Chamber of Secret

Harry Potter and the Sorcerer s Stone

Institutionen för datavetenskap Department of Computer and Information Science

ANDREAS REJBRAND Harry Potter The Harry Potter movies a profound subjective analysis

Harry Potter 2011 Final Copy Page 1 of 7 12/12/2011

Dokumentation Förvaringskrav för arkivoch biblioteksmaterial (ISO 11799:2003, IDT)

Contents. Harry Potter - a story of success An Online-Chat with J K Rowling. Three-Quarters. Taking a closer look at the book and the film

Educating the Young Wizard

The Present-day Composer: Performing Individuality and Producing on Commission

The digital heart of the Wizarding World.

The digital heart of the Wizarding World.

Mobile Math Teachers Circle The Return of the iclicker

Small bowls with pretzels will be on each table for the kids to snack on throughout the service too.]

Harry Potter and the Deathly Hallows Part VI by Rilian Holden. Based on the book By JK Rowling

Improbable History A Dog and his Boy

DOWNLOAD PDF IF HARRY POTTER RAN GENERAL ELECTRIC

Order Of The Phoenix Book Review ->->->->

Summary: This is the sequel to First Day of class where Sirius was never arrested and was able to

The Folk Trad Orality Method within Higher education Susanne Rosenberg, KMH

Harry Potter and. Literature Guide. For. by J.K. Rowling. Student - Lesson 1

Blaze of Glory. Monday Morning

Like A Phoenix From The Ashes Prologue

Place Metaphor in Digital Television

Part One of the Draco Trilogy

Harry Potter and the Narrative Causality HPNC

About this Pathfinder

Harry Potter and the Marriage Contracts. Clell65619

Sebastian Hilli. Paraphrase. for oboe, clarinet, piano and double bass

Suggested fingering for keyboards

Electronic music and sound spatialization in contemporary theatre performances

Mail-Order Brides Of America: Iowa Destiny (A Clean Western Historical Romance) By Zoe Matthews

Well, what about Weasley? You were dating her last year. I was, he agreed. But not any more.

Harry's Second Chance. DrT

A Magical Vacation? Preparatory Reading TALKING ABOUT TRAVEL, PAST SIMPLE TENSE ADJECTIVES, ASKING FOLLOW-UP QUESTIONS

The role of Fred and George Weasley in the Harry Potter books

Gold Tinted Spectacles

Chances Guess Who Just Got Back Today

Screen for the modern workplace

Chapter Six: Data Analysis

Reference Management with. EndNote X8 Mac. Guide for Students & Researchers

Syntax Exercises. Consider the following stanza from Lewis Carroll's poem "Jabberwocky":

what it meant. Headmaster Dumbledore came striding up to the frozen tableau. Hoping the ancient wizard could help her understand what was going on,

CITATION METRICS WORKSHOP (WEB of SCIENCE)

Unit of Study: Shakespeare vs. Modern Day. some of the most memorable and timeless stories, which everyone has heard of. The

HARRY POTTER AND THE ADAMANTINE GATE By Jitterbug Perfume

Charts for A Writer s Guide to Harry Potter

SVENSK STANDARD SS-ISO 9230:2007. Dokumentation Bestämning av prisindex för tryckta och elektroniska media inköpta av bibliotek (ISO 9230:2007, IDT)

Perfect Slytherins - Tales From The Second Year Part 1

Harry Potter and. Literature Guide. for. by J.K. Rowling. Model Response Lesson 1

The Foundations of 3D Analysis: 3D Model of the Avada Kedavra Curse in Potteriana

SVENSK STANDARD SS-EN

Harry Potter and. Literature Guide. for. by J.K. Rowling. Student Lesson 1

AI understands joke. Home Archive Templates Forum Contact Sitemap. Posted in Technology on , 12:57

Swish. Our brand and how you use it.

Remote Control of Test Stations

Death of a Hero. Still, Harry thought as the Express pulled out of Hogsmeade Station, it wouldn't hurt to have a few surprises planned. Just in case.

Dumbledore s Army. DrT

Podium Acoustics for the Symphony Orchestra

Automatic Camerawork in virtual talk show production

Summer Reading for Rising 5 th Graders Due: 1 st day of school.

A Chance Meeting Harry

Harry Potter s Moral Universe: Reading Harry Potter as a Morality Tale. Linnea Helgesen

Please contact our events team for a bespoke quote based on your individual requirements. Tel:

Complete Idiot's Guide To Writing Poetry By Nikki Moustaki

Independent Book of Your Choice

Cereal Box Book Report

Transcription:

HOGWARTS SCHOOL OF WITCHCRAFT AND WIZARDRY PREPARES FOR DUELS Grupptentamen i Programmeringsparadigm

REGLER FÖR GRUPPTENT v Webben är öppen för deltagarna. v Deltagarna får endast kommunicera (angående tenten) med varandra. v Att aktivt begära hjälp eller information av utomstående via mejl, chatforums eller andra kanaler är förbjudet v Tentttiden är 6h och slutar 19:15 (+2h för de som jobbar i par).

REGLER FÖR GRUPPTENT v Det finns 9 olika uppgifter i tenten. Sammanlagt kan de ge 20p. v Ni får fritt välja vem som kodar vilken uppgift eller hur ni samarbetar kring dem. v Ni får fritt välja för varje uppgift separat om ni kodar den på Haskell eller Prolog. v Det ska stå som kommentar för varje inlämnad uppgift vilken språkversion och OS som använts.

REGLER FÖR GRUPPTENT v Inlämningen sker via mejl till soini@abo.fi v Haskell-uppgifterna ska samlas i en fil, prolog-uppgifterna i en annan. Ifall ni använder system som inte är ömsesidigt kompatibla, får ni mejla flera filer (dokumentera detta i så fall!) v Varje inmejlad fil ska ha en kommentar om vilken grupp som producerat den. Koden ska ha kommentarer som visar hur den ska anropas.

REGLER FÖR GRUPPTENT v Själva uppgifterna beskrivs på engelska, eftersom svenska språket än så länge är obekant vid Hogwarts.

TEST DATA v You should use these lists to test the tasks that follow (naturally, you will decide how to represents the data in the lists, here they are given in pseudocode): v Slytherin students: ("Draco Malfoy", "owl ) ("Vincent Crabbe", "rat ) ("Pansy Parkinson", "cat ) ("Gregory Goyle", "cat )

TEST DATA v Gryffindor students: ("Harry Potter", "owl ) ("Hermione Granger", "cat ) ("Ron Weasly", "rat ) v Ravenclaw students: ("Luna Lovegood", "cat ) ("Cho Chang", "rat ) ("Padma Patil", "cat ) ("Marcus Belby", "owl )

TEST DATA v Hufflepuff students: ("Cedric Diggory", "cat ) ("Hannah Abbot", "owl ) ("Pomona Sprout", "rat )

TASK 1: DUELSTART 1P v In Hogwarts the unit that partakes in duels is a student and his/her magical pet. For duelstart you should model such a pair and then prepare this pair for the duel so that the points awarded for this pair start from 0. v You can write a Haskell function or a Prolog predicate for this; the functionality should be: v E g input: ( Harry Potter, owl) output: ( Harry Potter, owl) 0 (You choose how to represent this)

TASK 2: DUELREADY 1P v In duelready you work with a list of student & magical pet couples. duelready should take a list of such couples and make them ready for a duel, using the function/predicate duelstart from the last task. The expected result is naturally of list of these couples, ready for duel: v Eg ("Cedric Diggory", "cat ) ("Hannah Abbot", "owl ) ("Pomona Sprout", "rat ) should be turned into

TASK 2: DUELREADY 1P ("Cedric Diggory", "cat"), 0 ("Hannah Abbot", "owl"), 0 ("Pomona Sprout", "rat ), 0 v You decide how to model this, but the result must be the same list of students, all ready for duel.

TASK 3: PAIR FOR DUEL 2P v The function/predicate pairforduel takes in two lists where the elements are student-pet couples, and pairs these couples with other such couples, so that one couple comes from one list, the other couple from the other list. pairforduel must give as result all such possible couplings. v See next slide for example!

TASK 3: PAIR FOR DUEL 2P v E g first list: ("Harry Potter", "owl ) ("Hermione Granger", "cat") v Second list: ("Cedric Diggory", "cat ) ("Hannah Abbot", "owl ) ("Pomona Sprout", "rat") v should yield...

TASK 3: PAIR FOR DUEL 2P v The result should be: ("Harry Potter", "owl ) & ("Cedric Diggory", "cat ) ("Harry Potter", "owl ) & ("Hannah Abbot", "owl ) ("Harry Potter", "owl ) & ("Pomona Sprout", "rat ) ("Hermione Granger", "cat") & ("Cedric Diggory", "cat ) ("Hermione Granger", "cat") & ("Hannah Abbot", "owl ) ("Hermione Granger", "cat") & ("Pomona Sprout", "rat )

TASK 4: SAME ANIMAL 1P v This function/predicate should check whether two student-pet couples have the same animal or not. v E g: ("Harry Potter", "owl ) & ("Cedric Diggory", "cat ) => false ("Harry Potter", "owl ) & ("Hannah Abbot", "owl ) => true

TASK 5: PAIR FOR ANIMAL DUEL 3P v This function/predicate should work as pairforduel, but only couples with the same kind of magical pets are allowed in the result: veg ("Harry Potter", "owl ) & ("Cedric Diggory", "cat ) ("Harry Potter", "owl ) & ("Hannah Abbot", "owl ) ("Harry Potter", "owl ) & ("Pomona Sprout", "rat ) ("Hermione Granger", "cat") & ("Cedric Diggory", "cat ) ("Hermione Granger", "cat") & ("Hannah Abbot", "owl ) ("Hermione Granger", "cat") & ("Pomona Sprout", "rat )

TASK 6: COUPLE FOR DUEL 3P v Again we need to form (student, pet) pairs for duelling, but this time we simply pair the couples in the order that they have in the lists: the first couples from both lists will form a pair, the second couples the second pair and so on. However, as the House Lists are not equally long, there is a risk that some students will not get paired off. We might wish to find pairs for them later. So, coupleforduel must give three results: (next slide!)

TASK 6: COUPLE FOR DUEL 3P v Say whether all students in both the lists got paired off or not v Give the list of the new pairs v Give a list of those student-pet couples that did not get a pair (this list may be empty) v See next slide for an example!

TASK 6: COUPLE FOR DUEL 3P v E g first list: ("Harry Potter", "owl ) ("Hermione Granger", "cat") v Second list: ("Cedric Diggory", "cat ) ("Hannah Abbot", "owl ) ("Pomona Sprout", "rat") v should yield...

TASK 6: COUPLE FOR DUEL 3P v There were students left over v The list of pairs: ("Harry Potter", "owl ) & ("Cedric Diggory", "cat ) ("Hermione Granger", "cat") & ("Hannah Abbot", "owl ) v The list of those left over: ("Pomona Sprout", "rat")

TASK 7: THREAT 3P v threat is used to controll that two students do not threaten each other while training on a 5 x 5 field. The spells are cast on straight lines, so that the row and the column where the student stands are effected by the spell. (The magical architecture of the 5 x 5 training hall reflects the spells so that the whole row and the whole column where the student is standing are effected by the spell, but the rest of the space is uneffected.) v NB! The wizards/witches may NOT stand in the same slot!! (Next slide!)

TASK 7: THREAT 3P v The function/predicate threat must check the position of a student casting the spell in this hall against the position of another student planning to enter the hall (remember, (s)he may choose to apparate in any slot) and say whether there is a threat that this student might be effected by the spell cast by the first student. v Threat must also see to it that the second student may not apparate on the slot reserved by the student casting the spell! (Next slide!)

TASK 7: THREAT 3P 1 2 Student 2 is not threatened by the spell cast by student 1 Hint: think very, very carefully what you need to know to model the task! Do NOT model what is not needed 1 2 Student 2 is threatened by the spell cast by student 1

TASK 8: CROSSFIRE 3P v The function/predicate crossfire will help to determine whether a third person risks being hit by crossfire if (s)he enters the training local described above, with two students already casting spells in it. v Crossfire is defined as all the slots where the spells cast meet. v Remember to analyse the situation both for the case where the wizards training do not threaten each other, and for the one where they do! We are still working in the 5 x 5 training hall. (Next slide!)

TASK 8: CROSSFIRE 1 2 1 and 2 do not threaten each other. Crossfire positions are marked in red. crossfire must produce a list of the slots to be avoided (those with crossfire). 1 2 Students 1 and 2 are threatened by each other. Crossfire positions are marked in red.

TASK 9: SAFE 3P v A third person will apparate onto the arena at a given position but is it safe? v Safe positions to apparate in are those that are not under threat (see task 7) or those where one risks crossfire (see task 8). v The function/predicate safe must check whether the slot where the third person plans to apparate is safe or not.

GOOD LUCK WITH YOUR CODING MAGIC! https://www.google.com/search?q=hogwarts&biw=1440&bih=749&tbm=isch&imgil=8db5n-ewbr6cbm%253a%253bumxnqo0o_yykpm %253Bhttps%25253A%25252F%25252Fen.wikipedia.org%25252Fwiki%25252FHogwarts&source=iu&pf=m&fir=8Db5n-ewbR6CBM%253A %252CUmXnQO0O_YykpM%252C_&usg= MQlngaztgHhWNUqsyl_nshvOzJI %3D&ved=0ahUKEwjNy_Dr45_MAhUOb5oKHSm5C00QyjcIJQ&ei=As4YV83COI7e6QSp8q7oBA#imgdii=8Db5n-ewbR6CBM%3A%3B8Db5newbR6CBM%3A%3B50Cw-vVa3QB-4M%3A&imgrc=8Db5n-ewbR6CBM%3A