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
Your location has been assigned the 172.149.254.0 /24 network. You are tasked with dividing the network into 13 subnets with the
ira [324]
  • The subnet mask would be a 32-bit integer which is formed by assigning the host bits to all 0's and the networking bits to so many 1's.
  • In this method, the subnetting separates the IP address between host and network addresses.
  • The subnet mask covers an IP address with its 32-bit number, thus the term "mask".

Given:

Network IP address \bold{= 172.149.254.0 /24}

Subnet numbers \bold{= 13}

Calculating the borrow bits:

\to  \bold{= ceil(\log_{2} 13) = 4 \ bits}

a)

Calculating the dotted decimal value for the subnet mask:

\to \bold{11111111.11111111.11111111.00000000}\\\\\to \bold{255.255.255.240}\\\\

b)

The additional bits which will be needed to mask the subnet mask that is = 4.

Learn more: brainly.com/question/2254014

4 0
3 years ago
A slow response when opening applications or browsing the Internet, applications that do not work properly, an operating system
blagie [28]

Answer:

C. Symptoms of malware mutation

Explanation:

They are signs that could indicate that ones system is infected by virus.

Such signs includes:

1.Slow booting or startup.

2.Low space storage.

3.Blue screen of death.

4.Slow Internet performance.

5.Sending of spam messages.

6.Disabled security.

7.Browsing error.

8.Pop-up messages.

9.Renaming of files.

10.Loss of certain files, music, messages, etc.

3 0
3 years ago
Read 2 more answers
Discuss two advantages and two disadvantages of agile methods
Fofino [41]

Answer:

Two advantages of the agile methods are:

  • The agile method require less documentation process as compared to waterfall model and saves maximum time and money. It basically reduces the efforts and the amount of work.
  • In agile method, there is always high customer satisfaction present. In agile method, it is easy to modify in the data as compared to the waterfall model. The customers and developers always interact with each other as the interaction is very important for the good results in the project.

Two disadvantages of the agile methods are:

  • For the large and complex projects, sometimes it is difficult to determine the requirements in the software development as projects are easily go off track.
  • There is less predictability and the projects are easily messed up if the projects requirement are not clear by the customer end.

6 0
3 years ago
Create a Card class that represents a playing card. It should have an int instance variable named rank and a char variable named
Helen [10]

Answer:

Explanation:

The following code is written in Java. It creates the Card class and then uses it to create a full house and print out the rank and suit of every card in that hand.

class Card {

   int rank;

   char suit;

   public Card(int rank, char suit) {

       this.rank = rank;

       this.suit = suit;

   }

   public int getRank() {

       return rank;

   }

   public char getSuit() {

       return suit;

   }

}

class CardTester {

   public static void main(String[] args) {

       Card card1 = new Card(3, '♥');

       Card card2 = new Card(3, '♠');

       Card card3 = new Card(3, '♦');

       Card card4 = new Card(2, '♦');

       Card card5 = new Card(2, '♣');

       System.out.println("Card 1: " + card1.getRank() + " of " + card1.getSuit());

       System.out.println("Card 2: " + card2.getRank() + " of " + card2.getSuit());

       System.out.println("Card 3: " + card3.getRank() + " of " + card3.getSuit());

       System.out.println("Card 4: " + card4.getRank() + " of " + card4.getSuit());

       System.out.println("Card 5: " + card5.getRank() + " of " + card5.getSuit());

   }

}

3 0
3 years ago
A Lost link is an interruption or loss of the control link between the control station and the unmanned aircraft, preventing con
Vlad [161]

Answer:

There is nothing to answer from this statement.

Explanation:

Can you rephrase the statement into question?

4 0
3 years ago
Other questions:
  • Under what conditions might the Justice Department approve a merger between two companies that operate in an industry with a pos
    14·1 answer
  • Your friend is working on fixing their Homework assignment. They need a lot of help. You know all the bugs in the file, but due
    12·1 answer
  • What is the purpose of this diamond shape in a flowchart?
    8·1 answer
  • A computer has a word length of 8 bits (including sign). if 2’s complement is used to represent negative numbers, what range of
    5·1 answer
  • Under which of the following conditions will evaluating this boolean expression
    7·1 answer
  • What is the lowest layer of the OSI model at which LANs and WANs support the same protocols?
    5·1 answer
  • Using complete sentences post a detailed response to the following.
    13·1 answer
  • In which program structure does the processor verify the mentioned condition only after executing the dependent statements once?
    8·2 answers
  • Which tool ia used to create the world wide web?
    15·1 answer
  • Selah infects the ads on a website that users from her target company frequently visit with malware as part of her penetration t
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!