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 a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

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