1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
drek231 [11]
3 years ago
12

Write a program which will enter information relating to a speeding violation and then compute the amount of the speeding ticket

. The program will need to enter the posted speed limit, actual speedthe car was going, and whether or not the car was in a school zone.
Computers and Technology
1 answer:
Paraphin [41]3 years ago
7 0

Answer:

In Python:

speedlimit = int(input("Speed Limit: "))

actualspeed = int(input("Actual Speed: "))

schoolzone = int(input("School Zone? (1 - Yes): "))

ticket = 75

difference = actualspeed - speedlimit

ticket += difference * 6

if difference > 30:

   ticket += 160

if schoolzone == 1:

   ticket*=2

   

print("Ticket: "+ticket)

Explanation:

See attachment for complete question:

The next three lines get the speed limit, actual speed and if the driver is in a school zone

<em>speedlimit = int(input("Speed Limit: "))</em>

<em>actualspeed = int(input("Actual Speed: "))</em>

<em>schoolzone = int(input("School Zone? (1 - Yes): "))</em>

This initializes the ticket amount to 75

ticket = 75

This calculates the difference in the speed limit and the actual speed. It is assumed that the actual speed will always be greater than the speed limit

difference = actualspeed - speedlimit

This calculates the new ticket by charging $6 on every additional speed

ticket += difference * 6

If the difference is greater than 30, this adds $160 to the ticket amount

<em>if difference > 30:</em>

<em>    ticket += 160</em>

If in school zone, this doubles the ticket amount

<em>if schoolzone == 1:</em>

<em>    ticket*=2</em>

This prints the calculated ticket amount    

print("Ticket: "+ticket)

You might be interested in
Disk quotas are set using the ____ console. diskpart disk management mst windows explorer
liraira [26]
<span>Answer: Disk Management Console</span>
8 0
4 years ago
To do a good job of searching periodicals at your library, you should use A) the Library of Congress Authorities webpage. B) web
jonny [76]

Answer:

C) the online catalog.

Explanation:

An online library catalog describes the periodicals, videotapes, and books as it is the electronic bibliographic database. This evolved from the printed source, the library card catalog. Hence, this clarifies that its C. the correct option.

However, LexisNexis is the unit that gives computer-assisted research CALR and business research as well as risk management services. So through this, you can get the legal and journalistic documents.

And the stack or the book stack which is referred to as the library building block is for book storage. And the library of Congress Subject Headings is active since 1898 and holds the catalog materials which are being collected by the Library of Congress, and they do not keep track of periodicals. And the BizMiner is for financial reports.

Hence, the correct answer is the C) the online catalog.

5 0
3 years ago
Jasmine plays a game on her computer screen. A moving balloon appears on the screen, and she has to pop the balloon by clicking
Elena-2011 [213]
Please find the answer as attachment.

4 0
2 years ago
This is a glitch ? 


 










































mixer [17]

Answer:

I think no...Brainly might not allow unique text's.

8 0
3 years ago
How bridges are built over water
Black_prince [1.1K]
It’s all depending on what method
4 0
2 years ago
Other questions:
  • What is computer? Explain the characteristics of computer.<br>​
    12·1 answer
  • Write a script which: Uses the input function to get any number and store it in a variable named my_number Create a new variable
    8·1 answer
  • Which of the following topics should you avoid bringing up during a college interview?
    10·2 answers
  • When did gaming become a thing?
    7·2 answers
  • Are one of the greatest features of Photoshop that allow nondestructive editing of images.
    6·1 answer
  • Weak Induction
    8·1 answer
  • When an expression containing a ____ is part of an if statement, the assignment is illegal.
    14·2 answers
  • Word documents contain how many sections by default?
    9·1 answer
  • The foundation of secure communication on the internet replies on asymmetric encryption, with the use of Public and Private keys
    10·1 answer
  • How would you assign roles to your group members?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!