M30299 - Python Patchwork : Programming Assignment | UOP

Published: 06 Feb, 2025
Category Assignment Subject Programming
University University of Portsmouth Module Title M30299 Programming

Introduction

This coursework assignment is designed to give you practice in applying all of the main programming concepts you’ve seen in the module so far to solve a larger and more complex problem. The assignment will be marked out of 50 and carries 20% of the module marks (it is assessment item 3 of the module).

You need to submit your program via the module’s Moodle site by the deadline of 4.00pm, Monday 16 December 2024, and are required to demonstrate your submitted program in your 2-hour practical class timetabled in the period 17th-20th December 2024. Study this handout thoroughly in order to understand exactly what is expected from you for the coursework.

Your task

Your task is to write a program to display patchworks, an example of which is illustrated below. The actual patchworks your program will display will depend on your student number and on the user’s inputs.

M30299  Programming

Patchworks are square and made up of square patches. A patchwork can be of three sizes: 5 × 5, 7 × 7 or 9 × 9 patches. Each patch can be one of two different designs or it can be completely plain. It can be one of three different colours, the background colour is always white, and some patches include shapes with blank outlines. Every patch features a regular geometric design made up of lines, circles, rectangles and/or polygons and has dimensions 1 of 100 × 100 pixels. The two patch designs and the layout and colouring of the patchwork are not necessarily as given in the illustration above. They are determined by the final three digits of your student number, and are displayed in the tables on the final two pages. The layout and colouring of the patchwork are given by the antepenultimate (third last) digit of your student number. The two patch designs are given by the penultimate and final digits of your student number. For example, if your student number was 2000607, the patch designs and patch arrangement for a 5 × 5 patchwork with colours blue, green and red are those illustrated on page 1.

It’s important that your program draws the patch designs accurately, and that it draws the correct designs, layout and colouring – you will receive no credit for drawing the wrong patch designs or patch arrangement.

Your program must draw the patchwork using the facilities provided in the graphix module (Line, Circle etc.); no other approach is permitted. Designs are intended to test algorithm development skills (e.g. they should involve the use of one or more for loops). For some of the designs, it will be useful to remember that shapes drawn later appear on top of those drawn earlier. You should not use major parts of the Python language which we haven’t yet covered in the module; for example, do not use exception handling and do not define your own classes.

Main program requirements

Your program should begin by prompting the user, using a text (shell)-based interface, to enter, in this order:

  • the patchwork size (i.e. a single figure giving the common width & height in terms of patches);
  • each of the desired three colours, entered one-by-one (separate prompts); the program should ensure that the colours are all different from each other.

The program’s user interface should be easy to use, helpful and robust; e.g., on entering invalid data, the user should be given appropriate feedback and re-prompted until the entered data is valid. (Valid sizes are 5, 7 and 9, and valid colours are red, green, blue, magenta, orange and purple.) Once these details have been entered, the patchwork should be drawn in a window of the appropriate size and with a white background. For example, if the user enters size 5, and colours blue, then green and finally red, then (in the case that your student number ends in 607) the patchwork shown on page 1 should be drawn in a window of width 500 pixels and height 500 pixels.

Are you facing issues with your M30299 programming assignment? You are wondering who can do my assignment on time? Then you have come to the right place as we provide you instant assignment solutions as per your customized requirements. Our UK assignment writers provide free samples on all topics for your guidance and we also provide programming assignments. So what are you still wondering, if you want to submit your assignment within the deadline then contact our Workingment team today.

Workingment Unique Features

Hire Assignment Helper Today!


UA92 BLOCK 6 Data and Decision Making Assessment Brief

UA92 BLOCK 6 Assessment 1: Identify and analyse information and arguments relevant to the contemporary business. Apply quantitative analysis to understand and present complex data to support evidenced-based decision-making.

7HURM001W Global Employment Relations Coursework 1 Assessment Brief Semester 1 | UoW

To achieve this, the assessment has been broadly designed as a module-long mini comparative research project in which students choose a topic to compare across a pair of countries and are required to work on the same comparison throughout the module.

7HURM001W Global Employment Relations Coursework 3 Assessment Brief Semester 1 | UoW

The module assessment is designed to allow students to demonstrate their ability to systematically analyse, explain, and critically discuss similarities and differences between employment relations systems across the world, as well as their comprehension of key conceptual.

BUS3029 Operating in Emerging Markets Assignment 01 Brief 2025 | UON

Propose a detailed plan for how the brand will operate sustainably in the chosen market. Focus on areas such as ethical sourcing and reducing environmental impact. Highlight how these practices align with the brand's values, contribute to competitive advantages, and help the business to grow.

BBSC4103 Assignment: Strategic Supply Chain Management Question Semester 2025 | OUM

BBSC4103 Part 1: The purpose of this assignment is to help learners study the important of strategic alliances by focusing on inter-organisational relationships and the challenges in managing them.

BBHI4103 Industrial Relation Assignment Question | Open University Malaysia

BBHI4103 Part 1: The purpose of this assignment is to enhance learners' ability to discuss the perspectives in industrial relations and evaluate which perspective is the best for the selected organisation

Scientific Research Review Assignment 4 | USM

You are required to write an individual review paper on a topic of advancements in your area of study. This paper must demonstrate your ability to plan, execute, and present a scholarly task ethically and professionally.

BTEC Level 5 Unit 16: Computing Research Project Assignment Part 1 Brief

BTEC Level 5 Unit 16: Assignment Brief: Artificial intelligence is at the forefront of innovation within Computer Science that uses a combination of logic, algorithms and large data sets to produce an AI model.

ACC210 Accounting for Decision Making and Control TMA Assignment Question | SUSS

ACC210 Question 1  Cool Strokes Pte Ltd ("CS") manufactures white board markers for educational use. The company's markers are sold by the box at $50 each in 20x3.

BM414 Financial Decision Making CW1 Assignment Brief (SIG) | BNU

Suppose you are part of the Accounting and Finance team at Sheffield Insulation Group (SIG) plc. You are required to write a report to the senior management team of SIG plc, discussing the importance of accounting and finance functions.

Online Assignment Help in UK