A statement is a unit of code that the Python interpreter can execute .

Example:

Statements: Executable Units of Code in Python - Teachoo - Concepts

Input and Output statement

In Python, we have the input() function for taking the user input . The input() function prompts the user to enter data. It accepts all user input as string . The user may enter a number or a string but the input() function treats them as strings only. 

The syntax for input() is: 

input ([Prompt])

Example:

part 2 - Statement - Concepts - Chapter 5 Class 11 - Getting started with python - Computer Science - Class 11

Python uses the print() function to output data to the screen.The function print() evaluates the expression before displaying it on the screen. The print() outputs a complete line and then moves to the next line for subsequent output. 

The syntax for print() is: 

print(value) 

Example:

part 3 - Statement - Concepts - Chapter 5 Class 11 - Getting started with python - Computer Science - Class 11

Remove Ads
Teachoo · Class 11 Explore Class 11
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh is an IIT Kanpur graduate and has been teaching for 16+ years. At Teachoo, he breaks down Maths, Science and Computer Science into simple steps so students understand concepts deeply and score with confidence.

Many students prefer Teachoo Black for a smooth, ad-free learning experience.