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
What is Nintendo's uniqueness?​
docker41 [41]
It’s unique because it comes with 2 screens well dependents which Nintendo
7 0
4 years ago
Read 2 more answers
PLS HURRY!
Debora [2.8K]

Answer:

D. All of the options listed are correct.

Explanation:

A macro, in excel sheet, is an action or series of action that repeats the keystrokes or mouse actions as many times as one wants. To view macro, shortcut key is to Pres Alt+F8; to delete, one needs to select the macro one wants to delete and press Delete button.

The another way to view macro is to go to the Developer tab, and select the Macro option in Code group. And, then select macro need to delete, and press Delete button.

Another shortcut is to press Alt+F11, and click  on Tools tab, click on Macros and then select macro need to be deleted, and press Delete.

So, all the options stated above are correct.

Therefore, option D is correct answer.

8 0
3 years ago
During the troubleshooting of a pc that will not boot, it is suspected that the problem is with the ram modules. The ram modules
SOVA2 [1]

The RAM modules were not well placed or fitted firmly in the motherboard DIMM slots of the PC during toubleshooting.

What are RAM Modules?

RAM Modules have narrowly printed circuit boards that hold RAM chips (memory chips).

In order to function properly, RAM is expected to be placed or fitted firmly in the motherboard DIMM slots.

DIMM (Dual In-line Memory Module) is a module that contains one or several random access memory (RAM) chips on a small circuit board with pins that connect it to the computer motherboard.

Learn more on RAM Module here:

brainly.com/question/13308897?referrer=searchResults

#SPJ4

8 0
1 year ago
This device is used to connect sections of large networks?
ryzh [129]
Monster energy boissss
6 0
3 years ago
Read 2 more answers
The IP protocol (and UDP) are called "connectionless" and "unreliable." Describe what those two words mean in the context of dat
igor_vitrenko [27]

Answer:

Explanation:

In data communications, a protocol is <em>connectionless </em>if it describes communication between two devices in a network without first establishing or verifying establishment of some link (connection) between the two devices. In a connectionless protocol, data are exchanged between processes or devices without a prior check of whether the processes are ready to transmit data or not. In this type of protocol, there's no verification put in place to remember if these processes were or are in communication. Connectionless protocols are also called stateless protocols. Because connectionless protocol cannot be relied upon due to its lack of delivery-assurance policy, it is sometimes referred to as <em>unreliable protocol</em>. In other words, delivery of data packets is not guaranteed. An example of a connectionless protocol is the UDP (User Datagram Protocol).

However, if the protocol defines some checks to ascertain that there is first a connection between two communicating processes before beginning transmission, then, the protocol is <em>connection-oriented. </em>An example of this is the TCP (Transmission Control Protocol). Connection-oriented protocols are reliable since they ensure connection be made between processes before transmitting data packets.

A typical application of a connectionless/unreliable protocol is in the streaming of real time videos or voice communication where packets of data could be dropped and not resent.

An example of the connection-oriented/reliable protocol is analogous to making a telephone call where data packets (voice messages) are not sent until the receiver on the other end makes a connection.

6 0
3 years ago
Other questions:
  • A user has a PC with RAID configuration and reports slow computer performance. A technician uses the manufacture’s diagnostic so
    12·1 answer
  • A primary mailing list for new vulnerabilities, called simply __________, provides time-sensitive coverage of emerging vulnerabi
    10·1 answer
  • Write a program with total change amount as an integer input that outputs the change using the fewest coins, one coin type per l
    13·1 answer
  • Which term describes a process by which malicious code can enter from a non-secure network, and make a hairpin, or sharp turn, a
    6·1 answer
  • Practice problems on functions. Write C function(s) to carry out the specified tasks. For each problem, also write the suggested
    15·1 answer
  • What is an Action Button?
    10·1 answer
  • Which of these statements about symmetric key encryption is true? The file is encrypted with a private key and can be decrypted
    14·1 answer
  • What is the amount of work you must input in order to move the stone?
    13·1 answer
  • Write a Python Program that:
    9·1 answer
  • Describe the conventional method of data processing​
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!