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
What is the function for displaying differences between two or more scenarios side by side?
deff fn [24]

Answer:

its d

Explanation:

3 0
3 years ago
Read 2 more answers
Write a program that prints the following 45 pairs of numbers:
sattari [20]

Answer:

  • Code is in JAVA language. As there is no user input the logic is straightforward.
  • Below is the code along with a detailed explanation of the logic.
  • The class name is Print main save as file as the main class.

Explanation:

Program:-

public class Main{

public static void main(String args[]){

/* There are two for loops...

* First for loop runs from i=1 to i=9

* Second for loop runs from j=1 to j=i.

*

*/

for(int i=1;i<=9;i++){

for(int j=1;j<=i;j++){ // j loop runs from j=1 to j=i

/*Prints I and j next to each other*/

System.out.println(i+""+j);

}//for loop of j ends here

}// for loop of I ends here

}

}

6 0
3 years ago
Assume that you are testing the Orders database introduced in Watt (2014) - Appendix C. Discuss the problems and possible conseq
madreJ [45]

Answer:

129 \frac{2}{?} 23.4. \div 164 \times 5y1 + . \\ .00487ggh

6 0
3 years ago
List some of the ways that healthcare information technology is making healthcare more of a self-service industry?
harkovskaia [24]

Health information technology (HIT)) is "the utilization of data preparing including both PC equipment and programming that manages the capacity, recovery, sharing, and utilization of medicinal services data.

<u>Explanation:</u>

  • Improving personal satisfaction is one of the primary advantages of incorporating new advancements into medication.
  • Restorative advancements like negligibly intrusive medical procedures, better-observing frameworks, and progressively happy with checking gear are enabling patients to invest less energy in recuperation and additional time getting a charge out of a solid life.
  • An essential advantage of offering self-administration checkouts is that clients need them, and effective retailers give what their clients need.
  • The principal innovation is advantageous to people for a few reasons. At the therapeutic level, innovation can help treat increasingly wiped out individuals and subsequently spare numerous lives and battle exceptionally hurtful infections and microscopic organisms.
  • Indeed, three explicit reasons that innovation is acceptable is that it spares lives by improving prescription, keeps us associated with one another, and gives instruction and stimulation.
  • One motivation behind why innovation is acceptable is that it has spared numerous lives.
  • Innovation additionally can be used to improve instructing and learning and help our students be successful.
3 0
3 years ago
What is an 8086 microprocessor used for
Liula [17]
A sixteen bit microprocessor chip used in early IBM PCs. The Intel 8088 was a version with an eight-bit externaldata bus.

The Intel 8086 was based on the design of the Intel 8080 <span>and </span>Intel 8085 (it was source compatible with the 8080)with a similar register set, but was expanded to 16 bits. The Bus Interface Unit fed the instruction stream to theExecution Unit through a 6 byte prefetch queue, so fetch and execution were concurrent - a primitive form ofpipelining (8086 instructions varied from 1 to 4 bytes).

It featured four 16-bit general registers, which could also be accessed as eight 8-bit registers, and four 16-bit indexregisters (including the stack pointer). The data registers were often used implicitly by instructions, complicatingregister allocation for temporary values. It featured 64K 8-bit I/O (or 32K 16 bit) ports and fixed vectored interrupts.There were also four segment registers that could be set from index registers.

The segment registers allowed the CPU to access 1 meg of memory in an odd way. Rather than just supplyingmissing bytes, as most segmented processors, the 8086 actually shifted the segment registers left 4 bits and addedit to the address. As a result, segments overlapped, and it was possible to have two pointers with the same valuepoint to two different memory locations, or two pointers with different values pointing to the same location. Mostpeople consider this a brain damaged design.

Although this was largely acceptable for assembly language, where control of the segments was complete (it couldeven be useful then), in higher level languages it caused constant confusion (e.g. near/far pointers). Even worse, thismade expanding the address space to more than 1 meg difficult. A later version, the Intel 80386, expanded thedesign to 32 bits, and "fixed" the segmentation, but required extra modes (suppressing the new features) forcompatibility, and retains the awkward architecture. In fact, with the right assembler, code written for the 8008 canstill be run on the most <span>recent </span>Intel 486.

The Intel 80386 added new op codes in a kludgy fashion similar to the Zilog Z80 and Zilog Z280. The Intel 486added full pipelines, and clock doubling (like <span>the </span>Zilog Z280).

So why did IBM chose the 8086 series when most of the alternatives were so much better? Apparently IBM's own engineers wanted to use the Motorola 68000, and it was used later in the forgotten IBM Instruments 9000 Laboratory Computer, but IBM already had rights to manufacture the 8086, in exchange for giving Intel the rights to its bubble memory<span> designs.</span> Apparently IBM was using 8086s in the IBM Displaywriter word processor.

Other factors were the 8-bit Intel 8088 version, which could use existing Intel 8085-type components, and allowed the computer to be based on a modified 8085 design. 68000 components were not widely available, though it could useMotorola 6800 components to an <span>extent.
</span>
Hope this helps
7 0
3 years ago
Other questions:
  • What is a way to Procter your social security number and other sensitive information from identity theft
    9·1 answer
  • You receive a file named Project4.xlsx as an attachment to an email message. What do you expect the file to contain?
    8·1 answer
  • Implement a java program to find the smallest distance between two neighbouring numbers in an array.
    7·1 answer
  • Florida Highway Safety and Motor Vehicles reported blank of traffic fatalities were alcohol-related in Florida in 2009.​
    8·1 answer
  • Set methods are also commonly called _____ methods, and get methods are also commonly called _____ methods.
    6·1 answer
  • Your organization uses a type of cryptography that provides good security but uses smaller key sizes and utilizes logarithms tha
    9·1 answer
  • Write a program that first reads in the name of an input file and then reads the input file using the file.readlines() method. T
    7·1 answer
  • The best way to safeguard your document is to save it
    11·1 answer
  • Hazel has taught herself a variety of computer languages. She enjoys using her knowledge to write the programs for applications
    7·2 answers
  • When you start a new, blank document, you usually end up changing the font to arial 11. 5 point. How can you make these settings
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!