jacobtolleyinc
jacobtolleyinc jacobtolleyinc
  • 18-10-2020
  • Computers and Technology
contestada

Need help with coding.
I'm trying to input a list that uses int(input("Element: ")) and it's causing an error. Anything to help with this?

Respuesta :

Cytokine
Cytokine Cytokine
  • 18-10-2020

You could try something likes this.

lst = []

n = int(input("Number of elements: ))

for i in range(0, n):

element = int(input("Element: "))

lst.append(element)

Answer Link

Otras preguntas

HELPPP PLEASEEEEEE!?!?!
I have a real struggle when it comes to working with strings, whether they're arrays or pointers to strings, and I'm lost cause when I read or watch tutos I und
In As I Lay Dying, whose coffin is Cash building?A. Addie'sB. His dog'sC. Jewel'sD. His father's
You dislike receiving new instructions in the middle of a task. Agree or disagree
Which one of the following parts is labeled with the letter T? A. The wrist pin B. The piston C. The connecting rod D. The piston rings
Two containers, one for 3 liters and one for 5 liters, how would you measure 4 liters
The product of three and a squared number is twice the sum of the number and four
In the poem, Milton asks to be enlightened so that he can _____.
The Jonas school district gives awards to its schools based on overall student attendance. The data for attendance are shown in the table, where Low represents
Because Congress was unable to stop Shays’s Rebellion and the Pennsylvania Mutiny, it feared the