Print a range of numbers The function below takes two integer parameters: low and high. Complete the function so that it prints the numbers from low to high in order, including both low and high, each on a separate line. The recommended approach for this question is to use a for loop over a range statement. student.py 1 - def print_range(low, high): 2 # Implement your function here. Be sure to indent your code block! Restore original file

Respuesta :

Below is the program to print a range of numbers.                                                                                                                                                                            

Explanation:

NumList = []

Number = int(input("Please enter the Total Number of List Elements: "))

for i in range(1, Number + 1):

     value = int(input("Please enter the Value of %d Element : " %i))

     NumList.append(value)

     print("The Smallest Element in this List is : ", min(NumList))

     print("The Largest Element in this List is : ", max(NumList))          

The above program prints both the smallest and the highest number. Here in this program for loop is used. Using this for loop the program will be executed.