CodeTestValidate

No installations needed! Write Python directly in your browser and get instant feedback with our smart validation system.

Challenge # 2

Add Two Numbers

Objective

Add two given numbers and print their sum.

Instructions

  • You are given two integer variables a and b.

  • Add the two numbers and store the result in a new variable.

  • Print the result.

Constraints:
Do not use input(). • `a` and `b` will be integers.
Exemple IO

Input: a = 3 b = 5

Output: 8

Input: a = 0 b = 0

Output: 0

Input: a = -2 b = 7

Output: 5

Try It Online!

Output:

Validate Your Results

Get your code reviewed and validated to understand what you did right and where you can improve.

Previous challengePrint Hello, World!Next challengeCheck if a Number is Positive, Negative, or Zero
Loading...