rotisseriestylechick rotisseriestylechick
  • 15-03-2021
  • Computers and Technology
contestada

A python program that asks the user for four numbers and prints out the first and last number. It must have an array used in it.

Respuesta :

tonb
tonb tonb
  • 15-03-2021

Answer:

numbers = []

for i in range(4):

 z = int(input("enter a number: "))

 numbers.append(z)

print("First is {} and last is {}".format(numbers[0], numbers[-1]))

Explanation:

Now I understand your other question as well! ;-)

Answer Link

Otras preguntas

El vecino del lado construye edificios, pero no es carpintero.
Which of the following is a law passed by Congress? A. Common law B. Constitutional law C. Natural law D. Statutory law
The average speeds of gas molecules in cylinders A, B, C, and D are 0.01 m/s, 0.005 m/s, 0.1 m/s, and 0.5 m/s, respectively. Which cylinder contains gas that is
The sum of two consecutive negative integers is -143. What is the number closest to zero?
One benefit of going to work instead of college after graduation is
Musical tonality has everything to do with scales. a. True b. False
Which is the best meaning of the italicized word in this sentence? The Wanderer’s eagerness to work again was overwhelming. a. enthusiasm c. sorrow b. irritatio
How can evaporation be used to find out how much salt is in a solution?
HELPPPPP!!!!! 32 points! Lila and Rob try to simplify 18 times 4 to the second power plus (9 minus 3) to the second power. Lila simplifies it and gets 324. Rob
The number one defense you have against contaminated food, soil, or water is (1 point) food safety. wash your hands.**** cook everything. only eat fruit and veg