Data Types

Steve D'Aprano steve+python at pearwood.info
Tue Sep 20 23:22:31 EDT 2016


On Wed, 21 Sep 2016 01:00 pm, Cai Gengyang wrote:

> So I am going through chapter 7.1 (Data Types) of
> http://programarcadegames.com/index.php… What do these terms (input and
> output) mean --- Can someone explain in plain English and layman's terms ?

http://www.dictionary.com/browse/input

http://www.dictionary.com/browse/output


Does that answer your question about "input and output"?


> Thanks a lot ...
> 
>>>> type(3)
> <class 'int'>
>>>> type(3.145)
> <class 'float'>
>>>> type("Hi there")
> <class 'str'>
>>>> type(True)
> <class 'bool'>

I don't understand why you are showing this. What part don't you understand?

The number 3 is an int (short for integer); that is the type of value it is.
5 is also an int, and 0, and 9253, and -73. They are all integers.

3.145 is a float (short for "floating point number"). "Hi there" is a str
(short for string). True is a bool (short for Boolean value, which is a
technical term for special True/False values).

Perhaps if you can ask a more clear question, I can give a more clear
answer.




-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list