0PricingLogin
Learn AI with Python · Lesson

Input and Output

Understand how to take user input and display output in Python programs.

1

Introduction to Input and Output

Input and output are essential for interacting with a program. Input allows users to provide data, while output displays information back to them.

In this lesson, you’ll learn how to use the input() and print() functions in Python.

Input and Output — illustration 1

2

The print() Function

The print() function displays text or information on the screen. For example:

print("Hello, World!")

This will output:

Hello, World!
# Using the print function
print("Hello, World!")

All lessons in this course

  1. Variables and Data Types
  2. Input and Output
  3. Basic Arithmetic and Operators
  4. Comments and Code Readability
← Back to Learn AI with Python