Python- please write using exceptions. Thank you
Python (make inside of a function:) Write a car program. If the user types "help", you give them instructions. If they type start, the car starts (print a message) or tells the user that it’s already started, if they type stop, the car stops or tells the user that it’s already stopped, if they type quit, it exits the game. If they type anything else, throw an exception.

Answers

Answer 1

Certainly! Here's an example of a car program written in Python using exceptions:

```python

def car_game():

   car_started = False

   while True:

       user_input = input("Enter a command (start, stop, help, quit): ")

       try:

           if user_input == "help":

               print("Instructions: Enter 'start' to start the car, 'stop' to stop the car, 'quit' to exit the game.")

           elif user_input == "start":

               if car_started:

                   raise Exception("The car is already started.")

               else:

                   car_started = True

                   print("Car started. Ready to go!")

           elif user_input == "stop":

               if not car_started:

                   raise Exception("The car is already stopped.")

               else:

                   car_started = False

                   print("Car stopped.")

           elif user_input == "quit":

               print("Exiting the game...")

               break

           else:

               raise Exception("Invalid command. Please try again.")

       except Exception as e:

           print("Error:", str(e))

car_game()

```

In the above code, the `car_game()` function sets up a loop where the user can enter commands. The program uses a try-except block to catch and handle exceptions.

- If the user enters "help," it prints the instructions.

- If the user enters "start," it checks if the car is already started. If it is, it raises an exception. Otherwise, it starts the car.

- If the user enters "stop," it checks if the car is already stopped. If it is, it raises an exception. Otherwise, it stops the car.

- If the user enters "quit," it exits the game.

- If the user enters anything else, it raises an exception for an invalid command.

Any exceptions raised within the try block are caught by the except block, and the corresponding error message is printed. The loop continues until the user chooses to quit the game.

Learn more about try-except block here:

https://brainly.com/question/29841663

#SPJ11


Related Questions

What are the four scanning systems as per biomedical engineering​

Answers

Answer:

- Ultrasound scanning system

- Magnetic Resonance Imaging (MRI)

- Computed tomography (CT)

- X - Ray scan

Explanation:

\(.\)

Answer:

- USS Ultarsound

- Medical sonography

Hey guys can anyone list chemical engineering advancement that has been discovered within the past 20 years

Answers

Top 10 Emerging Technologies in Chemistry
Nanopesticides. The world population keeps growing. ...
Enantio selective organocatalysis. ...
Solid-state batteries. ...
Flow Chemistry. ...
Porous material for Water Harvesting. ...
Directed evolution of selective enzymes. ...
From plastics to monomers. ...

true or false? what is a clock.

Answers

Answer:

tralse

Explanation:

it just makes sense yk what I mean XD

im a genius.. brain.ly everyday,

Answer:

true or false makes no sense

Explanation:

a clock is something u use to tell time, like u look at it and be like omg my mom is getting old lol

Let's now zoom in to the switches between Alice and Bob. Suppose that a pair of switches X and '1' are connected by a fiber optic link. The first switch begins transmitting the largest IP packet allowed by Ethernet, sending at the 00-24 rate (you will have to look up what these two values are). Just as switch X finishes sending the packet payload, switch Y receives the first bit of the IP packet, meaning the "width" of the packet is the length of the fiber. The speed of light in fiber is 2;"3 the speed of light in a vacuum. j. [4 points] What is the distance between switch X and switch Y? k. [2 points] Suppose the link is swapped to 00-3. Does the "width" of a packet on the wire become shorter or longer? Why?

Answers

The distance between switch X and switch Y is determined by the time it takes for the first bit of the IP packet to travel from switch X to switch Y.

The distance between switch X and switch Y can be calculated by considering the speed of light in fiber optic cables. Since the speed of light in fiber is 2/3 times the speed of light in a vacuum, we can use this information to determine the distance.

