Explain the importance of programming style concepts

Assignment Help Python Programming
Reference no: EM132398137

Assignment - Sonnets and Doublets

Overview

In this assignment you will have the opportunity to test your Python skills in exploring and manipulating text. Throughout the assignment you are expected to apply the principles of problem solving that we have already discussed in this course.

Learning Outcomes Assessed

The following course learning outcomes are assessed by completing this assessment:

Knowledge:

K1. Identify and use the correct syntax of a common programming language.

K2. Recall and use typical programming constructs to design and implement simple software solutions.

K4. Explain the importance of programming style concepts (documentation, mnemonic names, indentation).

Skills:

S1. Utilise pseudocode and/or algorithms as a major program design technique.

S2. Write and implement a solution algorithm using basic programming constructs.

S4. Describe program functionality based on analysis of given program code.

Application of knowledge and skills:

A1. Develop self-reliance and judgement in adapting algorithms to diverse contexts.

A2. Design and write program solutions to identified problems using accepted design constructs.

Assessment Details

Part 1 Sonnets - Background

Sonnets are poems which have the following form1 (Shakespeare's sonnet 116):

Let me not to the marriage of true minds (A)
Admit impediments, love is not love (B)
Which alters when it alteration finds, (A)
Or bends with the remover to remove. (B)

O no, it is an ever fixèd mark (C) That looks on tempests and is never shaken; (D)

It is the star to every wand'ring bark, (C)

Whose worth's unknown although his height be taken. (D)

Love's not time's fool, though rosy lips and cheeks (E)

Within his bending sickle's compass come, (F)

Love alters not with his brief hours and weeks, (E)

But bears it out even to the edge of doom: (F)

If this be error and upon me proved, (G)

I never writ, nor no man ever loved. (G)

There are 3 quatrains (group of 4 lines) and a couplet (2 lines) making a total of 14 lines. The rhyming pattern is shown with the letters at the end of each line.

Each line is in iambic pentameter2 (weak-strong). A standard line of iambic pentameter is five iambic feet in a row:

Shakespeare has written some 154 sonnets together with many plays - doubt (Craig & Kinney, 2009; Holmes & Kardos, 2003; James & Rubinstein, 2006; Jarmusch et al., 2013; Rubbo et al., 2008) exists as to whether, the person known to be called Shakespeare, was the actual author of all the work presented under this name.

There is a considerable prize still to be claimed by anyone who can prove or disprove this.

Your Task - explore possible authorship

Even though we have just become familiar with Python, there are three very simple tests that we can apply to authorship - and we have the means, with lists and strings in Python, to implement them:

1. Count the occurrences of each letter4 in the text.

2. Print the number of one-letter, two-letter, three-letter words and so on.

3. Print the number of occurrences of each different word in the text.

The first pass might be to see if there is consistency across all the sonnets.

Use the text from the sonnets and apply these three metrics. (We shall leave the actual plan and algorithm up to you - discuss it with your lecturer/tutor if you wish)

Three possible authors who might have written under Shakespeare's name are: Francis Bacon, Ben Jonson and Christopher Marlowe. Their works are readily available online.

Part 2: Doublets

Doublets (or word ladders) are often found in magazines and newspapers together with cryptic crosswords and other puzzles.

The idea is very simple: you might be given two words - often they are antonyms - and your task is to create a ladder of words with these two words at the top and bottom of the ladder.

For example:

HEAD

HEAL

TEAL

TELL

TALL

TAIL

The aim is to make the number of words joining HEAD and TAIL as few as possible.

In this assignment you are given a file5 of some 5700 words together with the pairs of words below (to use as a start and end); you are asked to use your Python skills to find the fewest words that will link them.

Use the following pairs of words:

i. FLOUR-BREAD
ii. CHAOS-PEACE
iii. TEARS-SMILE
iv. WITCH-FAIRY
v. BLACK-WHITE
vi. SLEEP-DREAM
vii. RIVER-SHORE

Then, choose 3 different pairs of words from the file and use these as well.

You may supply your word processed documentation in either Microsoft Word or LibreOffice/OpenOffice formats only - no proprietary Mac specific formats, please.

In addition to the marking criteria, marks may be deducted for failure to comply with the assignment requirements, including (but not limited to):
• Incomplete implementation(s), and
• Incomplete submissions (e.g. missing files), and
• Poor spelling and grammar.

You might be asked to demonstrate and explain your work.

Reference no: EM132398137

Questions Cloud

Why do people tend to deny beliefs about race and ethnicity : Why do people tend to deny, rationalize, and avoid discussing their feelings and beliefs about race and ethnicity? The response must be typed, single spaced.
Operation-specific employee performance assessment program : What would be some advantages of developing your own operation-specific employee performance assessment program?
Mandatory access control and discretionary access control : Explain in your own words the elements of the following methods of access control- Mandatory access control, Discretionary access control
Evaluate the overall co-leadership relationship : The co-leadership model for group facilitation holds many potential advantages for group development. The film you viewed in this unit presents a group.
Explain the importance of programming style concepts : Develop self-reliance and judgement in adapting algorithms to diverse contexts and Design and write program solutions to identified problems using accepted
Describe preconceived notions you had about the age group : Describe preconceived notions you had about this age group and the book theme (e.g., about tweens and social media, early adults and depression, etc).
How counselor education programs can meet cacrep standard : Write a brief explanation of the importance of advocating for self-care for students/supervisees in counseling programs. Then, propose how counselor education.
Values in computational models revalued : Values in Computational Models Revalued. Policy practice and digital science: Integrating complex systems, social simulation and public administration in policy
Define prevention and intervention approaches and programs : Post a brief description of two components of suicide prevention and intervention approaches and programs that you think are important in forensic treatment.

Reviews

Write a Review

Python Programming Questions & Answers

  Calculate the number of upper case letters and lower case

Write a program that accepts a sentence and calculate the number of upper case letters and lower case letters.

  Write a program that randomly generates two integers

Write a program that randomly generates two integers between 1 and 10. Add an input validation loop that ensures the user can only enter.

  Write a function that accepts two list of integers a1 and a2

Write a function named zero_out that accepts two lists of integers a1 and a2 as parameters and replaces any occurrences of a2 in a1 with zeroes.

  Display the stripped phone number

Ask the user to enter the 4-digit code of an orange. Strip all the leading and trailing whitespace characters from the code. Display the stripped phone number.

  Design a function that accepts an integer

Design a function that accepts an integer argument and returns the sum of all the integers from 1 up to the number passed as an argument. For example, if 50 is passed as an argument, the function will return the sum of 1, 2, 3, 4, . . . 50. Use recur..

  Determine whether or not it has three consecutive letters

Write a program that accepts a word as input and determines whether or not it has three consecutive letters that are also consecutive letters in the alphabet.

  Define a definition for the function and recursive function

Define a definition for the function, pow(x, N), to compute x N for integer x and integer N, e.g. 3 1001 . Write a recursive function.

  A python program that contains a main function

Write a PYTHON program that contains a main function and a custom, void function namedshow_larger that takes two random integers as parameters.

  Write pseudocode that prompts you to enter customer name

Your pseudocode can be submitted by pasting it into the Submission screen or attaching it as a text file or Word document.

  Write a program that reads a word and prints each character

Write a program that reads a word and prints each character of the word on a separate line. For example, if the user provides the input Harry the program.

  Write a python program that prompts for an integer

Write a Python program that prompts for an integer-let's call it X-and then ands the sum of X consecutive integers starting at 1.

  How a vertical scroll bar is associated with a list box

What are instance variables, and what role does the name ‘self' play in the context of a class definition. Describe how a vertical scroll bar is associated with a list box.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd