Add Seven
Programming Basics · Python
TASK
Problem
Given an integer `n`, print `n + 7`.
EXAMPLE
Example
12
19
LIMITS
Constraints
All integer inputs have absolute value at most 10^9; any additional relationships between them are stated directly in the task.
LEARN
Theory for this problem
+
`input()` reads data entered by the user. The result of `input()` is initially a string. `int()` converts a numeric string into an integer. The `+` operator adds numbers. `print()` displays the program result. Print only what the problem statement requires.
**Connection to this task.** The `+` and `-` operators perform addition and subtraction. Parentheses make the evaluation order explicit when an expression contains several operations. The expression `n + 7` shows how this idea is applied to the task data.
NEED HELP?
Hints
+
['Read `n` and compute `n + 7`.']
ANSWER
Solution
+
n = int(input()) result = n + 7 print(result)