0
Accepting a user defined number of inputs in Python.
Good day coders!!! I want to write a code that will contain the following steps. 1. User will define number of inputs in a line, say 7 2. The programme will then prompt the user to start entering their inputs for the given number e.g Input () Input () Input() Input() Input () Input() Input() Thanks, have it in mind that the number of inputs to be prompted will be supplied by the user not the coder. Have tried using a for loop but it's telling me EOFError https://code.sololearn.com/cq88VtvHCJmH/?ref=app https://code.sololearn.com/cq88VtvHCJmH/?ref=app
6 ответов
+ 2
Download pydroid from playstore because on sololearn, taking inputs is complicated, like u will have to put all ur inputs in the box that appears when u press RUN,
3 (no. of inputs)
2 (first input)
5 (second)
7 (third)
+ 1
n = int(input("Range: "))
for i in range(n):
a = int(input("Enter num: "))
+ 1
maf
Thanks very much. Really appreciate your reply. But still the same EOFError
+ 1
Kareem Basit Adeniyi your code is working perfectly, i ran it.