0% found this document useful (0 votes)
4 views1 page

Python - Quick Notes

Uploaded by

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

Python - Quick Notes

Uploaded by

reny anil
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

PYTHON

Data Types: KEYWORDS


 String – piece of text / anything
 Programmer: a person who writes
 Integer - a whole number code to create an application/website
 Float - decimal or tell the computer to do something
 Boolean – True / False  User: a person who uses
programs/applications
 List: special variable that stores more
Lists than one data item.
 Empty list: list with no data but we are
girls = [‘x’] creating space in computer memory
moregirls = [‘a’,’b’,’c’]  Sequence: each line of code is
executed one after another
[Link](‘y’) – adds a new data item
[Link](moregirls) – joins lists
[Link](‘x’) – removes an item
Sequence
[Link](0) – removes first person
x=3
[Link](-1) – removes last person
y=4
#data items in a list can be diff datatypes:
ans = x+y
name_info = [‘last name’, 13, false, 165.7]
print(ans)
#one after
another
Vonn Neuman Architecture

Casting
To string = str()
To bool = bool() #output will be only true or
false
file = open(“[Link]”, “w”)
To integer = int()
[Link] (“hello world”)
To float = float()
[Link]()
i.e:
num1 = int(input(“”)) # only allows integers to
be typed in.
print(“the number is “ + str(num1)) # we have
to convert to a string because print only allows

You might also like