First, let's find the time it takes for the first bit of the IP packet to travel from switch X to switch Y. The rate at which the packet is being sent is given as 00-24. In Ethernet notation, 00 represents 10 Mbps and 24 represents 1 Gbps. Therefore, the packet is being sent at a rate of 10 Mbps.

The largest IP packet allowed by Ethernet is 1500 bytes. To find the time it takes for the packet payload to be transmitted, we divide the packet size by the transmission rate:

1500 bytes / 10 Mbps = 0.15 milliseconds

Now, since the "width" of the packet is equal to the time it takes for the first bit to reach switch Y, and the speed of light in fiber is 2/3 times the speed of light in a vacuum, we can calculate the distance as follows:

Distance = (Speed of light in fiber) * (Time it takes for the first bit to travel)

        = (2/3 * Speed of light in vacuum) * (0.15 milliseconds)

        ≈ 0.1 * Speed of light in vacuum

Therefore, the distance between switch X and switch Y is approximately 0.1 times the speed of light in a vacuum.

Learn more about distance

brainly.com/question/33716087

#SPJ11

The sleek design and the superb engineering of our latest hybrid vehicle ____ it appealing to a wide range of customers.

Answers

The sleek design and the superb engineering of our latest hybrid vehicle make it appealing to a wide range of customers.

The design and engineering of our hybrid vehicle are top-notch, combining both form and function. The sleek exterior is not only visually appealing but also aerodynamically efficient, while the hybrid technology under the hood is engineered to provide maximum fuel efficiency and performance.

As a result, our latest hybrid vehicle is sure to appeal to a wide range of customers who are looking for a stylish, efficient, and environmentally friendly vehicle. Whether they are concerned about reducing their carbon footprint, saving money on gas, or simply looking for a high-performance vehicle, our hybrid model is sure to satisfy their needs.

To know more about engineering visit:

https://brainly.com/question/31140236

#SPJ11

The city of Elmsfield is using electronic sensors to collect data on traffic patterns,

air pollution, and crime. This data is used to manage assets and resources more

efficiently and in real time. Which of these terms would better define the data

collected from the sensors in this scenario?

Answers

Real-time asset and resource management is facilitated by the utilization of this data.

What difficulties do data collection efforts face?

There are a number of difficulties that must be solved when putting a data collecting plan into practice. Aside from the basic problems with data collection, such as blank fields, missing pages, spelling errors, and erroneous variables, problems with the form structure might result in the collection of false data.

Data capture strategy: what is it?

The best way to profile your leads is determined by your data collection strategy, which ensures that you collect the information you need for both marketing and sales purposes while balancing a fantastic user experience and bringing uniformity to the way the data is then stored and even normalized.

To know more about data collection visit:-

https://brainly.com/question/30528695

#SPJ1

What engineering method uses a logical sequence of steps that begins with a specific problem, or perceived need, and results in a solution?

Answers

The engineering method that uses a logical sequence of steps that starts with a particular issue or perceived need and results in a solution is called the engineering design process. This method is used by engineers to create new technologies or enhance existing ones.

The engineering design process is a seven-step method for solving engineering problems. The following are the steps:

1. Determine the problem or opportunity: Recognize the difficulty or need to be resolved or accomplished.

2. Define the criteria and constraints: Define the limitations, such as cost, schedule, materials, size, etc.

3. Brainstorm and develop ideas: Produce a large number of possible solutions.

4. Choose a solution: Evaluate and compare alternatives and choose the best one.

5. Develop the solution: Create a detailed plan and test the design.6. Test the solution: Experiment with the design and make any necessary changes.

7. Present the solution: Communicate the results and explain how the design solves the problem.To summarize, the engineering design process is a systematic and rational approach to problem-solving that is frequently used by engineers. It is used to create new technologies or improve current ones. It involves seven stages that lead to the creation of an effective solution.

To know more about constraints visit:

brainly.com/question/32387329

#SPJ11

What grade did the american society of civil engineering give to the us infrastructure in 2013?.

Answers

The American society of civil engineering give us infrastructure in 2013 A grade of D

