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
Gennadij [26K]
3 years ago
5

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.
Computers and Technology
1 answer:
yanalaym [24]3 years ago
7 0

Answer:

The solution in python.

Output:

   print("0 is not a valid interstate highway number")

Explanation:

h = int(input("enter highway number: ")) #take highway number

if(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 number

elif(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

You might be interested in
What aviation first is janice brown credited with
Alla [95]

Janice Brown is a former teacher who flew the first long-distance solar-powered flight. She flew a small experimental solar-powered aircraft six miles.

Let me know if you have any questions.

7 0
3 years ago
All data process by a computer must be in 1. binary form 2. Hexadecimal form 3. Duodecimal form 4. Unitary form?
avanturin [10]

Binary code I believe.

3 0
3 years ago
Read 2 more answers
How old am i <br> (Will give brainliest)
diamong [38]
You’re probably thirteen
4 0
2 years ago
For which tasks would Excel be useful? Check all that apply.​
ludmilkaskok [199]

Answer:

1. Create Charts or Graphs

2. Storing Financial Data

3. Analyzing data to draw conclusions

Explanation:

8 0
3 years ago
Read 2 more answers
You have the opportunity to meet some droids and Wookies!
scZoUnD [109]

Answer:

name = input("Enter name: ")

droids = int(input("How many droids you want to meet? "))

wookies = int(input("How many Wookies you want to meet? "))

   

print(name + " wants to meet " + str(droids) + " droids, and " + str(wookies) + " Wookies")

Explanation:

*The code is in Python.

Ask the user to enter the name, number of the droids and number of the Wookies

Print the name, number of the droids, and number of the Wookies

Note that while getting the input for the droids and wookies, you need to typecast the input the int (Since the values are int). Also, to print these variables, you need to typecast them as string in that format.

5 0
3 years ago
Other questions:
  • How can you best utilize CSS for Web Development?
    6·1 answer
  • Explain which are of the brain you think might light up to show that you are telling a lie and why
    10·1 answer
  • Explain Cascading Style Sheets and what they do. Describe their primary function, two effects that this function has on programm
    11·1 answer
  • Prominent is another word for stands out. True False
    13·1 answer
  • Which of the following is considered a benefit when using slab allocator?
    6·1 answer
  • Working for the Internal Revenue Service is a career in public safety. A. True B. False
    14·1 answer
  • Fill in the blanks Pasaline could ----- and ------- very easily.​
    8·1 answer
  • What are some common uses of Excel?
    10·1 answer
  • Where would you click to see the list of microsoft word styles?
    15·1 answer
  • You have implemented an access control method that only allows users who are managers to access specific data. Which type of acc
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!