Design a solution to highly-repetitive computational problem

Assignment Help Python Programming
Reference no: EM131939197

Building IT Systems Assignment Part A: Cityscapes

Motivation - One of the most basic functions of any IT system is to process a given data set to produce some form of human-readable output. This assignment requires you to produce a visual image by following instructions stored in a list. It tests your abilities to:

  • Process lists of data values;
  • Design a solution to a highly-repetitive computational problem;
  • Display information in a visual form; and
  • Produce maintainable, reusable code.

In particular, because this task is highly-repetitive it would be extremely tedious to solve it in a "brute-force" manner using lots of duplicated code. Instead you will need to think carefully about how to reuse parts of your solution, via well-planned function definitions and the use of iterative code, to make your own workload lighter and the resulting program more concise and easier to understand and maintain.

Goal - Working at QUT's inner-city Gardens Point campus gives us a good view of Brisbane's cityscape, consisting of numerous high-rise buildings in many different styles and of many different heights. In this assignment you are required to use Python's Turtle graphics module to draw such a cityscape. To do so you must follow a set of instructions, in the form of a Python list, which specify where each building is to be placed, the specific style of the building, and the number of floors. Most importantly, this "city plan" will be generated randomly, so your solution must be sufficiently general that it can work correctly for any possible plan in this format.

Requirements - To complete this part of the assignment you are required to extend the provided cityscapes.py Python file by completing function build_city so that it can draw buildings at the sites and heights specified by the data sets generated by the random_plan function.

Your build_city function must work correctly for any values returned by the random_plan function.

Your submitted solution will consist of a single Python 3 file, and must satisfy the following criteria. Percentage marks available are as shown.

1. Drawing four entirely distinct building styles - Your program must be able to draw four distinct styles of building, each consisting of multiple floors and a roof structure, such that each building is clearly distinct in all elements from the other styles of building. Each floor and roof structure must be of a reasonable degree of complexity, involving multiple Turtle shapes. It must be easy to distinguish each floor from those above and/or below it, so that the number of floors in any particular building can be counted. Similarly, the roof structures must be clearly distinct from the floors below. Also, the buildings must be made sufficiently distinct, either by drawing borders and/or varying their colours, so that they can be distinguished from one another even when they overlap on the canvas.

Beyond these requirements you are free to add other variations to your building designs, such as varying the width of the floors, making the ground floor different from the others, adding different features for different floors, etc.

2. Positioning buildings - Your code must be capable of drawing each of the four styles of building at any of the marked building sites, as dictated by the data set provided to function build_city. The buildings must be centred precisely on the specified coordinates. The drawings of the buildings must preserve their integrity no matter where they are drawn, with no spurious additional or missing lines. Your solution for relocating the buildings must work correctly for any values returned by the random_plan function.

3. Resizing buildings - Your code must be capable of drawing each of the four building styles at any height, as specified by the number of floors in the data set provided to function build_city. The correct number of floors must be drawn and always be topped by the appropriate roof structure. The individual parts of the building must preserve their integrity no matter how tall or short it is, with no spurious additional or missing lines. Your solution for resizing the buildings must work correctly for any values returned by the random_plan function.

4. Code quality and presentation - Your program code, for both Parts A and B of the assignment, must be presented in a professional manner. See the coding guidelines in the IFB104 Code Presentation Guide (on Blackboard under Assessment) for suggestions on how to achieve this. In particular, given the obscure and repetitive nature of the code needed to draw complex images using Turtle graphics, each significant code segment must be clearly commented to say what it does, e.g., "Draw door", "Draw ghost's head", etc. Similarly, the names of your functions and variables should be indicative of their purpose, not just "i", "j", etc. Also, you must use function definitions and loops to avoid unnecessary duplication of similar or identical code segments.

You must complete the assignment using basic Turtle graphics and maths functions only. You may not import any additional modules or files into your program other than those already included in the given cityscapes.py template. In particular, you may not import any image files for use in creating your drawing.

Finally, you are not required to copy the example shown in this document. Instead you are strongly encouraged to be creative in the design of your buildings. Surprise us!

Attachment:- Assignment Files.rar

Reference no: EM131939197

Questions Cloud

Store data around you in computerized format : Think about data around you and store it in to computerized format
Meaningful data around you and store it : Think about meaningful data around you and store it into computerized format
What is break-even probability of collection : What is the expected profit of granting credit? What is the break-even probability of collection?
Calculating what size mortgage person can afford : Illustrate how GDS and TDS ratios as well as cash flow are important in calculating what size mortgage a person can afford.
Design a solution to highly-repetitive computational problem : IFB104 Building IT Systems Assignment Part A: Cityscapes. Design a solution to a highly-repetitive computational problem; Produce maintainable, reusable code
Analysis dell incorporations financial situation : Based on the attached financial statements, to analysis DELL Incorporation's financial situation and make recommendations to upper level management
Estimate of the proportion of damaged fruit in the orchard : In a random sample of 200 apples from an orchard that had not been sprayed with insecticide, 162 apples bear evidence of insect damage.
The afn equation for forecasting financial requirements : What advantages does the forecasted financial statement method have over the AFN equation for forecasting financial requirements?
What a level was the hypothesis tested : In a random sample of 500 voters from a northern county in West Virginia, 265 of the voters indicate that they will vote for the Democratic candidate

