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]
2 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]2 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
What is 11x12x12x14x15x16
ser-zykov [4K]

Answer:

11x12x12x14x15x16=5,322,240

Explanation:

11*12=132

12*14=168

15*16=240

132*168=22,176

240*22,176=5,322,240

Have a nice day! :)

4 0
2 years ago
A hacker using information gathered from sniffing network traffic uses your banking credentials from a recent transaction to cre
adell [148]

Answer: a replay attack, a replay attack is used so that the attacker can go sniff out the hash, and get whatever they are trying to get, then once it goes to the attacker it will go back to the original connection after replaying the hash

3 0
3 years ago
Bank of America sends out customer surveys to all of its customers asking them about the services they offer. What type of resea
ValentinkaMS [17]

Answer:

<u>Market research</u>

Explanation:

<u>Market research:</u> The term "market research" is described as a process of describing the viability of a new product or service via specific research that is being conducted directly with the different potential customers. Therefore, market research allows a specific company to discover or identify the target market and receive opinions and some other feedback from various consumers regarding their interest associated with the service or the product.

<u>In the question above, the given statement represents market research.</u>

4 0
3 years ago
Which of the following is NOT an example of written communication?
Veronika [31]

Answer:A conversation between co-workers

Explanation:

4 0
2 years ago
What goes hand and hand with focus? A) company B) non-profit C) business D) organization
Katyanochek1 [597]

Answer:

I think the answer is D but please let me know if i am wrong

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • Assume that the classes listed in the Java Quick Reference have been imported where appropriate.
    14·1 answer
  • Which component is the smallest unit in a spreadsheet?
    14·2 answers
  • Assume you have just started a new job, have a car loan, and have a student loan. You have just received a cash gift of $1,000 f
    14·1 answer
  • Why is a networked system a benefit?
    7·1 answer
  • Why does the phrase "compatibility mode” appear when opening a workbook?
    6·2 answers
  • A​ ___________ identifies the content and purpose of the​ visual, along with whatever label and number​ you're using to refer to
    15·1 answer
  • A store trying to analyze the behavior of its customers will often maintaina two-dimensional array A, where the rows correspond
    6·1 answer
  • Search..
    14·1 answer
  • Conclusion for primary memory
    15·1 answer
  • What safety do you need to have ready to start a device repair?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!