The overall score for America's infrastructure in all 16 categories is D+ in the 2013 Report Card, which is slightly higher than the D in ASCE's 2009 Report Card.

Six infrastructure sectors profited through increased private sector investment, focused initiatives in municipalities and states to perform renovations or repairs, or a one-time boost in government money.

Importantly, it is the first time the grades have increased since the American Society of Civil Engineers initially rated the quality of America's network in 1998. Nevertheless, a D+ rating remains unacceptable.

To know more about the American society of civil engineering, refer to the link: https://brainly.com/question/14845951

#SJP4

Can someone help me plz!!! It’s 23 points

Can someone help me plz!!! Its 23 points

Answers

Answer:

0.00695 A

Explanation:

µ represents \(10^{-6}\). Multiply this by 6,950.

Jay decides to walk home from school today. He lives 3 miles from school and can walk home in 45 minutes. At what rate is Jay traveling?

Answers

Answer: jay is traveling at 4 miles per hour :)

Explanation:

Which of the following navigation lights is required for non-powered vessels under 23 feet operating during times of restricted visibility

Answers

A masthead light is required for non-powered vessels under 23 feet operating during times of restricted visibility.

During times of restricted visibility, it is crucial for vessels to display the appropriate navigation lights to ensure safety and avoid collisions. Non-powered vessels, which include sailboats, rowboats, and canoes, are required to adhere to specific lighting regulations. In the case of non-powered vessels under 23 feet in length, a masthead light is required during times of restricted visibility.

The masthead light is typically a white light positioned at the highest point on the vessel, such as the top of the mast. It provides a 225-degree arc of visibility from dead ahead to 22.5 degrees abaft the beam on both sides of the vessel. The purpose of the masthead light is to make the vessel more visible to other boaters, indicating its presence and direction of travel.

By displaying a masthead light, non-powered vessels under 23 feet can improve their visibility during periods of restricted visibility, such as fog, darkness, or heavy rain. This helps other vessels to identify and navigate around them, reducing the risk of accidents or collisions.

Learn more about masthead light

brainly.com/question/10947272

#SPJ11.

Which of the following is a better thesis statement? Freedom is not free. American’s veterans pay a high price for our freedom. America’s veteran’s defend our freedom, but they sacrifice their personal ambitions and their lives, and many of them suffer physically and mentally from their experiences.

Answers

Answer:

C). America’s veterans defend our freedom, but they sacrifice their personal ambitions and their lives, and many of them suffer physically and mentally from their experiences.

Explanation:

