Menu
Coddy logo textTech

Recap - Dynamic Input

Part of the Fundamentals section of Coddy's Python journey — lesson 42 of 77.

challenge icon

Challenge

Beginner

Write a program that gets a dynamic number of input values.

The first input tells you how many numbers will follow. The next inputs are whole numbers that you need to sum.

In the end, print the sum of all the input numbers (not including the first input).

 

For example,

Input:

3
1
5
6

Expected output: 12

Explanation:

 1 + 5 + 6 = 12, and there are exactly 3 numbers following the first input number (3).

Try it yourself

All lessons in Fundamentals