12.5k views
2 votes
First, read in an input value for variable valCount. Then, read valCount integers from input and output each integer on a newline followed by the string" reports.".

Ex: If the input is 3 70 65 75, the output is:

70 reports.
65 reports.
75 reports.​

User Tanenbring
by
5.2k points

1 Answer

4 votes

Answer:

The program in Python is as follows:

valCount = int(input())

reports = []

for i in range(valCount):

num = int(input())

reports.append(num)

for i in reports:

print(i,"reports.")

Step-by-step explanation:

This gets input for valCount

valCount = int(input())

This creates an empty list

reports = []

This gets valCount integer from the user

for i in range(valCount):

num = int(input())

Each input is appended to the report list

reports.append(num)

This iterates through the report list

for i in reports:

This prints each element of the report list followed by "reports."

print(i,"reports.")

User Gthuo
by
5.0k points