Final answer:
To solve this problem, you can use a for loop to iterate from 0 to n-1 (inclusive) and print each number on a separate line using the print() function. For the second part of the question, modify the script to iterate from 1 to n (inclusive) by changing the range in the for loop.
Step-by-step explanation:
To solve this problem, you can use a for loop to iterate from 0 to n-1 (inclusive). Inside the loop, you can print each number on a separate line using the print() function. Here's an example of how you can write the counting-up.py script:
n = int(input('Enter a positive integer: '))
for i in range(n):
print(i)
This script reads the input integer n using the int(input()) function and then uses a for loop to iterate from 0 to n-1. For each iteration, it prints the current number i on a separate line.
For the second part of the question, you can modify the script to iterate from 1 to n (inclusive) by changing the range in the for loop. Here's an example:
n = int(input('Enter a positive integer: '))
for i in range(1, n+1):
print(i)
In this modified script, the range starts from 1 instead of 0, and the end value is n+1 to include the number n in the output.