File tree Expand file tree Collapse file tree 4 files changed +2
-13
lines changed
code/kaceyb/python/notes/lesson06 Expand file tree Collapse file tree 4 files changed +2
-13
lines changed Original file line number Diff line number Diff line change 13
13
14
14
import math
15
15
16
-
17
-
18
16
def distance (p1 , p2 ):
19
17
dx = p1 ["x" ] - p2 ["x" ]
20
18
dy = p1 ["y" ] - p2 ["y" ]
@@ -66,6 +64,7 @@ def distance(self, p):
66
64
p1 = (5 ,2 )
67
65
p2 = Point (8 ,4 )
68
66
67
+
69
68
# print(p1.x)
70
69
# print(p1.y)
71
70
print (type (p1 ))
Original file line number Diff line number Diff line change 1
1
# with open('example.txt', 'a') as file:
2
2
# text = file.write('\nMORE TEXT')
3
-
4
- # print(text)
5
3
# print(text)
6
4
7
5
# file = open('example2.txt', 'w')
15
13
# colors = file.read().split()
16
14
# print(colors)
17
15
18
-
19
16
# colors = file.read().split()
20
17
# print(colors)
21
18
46
43
47
44
# phone_book = phone_book.split('\n')
48
45
# name = input('Lookup name: ')
49
-
50
-
51
46
52
47
# phone_book = phone_book.split('\n')
53
48
# name = input('Lookup name: ')
58
53
# print(entry)
59
54
# found_entry = True
60
55
61
-
62
-
63
56
# if not found_entry:
64
57
# print('Contact not found')
65
58
# name = input('Enter new contact name: ')
71
64
# with open('phonebook2.txt', 'w') as file2:
72
65
# file2.write('\n'.join(phone_book))
73
66
74
-
75
67
# phone_book.append(name + " " + phone_number)
76
68
77
69
# phone_book.sort()
88
80
# color = file.read()
89
81
# color = color.split('\n')
90
82
# color = Convert(color)
91
- # print(color)
92
83
93
84
# print(color)
Original file line number Diff line number Diff line change 1
- from urllib import response
2
1
import requests
3
2
4
3
# response = requests.get('https://google.com')
28
27
29
28
# for i in range(len(categories)):
30
29
# print(i, categories[i])
31
-
32
30
33
31
# for i in range(len(categories)):
34
32
# print(i, categories[i])
60
58
print (film ["description" ])
61
59
62
60
print ("-" * 10 )
61
+
63
62
print (film ['title' ])
64
63
print (film ['release_date' ])
65
64
print (film ['description' ])
You can’t perform that action at this time.
0 commit comments