I keep getting the error TypeError:int object is not subscriptable. I've tried removing the text and it still isn't working

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I keep getting the error TypeError:int object is not subscriptable. I've tried removing the text and it still isn't working

#Fun with numbers
#User input
print ('Welcone to fun with numbers!)
numbers = []
%3D
for i in range (5):
number = int(input ('Please input your number here:\n'))
numbers.append (number)
for i in range (5):
number[i] = number[i] * 2
print ('Here is what your numbers are multiplied by 2')
for i in range (5):
print (numbers[i],'', end = ''
Transcribed Image Text:#Fun with numbers #User input print ('Welcone to fun with numbers!) numbers = [] %3D for i in range (5): number = int(input ('Please input your number here:\n')) numbers.append (number) for i in range (5): number[i] = number[i] * 2 print ('Here is what your numbers are multiplied by 2') for i in range (5): print (numbers[i],'', end = ''
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Passing Array as Argument
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT