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. It has to be done in python.

1 answer
Question:

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. It has to be done in python.

Answers

Answer:The solution in python. Output:    print("0 is not a valid interstate highway number")Explanation:h = int(input("enter highway number: ")) #take highway numberif(h>=1 and h<=99): #for primary highway    if(h%2==0):        print("I-%d is primary, going east/west" %h) #for even highway number    else:        print("I-%d is primary, going north/south" %h) #for odd highway numberelif(h>=100 and h<=999): #for auxiliary highway    aux=str(h) #convert into string for fetch the rightmost number    l=len(aux) #find the length    val = aux[l-2]+aux[l-1] #assign value of rightmost two number    h = int(val) #convert into integer    if(h%2==0):        print("I-"+aux+" is auxiliary,"+"serving I-%d, going east/west" %h)    else:        print("I-"+aux+" is auxiliary,"+"serving I-%d, going north/south" %h)elif(h==0):#for 0 highway number    print("0 is not a valid interstate highway number")else:    pass

Similar Solved Questions

2 answers

Determine the amount of potential energy of a 5-newton book that is moved to three different shelves on a bookcase. The height of each shelf is 1.0 meter, 1.5 meters, and 2.0 meters.

Determine the amount of potential energy of a 5-newton book that is moved to three different shelves on a bookcase. The height of each shelf is 1.0 meter, 1.5 meters, and 2.0 meters....
1 answer

This random day based on the idiom, "No rhyme or reason," recognizes words that have no rhyme and encourages activities performed without a reason. Name another popular idiom and write about what you think it means.

This random day based on the idiom, "No rhyme or reason," recognizes words that have no rhyme and encourages activities performed without a reason. Name another popular idiom and write about what you think it means....
1 answer

The equation 5x +2y=20 represents the cost for a family to attend a play where x = the number of.kids & y=the number of children. find the intercepts & interpret the meaning of each one

the equation 5x +2y=20 represents the cost for a family to attend a play where x = the number of.kids & y=the number of children. find the intercepts & interpret the meaning of each one...
1 answer

Miras kitchen sink holds up to 103.468 liters of water. round this amount to the nearest liter

miras kitchen sink holds up to 103.468 liters of water. round this amount to the nearest liter...
1 answer

One side effect of the temperance movement in the united states was a ban on alcoholic beverages throughout the country in 1851

One side effect of the temperance movement in the united states was a ban on alcoholic beverages throughout the country in 1851...
1 answer

Define symbiosis. 99999

Define symbiosis. 99999...
1 answer

Owls Are Being Tort ured, Kil led at Johns Hopkins for ADHD ‘Research’ Please spread this! This is ANIMAL AB USE. not "research." Please spread the message!

Owls Are Being Tort ured, Kil led at Johns Hopkins for ADHD ‘Research’ Please spread this! This is ANIMAL AB USE. not "research." Please spread the message!...
2 answers

Which part of a cell is the largest and contains information for making new cells? The cell wall, the tissue, the nucleus, or the cell membrane?

Which part of a cell is the largest and contains information for making new cells? The cell wall, the tissue, the nucleus, or the cell membrane?...
2 answers

Solve for 4(6x+9)=28.

Solve for 4(6x+9)=28....
1 answer

Three interior angles of a quadrilateral measure 55° 170° and 120° what is the measure of the fourth interior angle?

three interior angles of a quadrilateral measure 55° 170° and 120° what is the measure of the fourth interior angle?...
1 answer

On february 1, pinn corp., paid $40,000 in advertising expenses for ads that will run in a periodical for the entire calendar year. on july 3, pinn paid $430,000 for anticipated major repairs to their machinery used for business. the repairs will benefit operations for the remainder of the calendar year. assuming pinn is a calendar year corporation, what amount of these expenses should pinn include in its third quarter interim financial statements?

On february 1, pinn corp., paid $40,000 in advertising expenses for ads that will run in a periodical for the entire calendar year. on july 3, pinn paid $430,000 for anticipated major repairs to their machinery used for business. the repairs will benefit operations for the remainder of the calendar ...
2 answers

Why are overuse injuries particularly frustrating set-backs?

Why are overuse injuries particularly frustrating set-backs?...
1 answer

I will give you braines i promise

I will give you braines i promise...
2 answers

Hello please help! 2 Pictures, first the question then the next one is the answers. Will give brainliest if correct!

Hello please help! 2 Pictures, first the question then the next one is the answers. Will give brainliest if correct!...
1 answer

If the economy is in recession with high unemployment and output below potential GDP, then __________________ would cause the economy to return to its potential GDP A. A tight monetary policy B. Fewer loanable funds C. A loose monetary polity D. Higher interest rates

If the economy is in recession with high unemployment and output below potential GDP, then __________________ would cause the economy to return to its potential GDP A. A tight monetary policy B. Fewer loanable funds C. A loose monetary polity D. Higher interest rates...
1 answer

2. Why was Oxford, Ohio, chosen by SNCC as the orientation location? Why did SNCC want to make it clear that the volunteers didn't really have to go if they didn't want to?

2. Why was Oxford, Ohio, chosen by SNCC as the orientation location? Why did SNCC want to make it clear that the volunteers didn't really have to go if they didn't want to?...
2 answers

What does that mean about the densities of the phases of water? O O The solid state is the most dense, followed by the liquid state, then the gas state. The solid state is more dense than the liquid state. The liquid state is more dense than the solid state. The gas state is the most dense, followed by the liquid state, then the solid state.

What does that mean about the densities of the phases of water? O O The solid state is the most dense, followed by the liquid state, then the gas state. The solid state is more dense than the liquid state. The liquid state is more dense than the solid state. The gas state is the most dense, followed...
1 answer

Up above thank you guys

up above thank you guys...
1 answer

If I knew at least the first question I could go from there

If I knew at least the first question I could go from there...

-- 0.012309--