Question

In pseudo code (or python) create a loop that will ask the use to enter and...

In pseudo code (or python) create a loop that will ask the use to enter and then add five zip codes to a one-dimensional array called zip code and then read and display that zip code array to the screen.

Homework Answers

Answer #1
zipcode = []
# loop that will ask the use to enter and then add five zip codes
for i in range(5):
    # Reading input
    code = int(input("Enter zip code: "))
    # adding zip code to one-dimensional array called zip code
    zipcode.append(code)
# display that zip code array to the screen.
print(zipcode)

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
1) In Python Use a while loop to ask the user to enter a series of...
1) In Python Use a while loop to ask the user to enter a series of alphabets. The loop terminates when the user presses enter. Once the loop terminates, display the number of vowels and consonants entered by the user. Hint: keep a running count of the number of characters entered by the user. Keep a running count of the number of vowels. Total number of consonants = total number of characters - total number of vowels. Assume that the...
Using loop logic in a python code snippet, create a loop that counts down from 15...
Using loop logic in a python code snippet, create a loop that counts down from 15 to 5 by 3's printing the count as it is processing. example output: Counter Example count =  15 count =  10 count =  5
Write a python code that will ask the user to enter an integer number n. Construct...
Write a python code that will ask the user to enter an integer number n. Construct a recursive function that prints numbers 1 to n in the form “11223344..nn”.
Name the script for.sh.  This script will create a shopping list. Ask the user to enter items...
Name the script for.sh.  This script will create a shopping list. Ask the user to enter items separated by a space. Read the list. Use a for loop to write (use echo) the items to a file called shopping_list. You should use >> to append the output to the file, so each time the script is run the list should get longer. After the for loop finishes, display (use cat) the contents of the shopping list with 1 item per line....
Visual Basic Write the code snippit for the btnCalculate event handler based upon the following pseudo-code...
Visual Basic Write the code snippit for the btnCalculate event handler based upon the following pseudo-code and User Interface. Don’t forget to create all variables needed and perform all necessary data conversions (ToString,TryParse). Use the control names listed in the pseudo-code. The pseudo-code is as follows Create variables for item cost (dblCost) and item amount (dblAmount) Get the item cost from tbxCost and place it in the variable(dblCost) Gt item amount from tbxAmount and place in it the variable (dblAmount)...
use an infinite loop to enter your homework grades of float data type and append them...
use an infinite loop to enter your homework grades of float data type and append them into a list. break the loop when the user enters a grade smaller than 0. create a NUMPY array out of the grades list; create a panda series out of the numpy array and rename the indices to begin from 1 instead of 0(create the new list using list comprehension that begins from 1). in python
Write code to create a Python dictionary called class. Add two entries to the dictionary: Associate...
Write code to create a Python dictionary called class. Add two entries to the dictionary: Associate the key 'class_name' with the value 'MAT123', and associate the key 'sect_num' with '211_145' PYTHON
Classwork_1.5: Write a C code that ask the user to enter the name of person, gender...
Classwork_1.5: Write a C code that ask the user to enter the name of person, gender (male or female) and age and display these quantities. You need to create a structure to solve this problem. Output:
Python Code Use (for loops) inside another for loop (a nested loop) to do the following:...
Python Code Use (for loops) inside another for loop (a nested loop) to do the following: Print Hello 30 times followed by Bye 10 times. Do that whole thing 15 times. (for a total of 600 lines of output) #Hint: First write the code that prints 30 "Hello" and then 10 "Bye". Think of that as two separate tasks, each of which requires its own for loop. THEN, once you get that working, put all of that inside ANOTHER loop...
Using Python, write the following code. You are to allow the user to enter the daily...
Using Python, write the following code. You are to allow the user to enter the daily temperature as a floating-point number. You should make the assumption that you are recording temperatures in Fahrenheit. You should allow the user to continue entering temperatures until the value -999 is entered. This number should not be considered a temperature, but just a flag to stop the program. As the user enters a temperature, you should display the following each time: Current Temperature: 999...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT