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
mestny [16]
2 years ago
8

Interstate highway numbers Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 of 95) go north/south, an

d 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 1-5, and I-290 services -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 1-90, going cast/west. Ex: If the input is: 0 the output is O is not a valid interstate highway number. See Wikipedia for more info on highway numbering. main.py Load default templ else 1 nighway_number - int(input) 2 Type your code here. " 4 if highway_number - 0: 5 print(highway_number, 'is not a valid interstate highway number.') 6 if highway_number in range(1, 99-1): 7 if highway..number % 2 - : 8 print('I-' highway number, "is primary, going east/west.") 9 print("I-' highway_number, "is primary, going north/south." 11 else: 12 served - highway_number % 100 13 if highway number - 1000: print highway_number, 'is not a valid Interstate highway number.') 15 if highway number in range(99, 999.1): 16 if highway_number 2 - 0 print('I..highway_number, 'is auxiliary, serving I.', 'x.f.' Xserved, 'going eastwest.) 18 else: print('1', highway_number, 'is auxiliary, rving I-','%.f.' Xserved, 'going north/south.) 10 14 17 19 Develop mode Submit mode When done developing your program press the Submit for grading button below. This will submit your program for auto-grading. Submit for grading Sature of your work Input 90 Your output I- 90 is primary, going east/west. Expected output I-90 is primary, going east/west. 0 2: Auxiliary (290) Output is nearly correct; but whitespace differs. See highlights below. Special character legend Input 290 Your output 1- 290 is auxiliary, serving I- 90, going east/west. I-290 is auxiliary, serving 1-90, going east/west. Expected output 3 Invalid (0) 1/1 Input 0 Your output is not a valid interstate highway number. 4. Compare output 0/2 Output is nearly correct; but whitespace differs. See highlights below Special character legend Input Your output
Computers and Technology
1 answer:
slavikrds [6]2 years ago
3 0

Answer:

See attachment for complete solution

Explanation:

<em>The program in your question is unreadable. </em>

<em>So, I started from scratch (see attachment for complete solution)</em>

Using the attached file as a point of reference.

The program has 15 lines

Line 1: Prompt the user for highway number (as an integer)

Line 2: Convert the user input to string

Line 3: Check if highway number is outside 1-999

Line 4: If line 3 is true, print a notice that the input is outside range

Line 5: If line 3 is not true

Line 6: Check if the number of highway digits is 2.

Line 7: If true, Check if highway number is an even number

Line 8: If even, print that the highway is primary and heads east/west

Line 9: If highway number is odd number

Line 10: Print that the highway is primary and heads north/south

Line 11: If the number of highway digits is 3

Line 12: Check if highway number is an even number

Line 13: If even, print that the highway is auxiliary and heads east/west

Line 14: If highway number is odd number

Line 15: Print that the highway is auxiliary and heads north/south

See attachment for complete program

Download txt
You might be interested in
6. What is the difference between portrait and landscape orientation? What are the advantages of
vlabodo [156]

Answer:

PORTRAIT ORIENTATION IS VERTICAL AND LANDSCAPE ORIENTATION IS HORIZONTAL

Explanation:

PORTRAIT SETTING CAN BE USED TO DESCRIBE MEANINGS OF LETTERS IN A WORD LANDSCAPE CAN BE USED TO DIFFERENTIATE  BETWEEN WORDS MEANINGS                                                                                                                                            

3 0
3 years ago
Under what conditions might the Justice Department approve a merger between two companies that operate in an industry with a pos
pogonyaev

Answer:

Explanation:

Overall an industry with a post merger Herfindahl-Hirschman index value of below 1500 is considered un-concentrated.In an extreme case,if the Herfindahl-Hirschman index in an industry exceeds 2900,it suggest that the industry is highly concentrated.

In that case if a merger is going to occur which is expected to raise the Herfindahl-Hirschman index by 255 points,then the FTC and DOJ might challenge a lawsuit against such merger,some other factor are also scrutinized.

This include economies of scale,economies of scopes and the ease in which there is an entry possible in the industry,The agencies like FTC and DOJ try to block horizontal merger if it expected to create unsuitable economic business environment for other firms in the industry

3 0
3 years ago
What part of a computer is the most important?
Nikitich [7]
The CPU is the most important. It is the brains of the Computer.
3 0
3 years ago
Read 2 more answers
_____ is a function performed by control programs that manages computer resources, such as storage and memory.
Fudgin [204]
Resource allocation is a function performed by control programs that manages computer resources, such as storage and memory. It is necessary for any application to be run on the system because the computer is required to allocate certain resources for it to be able to run once the user opens any program.


5 0
3 years ago
Write a program that prompts for a positive integer and prints the factors of all integers from 1 to that input integer. For exa
xeze [42]
74(Frequency) or 34(frequency)
7 0
2 years ago
Other questions:
  • WHAT IS SQL AND HOW CAN YOU MEET THE DATA REQUIREMENTS ALSO MAINTAINING DATA INTEGRITY,AND LASTLY STATE THE FULL MEANING OF SQL
    11·1 answer
  • Which of the following is a characteristic of the internet today? distributed network central hub lack of protocols absence of c
    5·1 answer
  • What additional features on your router would you implement if you were setting up a small wired and wireless network
    5·1 answer
  • How would you classify an employee who is punctual, has respect for oneself and others, and takes initiative?
    13·2 answers
  • Writе thе dеclaration of a doublе pointеr namеd avеragе
    10·1 answer
  • If a small monster collector:- Has 16 small monster containment devices and intends to use all of them.
    10·1 answer
  • 17. When an industrial electrical circuit requires a 220 VAC single phase power supply, the electric power supply circuit is nor
    7·1 answer
  • Write a program that asks the p34won to enter their grade, and then prints GRADE is a fun grade. Your program should repeat thes
    7·1 answer
  • What is the major difference between the intranet and extranet?
    11·1 answer
  • What are node in a computer network​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!