subject

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 1-90, going cast/west.
Ex: If the input is:
0
the output is
0 is not a valid interstate highway number.
1 nighway_number - int(input)
2
3 *** 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 else
10 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.)
17
18 else:
19 print('1', highway_number, 'is auxiliary, rving I-','%.f.' Xserved, 'going north/south.)
19 Develop mode Submit mode
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.
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.
Input
Your output

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Determine which of the four levels of measurement (nominal, ordinal, interval, ratio) is most appropriate for the data below. internet speed levels of "fast comma " "medium comma " and "slow" choose the correct answer below. a. the ordinal level of measurement is most appropriate because the data can be ordered comma but differences left parenthesis obtained by subtraction right parenthesis cannot be found or are meaningless. nothing nothing nothing nothing nothing b. the interval level of measurement is most appropriate because the data can be ordered comma differences left parenthesis obtained by subtraction right parenthesis can be found and are meaningful comma and there is no natural starting point. c. the nominal level of measurement is most appropriate because the data cannot be ordered. nothing d. the ratio level of measurement is most appropriate because the data can be ordered comma differences left parenthesis obtained by subtraction right parenthesis can be found and are meaningful comma and there is a natural starting point.
Answers: 2
question
Computers and Technology, 22.06.2019 11:00
How does a policy manual an organization? a. it boost productivity. b. it create awareness in employees about the organization’s values. c. it employees achieve targets. d. it safeguards the organization from liabilities.
Answers: 1
question
Computers and Technology, 23.06.2019 01:30
How do you set up a slide show to play continuously, advancing through all the slides without requiring your interaction? a. click set up slide show, and then select the loop continuously until ‘esc' and show without narration options. b. click set up slide show, and then select the loop continuously until ‘esc' and use timings, if present options. c. click set up slide show, and then select the show presenter view and use timings, if present options. d. click set up slide show, and then select the show without animation and browsed at a kiosk (full screen) options.
Answers: 3
question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut off on an hev are both colored orange
Answers: 1
You know the right answer?
Primary U. S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go north/south,...
Questions
question
Social Studies, 05.04.2020 21:08
question
Mathematics, 05.04.2020 21:13
question
Mathematics, 05.04.2020 21:15
Questions on the website: 13722362