0% found this document useful (0 votes)
13 views11 pages

Input Statement

The document provides an overview of the INPUT statement in Python, detailing its purpose and usage with examples. It includes objectives for students to understand different datatypes and apply input functions. Additionally, it features questions to reinforce learning about input syntax and user interaction.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views11 pages

Input Statement

The document provides an overview of the INPUT statement in Python, detailing its purpose and usage with examples. It includes objectives for students to understand different datatypes and apply input functions. Additionally, it features questions to reinforce learning about input syntax and user interaction.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

AITCHISON COLLEGE Topic: Input Statement

PREP SCHOOL
ICT Department
Objectives
Students will be able to:

• Understand INPUT Statement in Python

• Learn use of different datatypes in INPUT Statement

• Apply input functions using examples


Input Statement
•Input statement is used to get input from the user.
a=int(input("Enter the first number"))
b=int(input("Enter the second number"))
c=a+b
print ("Sum of these numbers is",c)

Std1=str(input(“Enter Name”))

Std2=str(input(“Enter Name”))

print (Std1, Std2, “are present in the class today”)


Examples
Question 1
Which function is used to get input from user?

a) input()

b) print()

c) output()

d) All of the above


Question 2
What will happen if we don’t specify datatype in input
statement?

User can
enter
string data
in an
integer
Question 3
Which of the following is correct syntax for input()?

a) int(input())=a

b) a=int(input())

c) a=input(int())

d) input(int())=a
Question 4
Why is the following input statement is not user friendly?
a=int(input())

It is not
specified
what to
enter
Question 5
What will be the line of code for following output?
Enter your height: 6.2

h=float(input(“Enter your height:”))


Recap
In this lesson, we have discussed:

• Concept of input in python

• Syntax of Input Statement

• Application of input using examples


Thank You

You might also like