Skip to content

Commit 03b9101

Browse files
committed
Adding lecture from 3-2-22
1 parent 4b2b49f commit 03b9101

File tree

6 files changed

+358
-57
lines changed

6 files changed

+358
-57
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Element types</title>
8+
</head>
9+
<body>
10+
<!-- Block element, -->
11+
<!-- fills width of screen -->
12+
<h1 style="border: 2px solid red;">hello</h1><h1>World</h1>
13+
<p style="border: 2px solid rgb(31, 99, 0);">Paragraphs are block elements</p>
14+
15+
<!-- Inline element -->
16+
<!-- Only takes up space for its content -->
17+
<img style="border: 2px solid green;"
18+
src="https://picsum.photos/200"
19+
alt="">
20+
21+
<q style="border: 2px solid rgb(98, 3, 128);">
22+
This picture is from lorem pictures</q>
23+
24+
<p>Hello</p>
25+
26+
<!-- Block element with an inline element inside -->
27+
28+
<p>This is a paragraph that will
29+
<span style="color: rgb(21, 178, 226);">contain</span>
30+
an inline element</p>
31+
32+
<!-- Side by side h1 -->
33+
<h1 style="border: 2px solid red; display: inline">hello</h1><h1 style="border: 2px solid rgb(0, 255, 200); display: inline">World</h1>
34+
</body>
35+
</html>
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Class Kiwi</title>
8+
</head>
9+
<body>
10+
<!-- Heading elements -->
11+
<h1 id="top">Heading 1</h1> <!-- Largest font-->
12+
<h2>Heading 2</h2>
13+
<h3>Heading 3</h3>
14+
<h4>Heading 4</h4>
15+
<h5>Heading 5</h5>
16+
Hello there
17+
<h6>Heading 6</h6> <!-- Smallest font-->
18+
19+
<!-- paragraph element -->
20+
<p>This is a paragraph. The text is default size.</p>
21+
22+
<!-- List elements -->
23+
24+
<!-- unordered list -->
25+
<ul> <!-- Bullet points-->
26+
<li>Item 1</li>
27+
<li>Item 2</li>
28+
<li>Item 3</li>
29+
</ul>
30+
<!-- ordered list -->
31+
<ol> <!-- Numbered list-->
32+
<li>Item 1</li>
33+
<li>Item 2</li>
34+
<li>Item 3</li>
35+
</ol>
36+
37+
<!-- Horizontal rule (self closing)-->
38+
<hr>
39+
40+
<!-- Break element (self closing)-->
41+
<br> <!-- invisible break lines-->
42+
43+
<!-- Image element (self closing)-->
44+
<img src="https://picsum.photos/200" alt="A random picture drawn from Lorem Picsum">
45+
46+
<!-- Quote element -->
47+
<q>This is in quotes</q>
48+
49+
<!-- Nested quote tag -->
50+
<p>A wise person once said <q>Something wise</q></p>
51+
52+
<!-- Blockquote element -->
53+
<blockquote>More wise words from wise men</blockquote>
54+
55+
<hr>
56+
57+
<!-- Pre formated text -->
58+
<pre>
59+
for i in range(10):
60+
if i % 2 == 0:
61+
print('even')
62+
else:
63+
print('odd')
64+
</pre>
65+
<hr>
66+
67+
<!-- Anchor element -->
68+
<!-- Link to another page -->
69+
<a href="https://github.com/PdxCodeGuild/class_kiwi">This is a link</a>
70+
71+
<!-- Link to different spot on page -->
72+
<a href="#top">Back to top</a>
73+
74+
</body>
75+
</html>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Class Kiwi</title>
8+
9+
<link rel="stylesheet" href="styles.css">
10+
11+
<link href="https://fonts.googleapis.com/css2?family=Raleway:wght@300&family=Yanone+Kaffeesatz:wght@300&display=swap"
12+
rel="stylesheet">
13+
14+
</head>
15+
<body>
16+
<h1>Class Kiwi</h1>
17+
<!-- <h1 class="secondary">Class Kiwi</h1>
18+
<h1 id="third">Class Kiwi</h1> -->
19+
20+
<a class="center-link" href="https://github.com/PdxCodeGuild/class_kiwi">Check out our GitHub</a>
21+
22+
<img src="https://media.istockphoto.com/photos/north-island-brown-kiwi-apteryx-mantelli-picture-id525151431?b=1&k=20&m=525151431&s=170667a&w=0&h=L7KvUvQv8tYpFNLlVSZC_Dgduyb4iLsBS6xl38A7_PY="
23+
alt="Kiwi bird">
24+
25+
<br>
26+
27+
28+
<h3 class="header">Class description:</h3>
29+
<p>Class Kiwi is a fullstack python web development ran by <a href="https://pdxcodeguild.com/">PDX Code Guild</a>
30+
</p>
31+
32+
<br>
33+
34+
<h4 class="header">Languages/Frameworks:</h4>
35+
<ol>
36+
<li>Python</li>
37+
<li>HTML</li>
38+
<li>CSS</li>
39+
<li>Flask</li>
40+
<li>Django</li>
41+
<li>Javascript</li>
42+
</ol>
43+
44+
<br>
45+
46+
<p>Class meets M-F 6:00-9:00pm PT</p>
47+
</body>
48+
</html>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
body {
2+
background-color: slategray;
3+
color: whitesmoke;
4+
font-family: 'yanone Kaffeesatz';
5+
6+
}
7+
h1 {
8+
text-align: center;
9+
font-family: ' raleway';
10+
}
11+
img {
12+
border-radius: 50%;
13+
display: block;
14+
width: 150px;
15+
margin: 0 auto;
16+
/* /* offset-x | offset-y | blur-radius | spread-radius | color */
17+
box-shadow: 8px 8px 15px 4px rgba(0, 0, 0, 0.295);
18+
19+
}
20+
a {
21+
color: orange;
22+
}
23+
.center-link {
24+
margin-bottom: 10px;
25+
text-align: center;
26+
display: block;
27+
}
28+
29+
.header {
30+
text-decoration: underline;
31+
}

