-
Notifications
You must be signed in to change notification settings - Fork 0
/
hello.py
51 lines (39 loc) · 998 Bytes
/
hello.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import itertools as itr
def greet(whom = "user"): # def for shit, default args, stupid colon
print("hello, {0}".format(whom))
# but no end keyword, neat
def dump():
with open("hello.py") as h:
for line in h.readlines():
print(line, end = "")
def isloud(str):
if str.count("!") >= 1:
return True
else:
return False
# print(isloud("hayden!"))
# print(isloud("hayden"))
class Person:
def __init__(self, name):
self.name = name
if name == "Hayden":
print("It's him.")
class Hayden(Person):
def __init__(self, name):
super(Person, self)
class Animal:
def __init__(self, name):
self.name = name
def bark(self):
print("animal bark")
class Dog(Animal):
def bark(self):
print("dog bark")
fido = Dog("fido")
fido.bark() # okay, makes sense
# nums = list(range(1, 1001))
# for c in itr.combinations(nums, 3):
# if (c[0] ** 2) + (c[1] ** 2) == (c[2] ** 2):
# print(c)
WORK = open("bta.txt", "r").readlines()
print(WORK)