Back to General discussions forum
Why such a long input? For Python, entering this data is not really by hand.
I copy the data from the task and paste it
data = 'task data'
convert_to_list = data.split()
print(convert_to_list)
Then I substitute the list into the program
data = []
min_number = int(data[0])
max_number = int(data[0])
for i in data:
if int(i) < min_number:
min_number = int(i)
if int(i) > max_number:
max_number = int(i)
print(min_number, max_number)
The result is not accepted as a solution. Although the code produces the correct result
The code is working. I checked the result several times and it is correct. But verification does not accept the result.
Sorry. Found a mistake. Entered the results on the contrary.
You should enter the data automatically.
You can use input() in Python to get each line.
It makes it a lot easier!