A good thesis statement must provide the central idea or theme of the paper or the essay in a capsule form along with its theoretical base. The key characteristics of a thesis statement are its arguability, specificity, and intensity. As per these descriptions, the above statement correctly relates the main point('America's...freedom') very clearly and precisely. It also contains the arguability which can be supported through further evidences.

what is workshop technology​

Answers

Answer:

Workshop technology is the type of technology which deals with different processes by which component of a machine or equipment are made. Its purpose is that the module unit is designed to equip the trainee with knowledge, skills, and attitudes that enable to perform basic workshop tasks.

why you so mean to me? leave my questions please. answer them

Answers

Answer: Why is even here then.

Explanation:

The dog is in the car with the car so they will be in ythe it is the day you get the car you need it and the car

Answers

Answer:

yes

Explanation:

which of the following is true? a. a radial load is applied when the pressure from the load is perpendicular to the axis of the shaft, whereas an axial load is applied when the pressure from the load is parallel to the axis of the shaft. b. an axial load is applied when the pressure from the load is perpendicular to the axis of the shaft, whereas a radial load is applied when the pressure from the load is parallel to the axis of the shaft. c. both radial and axial loads are applied when the pressure from the load is perpendicular to the axis of the shaft. d. both radial and axial loads are applied when the pressure from the load is parallel to the axis of the shaft.

Answers

Option A holds the correct answer. Because the statement given in option A truly reflects the radial load and axial load.

When the load pressure is perpendicular to the axis of the shaft, a radial load is applied and when the load pressure is parallel to the axis of the shaft, an axial load is applied. In other words, the radial load is applied when the pressure from the load is 'perpendicular to the axis of the shaft'. In contrast, the axial load is applied when the pressure from the load is 'parallel to the axis of the shaft'.

However, the rest of the statements are not correct in the context of radial loads and axial loads.

You can learn more about load pressure at

https://brainly.com/question/28012687

#SPJ4

Identify the Levels of Biological Organization below. Copy and answer each statement. Write
your answer on the answer sheet provided.
1. The basic unit of a chemical element
2. A group of atoms bonded together representing the smallest
unit that can take part in a chemical reaction.
3. Is a basic unit of life.
4. Group of similar cells that perform a function.
5. Group of tissues that work together to perform to perform
a specific function
6. A group of organs that work together to perform a
specific function.
7. An entire living thing that carries of the basic life functions.​

Identify the Levels of Biological Organization below. Copy and answer each statement. Writeyour answer

Answers

Answer:

no idea

Explanation:

gvghvvvghhbbgggggggig gjgjg gjgbg gig gg bg GB g GB GB GB GB g GB GB GB of me and I am a diary and crewmate hide if you see a diary or not the other person is a non-electrolyte or no one vent the imposter win a diary or you can get any more confidently than you are in a spectacular place is the most important points to be mo to get skins and crewmate for a few days to be sure it will be the same for me it will take a while for a couple to get the right angle bu the other one is come to the end and then you have birds to get a lot more than a diary of a candle or no other one in a few weeks or no time to do it for me and my friend who has no idea how much time I have been to a new episodes and the best of all the time I am going sleep

True or false It is legal to pass in Florida when approaching within 100 feet of or traversing any railroad crossing grade croead

Answers

That is a false statement.

under what conditions will a gcu remove it's associated generator from the bus system aircraftsystemstech

Answers

A generator control unit (GCU) is a gadget that controls the production of electrical power by an aircraft's electrical generators.

It is made up of electronic hardware that provides several generator functions,

including voltage regulation, synchronization, load distribution, and overvoltage and overcurrent protection.

The following are the conditions under which a GCU may remove its associated generator from the bus system:

Overvoltage/over frequency:

If the generator voltage rises above the system voltage or the frequency exceeds the set limit,

the GCU may remove the generator from the system to prevent damage to the aircraft's electrical equipment and generator itself.

Underfrequency:

If the generator frequency falls below a set limit,

the GCU may remove the generator from the system to avoid power supply complications.

Overcurrent:

If the generator current exceeds a predetermined threshold,

the GCU may remove the generator from the system to protect the generator from damage and avoid power supply complications.

Overtemperature:

If the generator's temperature rises above a certain point, the GCU may remove it from the system to avoid damage to the generator and the aircraft's electrical equipment.

To know more about electrical visit:

https://brainly.com/question/33513737

#SPJ11

People tend to self-disclose to others that are in age, social status, religion, and personality.

Answers

Answer:people tend to do this when they are in a different environment they lose something or just have something going on in their life

Explanation:

the source for mechanical motion supplied to a generator is referred to as the ? .

Answers

The source for mechanical motion supplied to a generator is referred to as the prime mover.

A generator is a device that converts mechanical energy into electrical energy. The mechanical energy is typically supplied by a prime mover, which is any device that can supply the necessary rotational force to turn the generator's rotor. The prime mover can be powered by various sources of energy, such as fossil fuels, nuclear energy, hydroelectric power, wind power, or solar power.

The type of prime mover used depends on the specific application and available resources. For example, in a traditional power plant, the prime mover is typically a steam turbine that is powered by burning fossil fuels or nuclear reactions. In a hydroelectric power plant, the prime mover is the water that drives the turbine. In a wind turbine, the prime mover is the kinetic energy of the wind that turns the rotor blades.

Regardless of the type of prime mover used, the goal is to provide the necessary mechanical motion to turn the generator's rotor. The rotor is surrounded by a stator, which contains a series of electromagnets that produce a magnetic field. As the rotor turns, it generates an electrical current in the stator coils through the process of electromagnetic induction. This current is then transmitted through power lines to homes, businesses, and other electrical loads.

In summary, the prime mover is the source of mechanical motion that is supplied to a generator to produce electrical energy. The type of prime mover used depends on the specific application and available resources.

To learn more about mechanical energy, click here: brainly.com/question/19381962

#SPJ11

There is a 8 bit binary counter, based on 74LS16x family.It presents on the output the next sequence periodically :32,33,...66 -> 85,86,....130 ->173,174,...199 -> 32,33,..
1. Design the block- diagram of the network! 2. Specify the input and output signals of the blocks of the block-diagram, and the tasks of the boxes (what happens between the input and output signals of the block)! 3. Design the logical network of the boxes (you have to apply the signal-names of the block-diagram! You may apply any MSI circuits, which we studied (4 bit parallel adder, 4 bit cascadable comparator, 4 bit 7416x binary uo-counter,...) and the neccessary number of NAND/NOR/AND/OR/EXCLUSIVE OR/INCLUSIVE OR gates and SR/JK/DG/D/T flip-flops.

Answers

The block diagram of the network consists of various components and connections that enable the functioning of the 8-bit binary counter based on the 74LS16x family.

What are the input and output signals of the blocks in the block diagram, and what are the tasks of each box in terms of signal processing?

The logical network of the boxes in the block diagram involves the use of MSI circuits, such as the 4-bit parallel adder, 4-bit cascadable comparator, and 4-bit 7416x binary up-counter, along with the necessary number of logic gates and flip-flops. The input signals of the blocks in the block diagram include the clock signal, control signals, and data signals. The clock signal is used to synchronize the operations of the counter, while the control signals determine the specific sequence and timing of the output values. The data signals represent the binary values that are processed and propagated through the counter.

The tasks of the boxes in the block diagram involve performing specific operations on the input signals to generate the desired output sequence. For example, the 4-bit parallel adder can be used to increment the binary count by one, while the cascadable comparator can be utilized to compare the current count with predefined values to trigger specific actions. The 7416x binary up-counter can be employed to maintain the count and propagate it to subsequent stages.

In addition to these MSI circuits, logic gates such as NAND, NOR, AND, OR, XOR, and XNOR, as well as flip-flops like SR, JK, D, and T, are used to implement the necessary logic operations and sequential behavior within the counter.

Learn more about block diagram

brainly.com/question/13441314

#SPJ11

Tony works as a Sorter in a processing factory. Which qualifications does he most likely have?


teaching skills, for helping people perform farm tasks, and creative thinking skills, for finding ways to process food
safety skills, for handling tools and food products, and honesty, for following rules and regulations
accuracy, for closely inspecting equipment and operating heavy machinery safely
accuracy, for monitoring animals, and patience and determination, for observing and caring for animals

Answers

Answer:

answer is B

Explanation:

If the rod of negligible mass is subjected to a couple moment of M = (30t2) N . m and the engine of the car supplies a traction force of F=(15t) N to the wheels, where t is in seconds, determine the speed of the car at the instant t=5 s. The car starts from rest. The total mass of the car and rider is 150 kg. Neglect the size of the car.

Answers

The speed of the car at t=5 s is 9.55 m/s. We can use the principle of work and energy to solve this problem.

The work done by the couple moment and the work done by the engine will be equal to the change in kinetic energy of the car.

The work done by the couple moment from time t=0 to t=5 is given by:

W1 = ∫(0 to 5) M dt = ∫(0 to 5) 30t^2 dt = 1250 N.m

The work done by the engine from time t=0 to t=5 is given by:

W2 = ∫(0 to 5) F ds = ∫(0 to 5) F v dt

where v is the velocity of the car and ds is the distance traveled by the car.

The distance traveled by the car can be determined from the equation of motion:

F = ma

where a is the acceleration of the car. Rearranging the equation, we get:

a = F/m = (15t)/150 = 0.1t m/s^2

Integrating the acceleration with respect to time, we get:

v = ∫(0 to 5) a dt = ∫(0 to 5) 0.1t dt = 0.5t^2 m/s

Substituting this expression for v in the expression for W2, we get:

W2 = ∫(0 to 5) F v dt = ∫(0 to 5) (15t)(0.5t^2) dt = 312.5 J

The change in kinetic energy of the car is given by:

ΔK = W1 + W2 = 1250 + 312.5 = 1562.5 J

At time t=5 s, the kinetic energy of the car is:

K = (1/2)mv^2

where m is the mass of the car and rider, and v is the velocity of the car. Rearranging the equation, we get:

v = √(2K/m)

Substituting the values, we get:

v = √(2(1562.5)/150) = 9.55 m/s

Therefore, the speed of the car at t=5 s is 9.55 m/s.

Learn more about  couple moment here:

https://brainly.com/question/30720777

#SPJ11

You are the network engineer for Muhan Mobile Services. The network administrator has asked you to separate the authentication, auditing, and authorization process. Which of the following tools will you use in such a scenario?1. RADIUS2. TACACS+3. RBAC4. Kerberos

Answers

TACACS+: A TCP-based access control protocol that enables a device to send a user's username and password to an authentication server in order to assess whether access is permitted.

What is TACACS+ ?

If set up in this way, TACACS+ itself can function as an authentication server. Additionally, TACACS+ can offer services for accounting and authorization. The TACACS+ daemon is normally operating on a UNIX or Windows workstation, and TACACS+ services are kept up to date in a database on a server.

It offers distinct and modular facilities for authentication, authorization, and accounting. The TACACS+ daemon, a single access control server, enables autonomous provision of each service for authentication, authorization, and accounting. To benefit from various services offered on that server or on the Internet, each service can be connected to its own database.

Depending on the daemon's capabilities, a network. With the help of a single administration service, TACACS+ aims to offer a solution for managing numerous network access points.

What are the features of Kerberos authentication system?

1. Its architecture is client-server-based.

2. The Authentication Service (AS) and the Ticket Granting Service are implemented by the Kerberos server, also known as KDC (Key Distribution Cater) (TGS).

3. When a client communicates with an application server utilizing Kerberos tickets for authentication, the phrase "application server" normally refers to a Ferberized program. An example of an application server is the Kerberos telnet daemon (telnets).

4. Passwords are not transmitted over the network, in contrast to other authentication protocols (FTP, PAP, etc.) that do so.

To learn more about TACACS+ visit:

https://brainly.com/question/29770627

#SPJ4

an unbroken wall space having a minimum width of 48 inches shall be considered a wall space for the purpose of determining receptacle outlet distribution.

Answers

Yes, that is correct. According to the National Electrical Code (NEC), an unbroken wall space that has a minimum width of 48 inches is considered a wall space for the purpose of determining the distribution of receptacle outlets.

This means that for every 12 linear feet of wall space, at least one receptacle outlet must be installed. Additionally, no point along the wall should be more than 6 feet away from an outlet. It's important to follow these guidelines to ensure that there are enough receptacles to meet the electrical needs of the space and to promote safety by preventing overloading of circuits.

learn more about receptacle outlets. here:

https://brainly.com/question/14514615

#SPJ11

Timken rates its bearings for 3000 hours at 500 rev/min. Determine the catalog rating for a ball bearing running for 10000 hours at 1800 rev/min with a load of 2.75 kN with a reliability of 90 percent.

Answers

Answer:

C₁₀ = 6.3 KN

Explanation:

The catalog rating of a bearing can be found by using the following formula:

C₁₀ = F [Ln/L₀n₀]^1/3

where,

C₁₀ = Catalog Rating = ?

F = Design Load = 2.75 KN

L = Design Life = 1800 rev/min

n = No. of Hours Desired = 10000 h

L₀ = Rating Life = 500 rev/min

n₀ = No. of Hours Rated = 3000 h

Therefore,

C₁₀ = [2.75 KN][(1800 rev/min)(10000 h)/(500 rev/min)(3000 h)]^1/3

C₁₀ = (2.75 KN)(2.289)

C₁₀ = 6.3 KN

I really need help on this!
Which of the following is a term for a comparison between product metrics and values to industry standards and competitions metrics and values?
A: ideal value
B: competitive analysis
C: benchmark
D: marginally accepted value

Answers

C: benchmark because I have done this before
The answer is D!
Plz mark brainliest

10.16.1: LAB: Interstate highway numbers (Python)


Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go north/south, and evens (like the 10 or 90) go east/west. Auxiliary highways are numbered 100-999, and service the primary highway indicated by the rightmost two digits. Thus, I-405 services I-5, and I-290 services I-90.


Given a highway number, indicate whether it is a primary or auxiliary highway. If auxiliary, indicate what primary highway it serves. Also, indicate if the (primary) highway runs north/south or east/west.


Ex: If the input is:


90


the output is:


I-90 is primary, going east/west.


Ex: If the input is:


290


the output is:


I-290 is auxiliary, serving I-90, going east/west.


Ex: If the input is:


0


the output is:


0 is not a valid interstate highway number.


----------------------------------------------------------------------------

The code I have is:


highway_number = int(input())


if 1 <= highway_number <= 999:

if highway_number <= 99:

if highway_number % 2 == 0:

print("I-" + str(highway_number) + " is primary, going east/west.")

else:

print("I-" + str(highway_number) + " is primary, going north/south.")


else:

primary_number = highway_number

highway_number %= 100

if highway_number % 2 == 0:

print("I-" + str(primary_number) + " is auxiliary, serving I-" + str(highway_number) + ", going east/west.")

else:

print("I-" + str(primary_number) + " is auxiliary, serving I-" + str(highway_number) + ", going north/south.")

else:

print(str(highway_number) + " is not a valid interstate highway number.")

--------------------------------------------------------------------------------------------------------------

How do I get 200 to say it is not a valid interstate highway number?

Answers

Hope it helps. Thanks
10.16.1: LAB: Interstate highway numbers (Python)Primary U.S. interstate highways are numbered 1-99.

The program is an illustration of conditional statements.

The program in Python where comments are used to explain each line is as follows:

highwayNumber = int(input("Highway number: "))

#This checks if the highwayNumber is not between 1 and 999 (inclusive)

if (highwayNumber <1 or highwayNumber > 999):

   #If yes, the highwayNumber is invalid

   print(str(highwayNumber)+" is not a valid interstate highwayNumber number.")

#If otherwise

else:

   #This checks if highwayNumber is less than 100

   if (highwayNumber< 100):

       if (highwayNumber%2 == 0):

           #Even highwayNumber are primary going east/west

           print("I-"+str(highwayNumber)+" is primary, going east/west.")

       else:

           #Odd highwayNumber are primary going north/south

           print("I-"+str(highwayNumber)+" is primary, going north/south.")

   #Otherwise

   else:

       if ((highwayNumber%100) % 2 == 0):

           #Even highwayNumber are auxiliary going east/west

           print("I-"+str(highwayNumber)+" is auxiliary, going east/west.");

       else:

           #Even highwayNumber are auxiliary going north/south

           print("I-"+str(highwayNumber)+" is auxiliary, going north/south.");

Read more about similar programs at:

https://brainly.com/question/14551419

A D-aldohexose X, is subjected to a Ruff degradation. The degradation product is treated with nitric acid to yield an optically inactive aldaric acid. A possible structure for X is:

Answers

The Ruff degradation is a chemical reaction used to convert an aldose sugar into an optically inactive aldaric acid. Based on the information provided,

we know that the degradation of D-aldohexose X yields an optically inactive aldaric acid. Without additional information or specific details about the reaction and its products, it is not possible to determine the exact structure of the aldohexose X or its degradation product. Without additional information or the specific structure of the optically inactive aldaric acid, it is not possible to determine the exact structure of the D-aldohexose X. The Ruff degradation and subsequent treatment with nitric acid result in an optically inactive aldaric acid, which suggests that X could be a meso compound or a racemic mixture. Both meso compounds and racemic mixtures lack optical activity due to the presence of an internal plane of symmetry or an equal mixture of enantiomers, respectively.

learn more about degradation here :

https://brainly.com/question/30757532

#SPJ11

Other Questions
A cellular phone company monitors monthly phone usage. The following data represent the monthly phone use in minutes of one particular customer for the past 20 months. Use the given data to answer parts (a) and (b).326456461429508413534434455401332352554343540504449329444453Question content area bottomPart 1(a) Determine the standard deviation and interquartile range of the data.s=enter your response here (Round to two decimal places as needed.)Part 2IQR=enter your response here (Type an integer or a decimal.)Part 3(b) Suppose the month in which the customer used 326 minutes was not actually that customer's phone. That particular month the customer did not use their phone at all, so 0 minutes were used. How does changing the observation from 326 to 0 affect the standard deviation and interquartile range? What property does this illustrate?The standard deviation increasesis not affecteddecreases and the interquartile range decreasesis not affectedincreases.Part 4What property does this illustrate? Choose the correct answer below.ResistanceDispersionWeighted MeanEmpirical Rule Who is Sergeant Clarence Williams probably writing his letter to? 10mg/1ml pure herring sperm diluted with 10ml sterile distilled water to C1 of 1000g/ml. C1 Concentration of stock (1000g/ml) V1 Volume of stock needed (l) C2 Final Concentration (g/ml) O 100 80 75 70 60 50 30 25 5 V2 Final volume (2,000l) 2,000 2,000 2,000 2,000 2,000 2,000 2,000 2,000 2,000 1,000 1,000 1,000 1,000 1,000 1,000 1,000 1,000 1,000 Volume of H0 required (l) Use water as a diluent and blank Mix each standard by inversion and measure the absorbance at 260nm (A260) with a UV - compatible cuvette. Graph your standard curve. On the graph include coefficient of regression (R) and line graph equation (Y = mx + C). Javier has $15 to spend on action figures if each figure cost $2 what is the greatest number of action figures he can buy? for which organic compounds must information be encoded in dna for green plants to synthesize the other three compounds? at the end of two years, what will be the balance in a savings account paying 6 nnually if $26000 is deposited today? the future value of one at 6or one period is 1.06. $26000 $29120 $29214 $27560 Suppose your alarm made a slight clicking sound just before the alarm goes off. Even though you didn't wake up to the clicking sound initially, now you do, due to classical conditioning. In this example, the clicking is a/an Group of answer choices help ------------------------- does anyone know the answer Which expression can be used to convert 100 USD to Japanese? Is the lyric Strumming my pain with his fingers a metaphor, poetic device, simile, personification, or onomatopoeia? create a c program that implements a bitmap to represent memory a bit map implementation is requested to manage the memory of size 128kb with the unit size being 2kb. I need a answer for this Evaluate the expression shown below and write your answer as a fraction insimplest form.3/4 - 3/10 a car of mass 1500 kg collides with a wall during a crush test. all of the energytrcnsferred during the collision is absorbed by the crumble zone. If the energy absorbed by the crumble zone is 4.3 x 10 to the power of 5 J, show that the speed of the car before the collision is 24 m/s. System B-x+2y-6=0x-2y=-61) No Solution2)Unique Solution3) This system has infinitely many solutions. They must satisfy the following equation: Y= 2. How do you treat your customers and employees? The authority to make decisions in enforcing the law based on one's observations and judgmentrather than the letter of the law is referred to as which of the following? division answer in feet and inches 8 divided by 34ft 8in help!i dont understand this spanish question.