At Westonci.ca, we make it easy to get the answers you need from a community of informed and experienced contributors. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform. Get detailed and accurate answers to your questions from a dedicated community of experts on our Q&A platform.

Write a program that reads a list of 10 integers, and outputs those integers in reverse. For coding simplicity, follow each output integer by a space, including the last one. Then, output a newline. coral

Sagot :

def reverse_list (num_list):

try:

if num_list.isdigit() == True:

return num_list[::-1]

elif num_list < 0:

return "Negative numbers aren't allowed!"

except ValueError:

return "Invalid input!"

user_list = list (int (input ("Please enter ten random positive numbers: " )))

print (reverse_list (user_list))