← Back to python

Python Input/Output

Python Input/Output - ACM Mode

Lines and planes can be described using parametric equations. This representation is especially powerful and concise in higher dimensions. We will also use parametric form to describe the solution set of a system of linear equations.

Simple CodeBlock Example

Here's a simple code block for quick practice:

Your First Python Exercise

🐍 Python
Loading...

Full CodeProblem Example

Now let's try a complete problem with description:

Sum Two Numbers

Problem Description

Write a program that reads two integers from standard input and outputs their sum.

Input Format

Two integers, each on a separate line.

Output Format

A single integer representing the sum of the two input numbers.

Example

Input Example
3
5
Output Example
8

Explanation: 3 + 5 = 8

Input Example
10
20
Output Example
30

Explanation: 10 + 20 = 30

Input Example
-5
3
Output Example
-2

Explanation: -5 + 3 = -2

Constraints

  • -1000 ≤ each integer ≤ 1000

Code Editor

🐍 Python
Loading...

Another Problem Example

Check Even or Odd

Problem Description

Write a program that reads an integer and determines whether it is even or odd.

Input Format

A single integer n.

Output Format

Output 'even' if the number is even, 'odd' if the number is odd.

Example

Input Example
4
Output Example
even

Explanation: 4 is divisible by 2

Input Example
7
Output Example
odd

Explanation: 7 is not divisible by 2

Constraints

  • -1000 ≤ n ≤ 1000

Code Editor

🐍 Python
Loading...