0

help there is error in the code that i wrote

no_of_inputs = int(input("Enter the no. of times you want the input: ")) for i in range (0 ,no_of_inputs+1): x[i] = input("Input the no. : ") print(x)

26th Aug 2020, 1:17 PM
Smiley[Offline]
2 ответов
+ 4
smiley Where have you defined x Solution: x = [input() for i in range(int(input()))] print(x)
26th Aug 2020, 1:18 PM
Namit Jain
Namit Jain - avatar
0
Namit Jain thanks
26th Aug 2020, 1:20 PM
Smiley[Offline]