Reviews

len1939197

4/12/2018 5:13:57 AM

Check the pdf. All the details are given and the initial codes are given in the second attachment. This is the first part of a two-part assignment. This part is worth 20% of your final grade for IFB104. Part B will be worth a further 5%. Part B is intended as a last-minute extension to the assignment, thereby testing the maintainability of your code, and the instructions for completing it will not be released until Week 7. Whether or not you complete Part B you will submit only one file, and receive only one assessment, for the whole 25% assignment.

len1939197

4/12/2018 5:13:51 AM

This is not a difficult assignment, but due to the need to create multiple building styles and multiple floors for each building it would be very tedious if you tried to code the whole solution using ‘brute force’. Instead you are strongly encouraged to define parameterised functions to draw various common elements of the buildings, and use loops to call these functions, to reduce the overall amount of code you need to write. If you are unable to complete the whole task, just submit whatever you can get working. You will receive partial marks for incomplete solutions. To help you debug your code for the individual building styles we have provided some “fixed” datasets. Feel free to use these when developing your program, and add additional ones if you like, but keep in mind that these datasets will not be used for assessing your solution. Your build_city function must work for any value that can be returned by function random_plan.

len1939197

4/12/2018 5:13:45 AM

Part B of this assignment will require you to change your solution slightly in a short space of time. You are therefore encouraged to keep code maintainability in mind while developing your solution to Part A. Make sure your code is neat and well-commented so that you will find it easy to modify when the instructions for Part B are released.

len1939197

4/12/2018 5:13:39 AM

You must develop your solution by completing and submitting the provided Python 3 file cityscapes.py as follows. Complete the “statement” at the beginning of the Python file to confirm that this is your own individual work by inserting your name and student number in the places indicated. We will assume that submissions without a completed statement are not your own work! Complete your solution by developing Python code to replace the dummy build_city function. You should complete your solution using only the standard Python 3 modules already imported by the provided template. In particular, you must not use any Python modules that must be downloaded and installed separately because the markers may not have these modules installed. Furthermore, you may not import any image files into your solution; the entire image must be drawn using Turtle graphics drawing primitives.

len1939197

4/12/2018 5:13:32 AM

Submit a single Python file containing your solution for marking. Do not submit multiple files. Only a single file will be accepted, so you cannot accompany your solution with other files or pre-defined images. Do not submit any other files! Submit only a single Python 3 file! Apart from working correctly your program code must be well-presented and easy to under-stand, thanks to (sparse) commenting that explains the purpose of significant code segments and helpful choices of variable and function names. Professional presentation of your code will be taken into account when marking this assignment.

Write a Review

Python Programming Questions & Answers

  Write program that creates an object of productionwork class

Write a program that creates an object of the ProductionWorker class and prompts the user to enter data for each of the object's data attributes.

  Implement the sieve of eratosthenes

Implement the Sieve of Eratosthenes and use it to find all prime numbers less than or equal to one million. Use the result to prove Goldbach's Conjecture for all even integers between four and one million, inclusive.

  Create a new table called custsum that you also write to xyz

create a new table called custSum that you also write to xyz.db, and that has the following characteristics. This table should have one row per customer record.

  Write a python script that reads and analyses the data

ICT702 Task 2 - Apply relevant Python programming concepts to a data analysis challenge - Read data from real sources and wrangle it into the form you need

  Cleint software so that it does not display

Rewrite the cleint software so that it does not display an echo of a message sent by the users. Maybe it means that each time a user tries to send a private message that same message is also sent back to them? summary: stop that from happening?

  Determines number of occurrences of a given letter in string

In this last checkpoint, you will write a new program that determines the number of occurrences of a given letter in a string. To do so, you are only allowed to use the replace() and len() functions.

  Python program that reads in a series of positive integers

Write a Python program that reads in a series of positive integers and writes out theproduct of all the integers less than 25 and the sum of all the integers greater than or equal to 25. Use 0 as a sentinel value

  Implement a battleship game in python

Assignment Summary: Battleship is a children's game where players guess (x,y) coordinate positions of the opposing player's ship pieces in a 10x10 grid. For the official Hasbro rules and additional game context, read http://www.hasbro.com/common/i..

  Write a program that asks the user for a letter

Write a program that asks the user for a letter. The program should then determine if the letter is a vowel or not

  Write a program that accepts as input a sentence

Write a program that accepts as input a sentence in which all of the words are run together but the first character of each word is uppercase. Convert the sentence to a string in which the words are separated by space and only the first word start..

  Find the output of the given script in python

Find the output of the following script in Python. Note: All statements are valid. Rewrite the following for loop Python statements using while loop.

  Same directory as your program

In the same directory as your program, create a file FF1, and write into it Hello (with a space at teh end). Similarly, create a file FF2, and write into it world! (with a new line, i.e., an ENTER at the end). And create a file DD and write into i..

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