ASCII¶
American Standard Code for Information Interchange
In [1]:
print(ord('H'))
72
In [2]:
print(ord('h'))
104
ord = ordinal // the numeric value of a simple ASCII string
Unicode Character conversion chart for script and other languages and characters UTF-8 recommended practice for encoding data – upwards compatible with ASCII // automatic detection between ASCII and UTF-8 Python 3 – all strings Unicode
Object Oriented (OO) Programming
Methods – Functions built into objects // Databases a connection object
In [3]:
inp = input('Europe floor?')
usf = int(inp) + 1
print('US Floor', usf)
US Floor 6
In [4]:
class PartyAnimal:
x = 0
def party(self):
self.x = self.x + 1
print("So far",self.x)
an = PartyAnimal()
an.party()
an.party()
an.party()
So far 1 So far 2 So far 3
In [ ]: