How to program to Print Loop 1 to N

Description

You are given a number stored in a variable with the namenum

You have to print all the numbers from 1 tonum, including num as well.

Print each number on a new line

Input

The first and the only line of the input contains the value present innum

Output

Print all the numbers from 1 to the value stored innum, includingnumas well, on a new line

Sample Input 1

5

Sample Output 1

1 2 3 4 5

num=int(input("Enter num "))
for i in range(1,num+1):
    print(i)
1 Like