Code/matthew/python/Labs/lab1.py

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
'''
2+
Lab 1
3+
Unit Converter
4+
'''
5+
# def for version 1 -3 !!!!!!!!! <---------
6+
7+
# def meters_to_feet(x):
8+
# converted_ft = x * .3048 #### all function names are backwards meters_to_feet is feet_to_meters.. ect
9+
# return converted_ft
10+
11+
# # print(meters_to_feet(10))
12+
13+
# def meters_to_mile(x):
14+
# converted_mi = x * 1609.34
15+
# return converted_mi
16+
17+
# def meters_to_km(x):
18+
# converted_km = x * 1000
19+
# return converted_km
20+
21+
# def meters_to_yard(x):
22+
# converted_yd = x * .9144
23+
# return converted_yd
24+
25+
# def meters_to_inch(x):
26+
# converted_in = x * .0254
27+
# return converted_in
28+
29+
30+
31+
# print(meters_to_feet(10)) # 3.048
32+
33+
# --- Version 1
34+
'''
35+
36+
feet = int(input("enter the distance you wish to convert to meters: "))
37+
print(f'\n {feet}ft is {meters_to_feet(feet)}m') # 10ft is [3.048]m # need to remove brackets
38+
'''
39+
# --- Version 2
40+
41+
'''
42+
43+
distance = int(input('Enter the total distance: '))
44+
units = input('Enter the units you wish to convert to meters (mi, km, ft) ')
45+
converted_output = []
46+
47+
if units.lower() == 'mi':
48+
converted_output = meters_to_mile(distance)
49+
print(f'\n {distance}mi is {converted_output}m')
50+
elif units.lower() == 'km':
51+
converted_output = meters_to_km(distance)
52+
print(f'\n {distance}km is {converted_output}m')
53+
elif units.lower() == 'ft':
54+
converted_output = meters_to_feet(distance)
55+
print(f'\n {distance}ft is {converted_output}m')
56+
else:
57+
print('Did not reconize input')
58+
59+
'''
60+
61+
# --- Version 3
62+
63+
'''
64+
65+
# distance = int(input('Enter the total distance: '))
66+
# units = input('Enter the units you wish to convert to meters (mi, km, ft, in or yd) ')
67+
# converted_output = []
68+
69+
# if units.lower() == 'mi':
70+
# converted_output = meters_to_mile(distance)
71+
# print(f'\n {distance}mi is {converted_output}m')
72+
# elif units.lower() == 'km':
73+
# converted_output = meters_to_km(distance)
74+
# print(f'\n {distance}km is {converted_output}m')
75+
# elif units.lower() == 'ft':
76+
# converted_output = meters_to_feet(distance)
77+
# print(f'\n {distance}ft is {converted_output}m')
78+
# elif units.lower() == 'in':
79+
# converted_output = meters_to_inch(distance)
80+
# print(f'\n {distance}in is {converted_output}m')
81+
# elif units.lower() == 'yd':
82+
# converted_output = meters_to_yard(distance)
83+
# print(f'\n {distance}yd is {converted_output}m')
84+
85+
'''
86+
87+
# --- Version 4
88+
89+
# !!!!!!!!!!!!!!!!!!!!!! functions only for version 4 !!!!!!!!!!!!!!!!!!!!!!!!!!!
90+
def feet_to_meters(x):
91+
converted_ft = x * .3048
92+
return converted_ft
93+
94+
def mile_to_meters(x):
95+
converted_mi = x * 1609.34
96+
return converted_mi
97+
98+
def km_to_meters(x):
99+
converted_km = x * 1000
100+
return converted_km
101+
102+
def meters_to_feet(x):
103+
converted_ft = x * 3.28084
104+
return converted_ft
105+
106+
def meters_to_mile(x):
107+
converted_mi = x * .000621371
108+
return converted_mi
109+
110+
def meters_to_km(x):
111+
converted_km = x * .001
112+
return converted_km
113+
114+
115+
distance = int(input('Enter the total distance: '))
116+
units = input('Enter the units you are using (mi, km, ft, m) ')
117+
units_to_convert = input('Enter the units you wish to convert to (mi, km, ft, m) ')
118+
119+
if units.lower() == 'mi'and units_to_convert.lower() == 'km':
120+
converted_output = meters_to_km(mile_to_meters(distance))
121+
print(f'\n {distance}mi is {converted_output}km')
122+
123+
elif units.lower() == 'mi'and units_to_convert.lower() == 'm':
124+
converted_output = mile_to_meters(distance)
125+
print(f'\n {distance}mi is {converted_output}m')
126+
127+
elif units.lower() == 'mi'and units_to_convert.lower() == 'ft':
128+
converted_output = meters_to_feet(mile_to_meters(distance))
129+
print(f'\n {distance}mi is {converted_output}ft')
130+
131+
elif units.lower() == 'km'and units_to_convert.lower() == 'mi':
132+
converted_output = meters_to_mile(km_to_meters(distance))
133+
print(f'\n {distance}km is {converted_output}mi')
134+
135+
elif units.lower() == 'km'and units_to_convert.lower() == 'm':
136+
converted_output = km_to_meters(distance)
137+
print(f'\n {distance}km is {converted_output}m')
138+
139+
elif units.lower() == 'km'and units_to_convert.lower() == 'ft':
140+
converted_output = meters_to_feet(km_to_meters(distance))
141+
print(f'\n {distance}km is {converted_output}ft')
142+
143+
elif units.lower() == 'ft'and units_to_convert.lower() == 'mi':
144+
converted_output = mile_to_meters(feet_to_meters(distance))
145+
print(f'\n {distance}ft is {converted_output}mi')
146+
147+
elif units.lower() == 'ft'and units_to_convert.lower() == 'm':
148+
converted_output = feet_to_meters(distance)
149+
print(f'\n {distance}ft is {converted_output}m')
150+
151+
elif units.lower() == 'ft'and units_to_convert.lower() == 'km':
152+
converted_output = meters_to_km(feet_to_meters(distance))
153+
print(f'\n {distance}mi is {converted_output}ft')
154+
155+
elif units.lower() == 'm'and units_to_convert.lower() == 'ft':
156+
converted_output = meters_to_feet(distance)
157+
print(f'\n {distance}km is {converted_output}ft')
158+
159+
elif units.lower() == 'm'and units_to_convert.lower() == 'mi':
160+
converted_output = meters_to_mile(distance)
161+
print(f'\n {distance}ft is {converted_output}mi')
162+
163+
elif units.lower() == 'm'and units_to_convert.lower() == 'km':
164+
converted_output = meters_to_km
165+
print(f'\n {distance}mi is {converted_output}ft')
166+
167+
168+
169+

0 commit comments

Comments
 (0)