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
Dafna11 [192]
3 years ago
14

The smalled valid zip code is 00501. The largest valid zip code is 89049. A program asks the user to enter a zip code and stores

it in zip as an integer. So a zip code of 07307 would be stored as 7307. This means the smallest integer value allowed in zip is 501 and the largest integer value allowed in zip is 89049. Write a while loop that looks for BAD zip code values and asks the user for another zip code in that case. The loop will continue to execute as long as the user enters bad zip codes. Once they enter a good zip code the progam will display Thank you. The first line of code that asks for the zip code is below. You don't have to write this line, only the loop that comes after it.
Computers and Technology
1 answer:
Vlad1618 [11]3 years ago
5 0

Answer:

The program in Python is as follows:

zipp = int(input("Zip Code: "))

while (zipp > 89049 or zipp < 501):

   print("Bad zip code")

   zipp = int(input("Zip Code: "))

   

print("Thank you")

Explanation:

This gets input for the zip code [The given first line is missing from the question. So I had to put mine]

zipp = int(input("Zip Code: "))

This loop is repeated until the user enters a zip code between 501 and 89049 (inclusive)

while (zipp > 89049 or zipp < 501):

This prints bad zip code

   print("Bad zip code")

This gets input for another zip code

   zipp = int(input("Zip Code: "))

   

This prints thank you when the loop is exited (i.e. when a valid zip code is entered)

print("Thank you")

You might be interested in
A teacher wants to create a list of students in her class. Using the existing Student class in this exercise. Create a static Ar
aleksandr82 [10.1K]

Answer:

Check the explanation

Explanation:

CODE:-

import java.util.ArrayList;

class Student

{

  private String name;

  private int grade;

  private static ArrayList<Student> classList = new ArrayList<Student>();

 

  public Student(String name, int grade)

  {

      this.name = name;

      this.grade = grade;

      classList.add(this);

  }

 

  public String getName()

  {

      return this.name;

  }

 

  /*Don't change the code in this method!

  This method will print out all the Student names in the classList Array

  */

  public static String printClassList()

  {

      String names = "";

      for(Student name: classList)

      {

          names+= name.getName() + "\n";

      }

      return "Student Class List:\n" + names;

  }

}

public class ClassListTester

{

  public static void main(String[] args)

  {

      //You don't need to change anything here, but feel free to add more Students!

      Student alan = new Student("Alan", 11);

      Student kevin = new Student("Kevin", 10);

      Student annie = new Student("Annie", 12);

      Student smith = new Student("Smith", 11);

      Student kane = new Student("Kane", 10);

      Student virat = new Student("Virat", 12);

      Student abd = new Student("ABD", 12);

      Student root = new Student("Root", 12);

      System.out.println(Student.printClassList());

  }

}

Kindly check the attached image below.

4 0
4 years ago
The basic components of cartridges and shotshells are similar. Shot pellets and a bullet are examples of which basic component?
Liono4ka [1.6K]
The answer is projectile. Handguns and rifles use a cartridge having a single projectile or bullet. Shotguns use a shot shell comprising either a single bullet or a big number of small projectiles (shot or pellets). Though, the basic components of cartridges and shot shells are alike.
5 0
4 years ago
Select all the correct answers.
gtnhenbr [62]

Answer:

If you want to learn coding than get a game and look at the code inside.

Explanation:

I sugest terraria

8 0
3 years ago
Edhesive code practice 4.8 Question 3
vovangra [49]

Answer:

for i in range(200,301,2):

  print(i)

Explanation:

just copy and paste 100 percent

3 0
3 years ago
Read 2 more answers
“The software crisis is aggravated by the progress in hardware technology?” Explain with examples
exis [7]

Answer:

Basically, dealing with the "software crisis" is what we now call software engineering. We just see the field more clearly now.

What this crisis was all about is that in the early days of the modern technological era -- in the 1950s, say -- there was tremendous optimism about the effect that digital computers could have on society, on their ability to literally solve humanity's problems. We just needed to formalize important questions and let our hulking "digital brains" come up with the answers.

Artificial intelligence, for example, had some early successes in easy to formalize domains like chess and these sorts of successes led to lots of people who should have known better making extremely naive predictions about how soon perfect machine translation would transform human interaction and how soon rote and onerous work would be relegated to the dustbin of history by autonomous intelligent machines.

7 0
3 years ago
Other questions:
  • Amazon Web Services (AWS): Group of answer choices a) forms a majority percentage of Amazon's overall revenue. b) was introduced
    15·1 answer
  • A flat-panel detector is exposed with nothing between the x-ray tube and detector. 5 images were acquired on 5 different days us
    6·1 answer
  • You wrote a C application that takes 20 seconds using your desktop processor. An improved C compiler is released that requires o
    6·1 answer
  • What is the analysis stage in System development life cycle?
    12·1 answer
  • In the ____________________ approach, the project is initiated by upper-level managers who issue policy, procedures and processe
    8·1 answer
  • Jim has documented a use case that describes the functionality of a system as "To compute gross pay, multiply the hours worked t
    11·1 answer
  • Who initially developed what is now known as the internet?
    5·1 answer
  • James has a USB flash drive that he has used at work. The drive needs to be thrown away, but James wants to make sure that the d
    12·1 answer
  • int temp; temp = 180; if ( temp &gt; 90 ) { System.out.println( "This porridge is too hot." ); // cool down temp = temp – ( temp
    9·1 answer
  • How can we search person in brainly for sending request of friend
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!