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
Mike needs to write the primary objectives of a project in a project plan. In which section should he write them?
Advocard [28]

Mike needs to write the primary objectives of a project in a project plan. He should write this under the SCOPE section of the project plan.

Explanation:

  • Project scope is the part of project planning that involves determining and documenting a list of specific project goals, deliverables, features, functions, tasks, deadlines, and ultimately costs.
  • It is what needs to be achieved and the work that must be done to deliver a project.
  • The Scope of Work (SOW) is the area in an agreement where the work to be performed is described.
  • The SOW should contain any milestones, reports, deliverables, and end products that are expected to be provided by the performing party. The SOW should also contain a time line for all deliverables.
  • The scope is simply all the work that needs to be done in order to achieve a projects objectives.
  • A project scope, or project scope statement, is a tool used to describe the major deliverables of a project including the key milestones, high level requirements, assumptions, and constraints.

7 0
3 years ago
Looking at the example below is the type value equal to a string or an integer?
Simora [160]
B. Integer I think that’s the answer
5 0
2 years ago
Read 2 more answers
In the source-code file containing a class’s member function definitions, each member function definition must be tied to the cl
jenyasd209 [6]

Answer:

Binary Scope Resolution Operator

Explanation:

The :: (scope resolution) operator is used to get hidden names due to variable scopes so that you can still use them. The scope resolution operator can be used as both unary and binary. Fortunately, in this context we're not dealing with hidden contents; thus the Binary applies better than the Unary.

Cheers

5 0
3 years ago
5.4.6: Rolling Dice code
ziro4ka [17]
It is 15 all together
4 0
2 years ago
What does module in Python do? How to install it? Thanks!
lyudmila [28]
A Python module is an extension file which contains programmable resources for a given translation unit. This is very much like a header file in C and C++, it's modularized data. For example, say I wanted to write a server/client script. I can't easily do so with Python out of the box. I would require the "socket" module which contains all of the functions, variables and data structures which allow for network programming.

network.py
___________
from socket import *

s = socket(AF_INET, SOCK_STREAM)
(...)
8 0
3 years ago
Other questions:
  • If the computer you are using is a laptop that moves from one network to another, you can click the _____ tab and configure stat
    7·1 answer
  • How many instructions can the microprocessor execute each second if the assembly line is present?
    12·1 answer
  • Assume that a gallon of paint covers about 350 square feet of wall space. Create anapplication with a main() method that prompts
    5·1 answer
  • . double x = 5; declares that x is a...............variable.
    14·1 answer
  • True or false?
    15·2 answers
  • When using bits to represent fractions of a number, can you create all possible fractions? Why or why not?
    13·1 answer
  • . In the BorderLayout class, what are NORTH, SOUTH, EAST, WEST, and CENTER?
    15·1 answer
  • How do you render and export files on blender
    6·1 answer
  • What is normalization?
    7·1 answer
  • Today's manufacturing workplace is most likely to include
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!