0% found this document useful (0 votes)
4 views7 pages

12 Taking Input From Keyboard PDF Lyst8124

The document outlines how to take input from users in Python, emphasizing that the input function can only accept one argument of string type and always returns a string value. It discusses various data types that can be converted from input, such as integers, floats, and complex numbers. Additionally, it mentions the possibility of using multiple input functions to gather multiple values, although it may be tricky.

Uploaded by

Shilpa Munjal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views7 pages

12 Taking Input From Keyboard PDF Lyst8124

The document outlines how to take input from users in Python, emphasizing that the input function can only accept one argument of string type and always returns a string value. It discusses various data types that can be converted from input, such as integers, floats, and complex numbers. Additionally, it mentions the possibility of using multiple input functions to gather multiple values, although it may be tricky.

Uploaded by

Shilpa Munjal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Python

Taking input from keyboard

Saurabh Shukla (MySirG)


- Agendas
① Taking input from user .

② Input variety of data


③ Argument in input function
④ Taking multiple values

I
Taking Input From
- #
User

input C)

input c) can take at most one


argument
of Str type

input c) always return Str type value


y?
S =
input C)

?
aniE
✗ = int ( input (1)

HwiiE ?

✗ =
float ( input (1)

HÉmp techie?
✗ = Complex ( input C) )
input take one
argument
can
-

To provide direction for input you can

pass a
string argument
in input method .

)
"

input (
"
name =
Enter Your name

))
"

( input /
"

int Enter your age


age =
In youÉa ?

You can use multiple input C) function


to input multiple values

( input first number ) )


"
a = int ( Enter
"

"
b. = int ( input ( Enter second number ") )

you can input multiple values using


input C) function but it is
single knowledge
tricky and requires
little bit
which will see in later
of Str class
we
,

lessons .

You might also like