Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Python Expert

Aim

This assignment is intended to assess your skills in understanding and interpreting a moderately complex problem, designing a solution to the problem and implementing the design using principles of correct syntax, layout, and program structure.

Instructions

This assignment is a group assignment.

Note:It is your responsibility to clarify any aspect of the assignment of which you are unsure with your lecturer. Where you have used example code and modified it, you must reference the source.
You will be asked to demonstrate your work to your lecturer in the week of the due date. There will be a range of appointment times and you can choose your time. All assignments must be demonstrated otherwise they will not be marked.

Tasks

- Read the scenario and program specifications. Determine the functions required.
- Determine the logic for each of the option functions in the UI.
- Prepare a Complete Flow Chart for the Project
- Write the code for the module. You may wish to test each of the major functions before writing the next, so that the same mistake is not repeated in multiple functions.
- Demonstration of the Code

Scenario

Speeding fines increase progressively from $30 for speeds less than 10 km/h over the limit, to a maximum fine of $630 for speeds up to 50km/h over the limit.

At more than 40 km/h above the speed limit you could also get a 28-day licence suspension.

At more than 50 km/h over the limit you could be charged with careless, dangerous or reckless driving.

Write a program to

1. Create a dictionary to store the following information to a txt file:

Location

Limited Speed

Queen St

30

Carlisle Rd

50

East Coast Rd

50

Ponsonby Rd

40

Lake Rd

50

Onewa Rd

50

2. accept a value for the speed limit for the selected stretch of road

3. then, within a loop:

4. get the clocked speed of each car as it passes the radar gun (this value is inputted by the user each time).

5. calculate and print either that the speed was legal, or print the invoice of the fine, or print an error message (Constraints: the speed radar cannot cope with speeds under 1 (car is stationary or reversing, or over 180 (outside technical capabilities). In either situation, print out an error message, but do not process it.)

6. store the speeding information (including name, fine, and time) in a txt file (Create another option to store the information into a txt file, or store them while quitting the application)

7. allow police to check speeding ticket by name

Program Specifications

When the program starts:
- Display the welcome message.
- Initialize information of limited speed on different roads and records them into a dictionary.
- Display the main menu and wait for the user to enter an option.

Sample screen (the number of records shown is a sample only):
Welcome to Auckland Speed Gun System:
1. List road name and speed
2. Search speed limit for a road
3. Input speeding ticket
4. Display a speeding ticket
5. Display all speeding ticket(s)
6. Exit

Please select one option from menu:

Option 1: List road name and speed

This option allows users to view all the roads in the system. When this option is selected:
- If the number of road records is greater than 0:
- Display the heading "******** Road Information ********"
- Display the column headings
- Display each road information in the format to fit the column headings

Option 2: Search speed limit for a road

This option enables the users to view all the details of the road. When this option is selected:
- Display the heading "******** ROAD DETAILS ********" -Ask the user to enter a road name.
- Search for the road.
- If the road name exists, display
The limit speed of xx(road name) Rd is xx(limited speed).

- If the road name does not exist, output a message saying that there is no such road in the system.
- Ask if the user wants to view another road detail. (Prompt user again for a road name until they enter ‘n' to exit this option)

Option 3: Input speeding ticket(s)

This option allows users to input the oldest employer(s). When this option is selected:

- Output the heading "******** INPUT SPEEDING TICKET(S) ********"
- Input name.
- Input speed.
- Store them in a dictionary.
- Ask if the user wants to input another speeding ticket. (Prompt user again for a road name until they enter ‘n' to exit this option)

Option 4: Display a speeding ticket

This option enables the users to view all the details of the road. When this option is selected:
- Display the heading "******** Ticket DETAILS ********"
- Ask the user to enter a name.
- Search for the name.
- If the name exists, display
a) Name
b) Speed
c) Fine

If the name does not exist, output a message saying that there is no such person in the system.
Ask if the user wants to view another ticket. (Prompt user again for a road name until they enter ‘n' to exit this option)

Option 5: Display all speeding ticket(s)

This option allows users to view all the jobs in the system. When this option is selected:
- If the number of job records is greater than 0:
- Display the heading "******** ALL TICKETS ********"
- Display the column headings
- Display each ticket in the format to fit the column headings

Option 6: Exit

This option quit the system. When selected:
- Display the "Thank you" message.
- Terminate the program.

** Need Only Flow chart - Option 4 to 6

Attachment:- Program Specifications.rar

Python, Programming

  • Category:- Python
  • Reference No.:- M92465492
  • Price:- $120

Guranteed 48 Hours Delivery, In Price:- $120

Have any Question?


Related Questions in Python

Learning outcomes lo3 - research develop and document a

Learning Outcomes LO3 - Research, develop, and document a basic security policy, and analyse, record, and resolve all security incidents LO4 - Identify and assess the threats to, and vulnerabilities of networks Assessmen ...

Assignment1 utilising python 3 build the following

Assignment 1. Utilising Python 3 Build the following regression models: - Decision Tree - Gradient Boosted Tree - Linear regression 2. Select a dataset (other than the example dataset given in section 3) and apply the De ...

Tasksdemonstrate data scraping of a social network of

Tasks Demonstrate data scraping of a social network of choice. Develop technical documentation, including the development of the code & detailing the results. Provide a report on the findings, that includes research into ...

The second task in this assignment is to create a python

The second task in this assignment is to create a Python program called pancakes.py that will determine the final order of a stack of pancakes after a series of flips.(PYTHON 3) Problem Task In this problem, your input w ...

Environment setupthe first mini project will be based on

Environment Setup The first mini project will be based on Ladder Logic programming. We will be using Schneider Electric's IDE called SoMachine Basic to do the programming. The latest ver- sion of SoMachine Basic for Wind ...

Lab assignment -background - we have discussed in detail

Lab Assignment - Background - We have discussed, in detail, the function of Stacks and Queues and how they are specifically implemented in Python. To get a better understanding of the utility of these data structures, we ...

In this programming assignment you will write a client

In this programming assignment, you will write a client pingprogram in Python. Your client will send a simple ping message to a server, receive a correspondingpong message back from the server, and determine the delay be ...

Simple python traffic lightswrite a program that simulates

Simple Python (Traffic lights) Write a program that simulates a traffic light. The program lets the user select one of three lights: red, yellow, or green. When a radio button is selected, the light is turned on, and onl ...

Sieve of eratosthenes in pythonthe goal is to find all the

Sieve of Eratosthenes (in Python) The goal is to find all the prime numbers less than or equal to some natural number maxn. We have a list that tells us if any of the numbers 0..maxn are "marked". It can be an array of b ...

Python programming assignment -you first need an abstract

Python Programming Assignment - You first need an abstract base class, called, Account which has the following attributes and methods: accountID: This attribute holds the ID assigned the account , if not provided set to ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As