Skip to content

Commit 8ac3b05

Browse files
committed
Merge branch 'main' of https://github.com/Josephcabs/code-differently-24-q4 into feature/lesson05#2
2 parents 4261b40 + e422bce commit 8ac3b05

26 files changed

+6242
-1
lines changed

lesson_01/dennislipscomb/README.HTML

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<link rel="stylesheet" href="styles.css">
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>The README About Nothing</title>
8+
</head>
9+
10+
<body bgcolor=white></body>
11+
<h2 id="the-readme-about-nothing-">The README About Nothing 😎</h2>
12+
<hr>
13+
<p>Dennis is a born creative at heart. His creative journey started with attending The Art Institute of Philadelphia as an <br> audio engineer and pivoting into creating music, writing music and publishing a book of spokenword entitled HeARTwork.</p>
14+
15+
<h2 id="the-motivation-">The Motivation 🙏🏽</h2>
16+
<hr>
17+
<p>How I like to start my day</p>
18+
<ul>
19+
<li>Iced Matcha latte or Cold Brew w/ oatmilk</li>
20+
<li>Unnecessarily loud music </li>
21+
<li>BLT (turkey bacon only)</li>
22+
<li>30 minutes of exercise</li>
23+
<li>Sports debate shows</p>
24+
</li>
25+
</ul>
26+
<h2 id="the-connection-">The Connection 🔗</h2>
27+
<hr>
28+
<p>I don&#39;t have a personal prefence with communication. If you have a direct way to reach me, use which ever works best for you. </p>
29+
<p>Phone calls, text, e-mail, morse code ect. Anytime of day, if im awake or not busy I&#39;ll respond asap, scouts honor.</p>
30+
<h2 id="the-learning-style-">The Learning Style 👀</h2>
31+
<hr>
32+
<p><strong>The Positive Way</strong> 📈 I&#39;m a visual learner. The best way for me to retain information is by seeing a visual demonstration or example and then repetition of practice. </p>
33+
<p><strong>The Negative Way</strong> 📉 Reading with out any direction of what i&#39;m doing makes it difficult to retain information. </p>
34+
<h2 id="the-feedback-">The Feedback 🫵🏽</h2>
35+
<hr>
36+
<p>I prefer to receive direct feedback in a 1-on-1 setting. Don&#39;t hold any punches. Brute honesty motivates me. I may not like you in the moment but I&#39;ll appreciate it later.</p>
37+
<p>On the otherhand, I tend to be soft when giving feedback. I can be very politically correct and try to protect feelings while still getting the point across. </p>
38+
<h2 id="the-favorite-things-">The Favorite Things 🤌🏽</h2>
39+
<hr>
40+
<ul>
41+
<li>Chicken Wings 🍗</li>
42+
<li>Autumn 🍁</li>
43+
<li>Sneakers 👟</li>
44+
<li>Writing Music/Poetry 🎤</li>
45+
<li>Running 🏃🏽‍♂️</li>
46+
<li>Cooking 👨🏽‍🍳</li>
47+
<li>Hats 🧢</li>
48+
<li>Music 🎧</li>
49+
<li>Sports 🏀</li>
50+
<li>Flannels 🪵</li>
51+
<br>
52+
</ul>
53+
<h2 id="the-goals-">The Goals 🥅</h2>
54+
<hr>
55+
<p>My main goal for this year is to add tech to my creative ablities in any aspect. To start my food content creator journey and to write another book.</p>
56+
<h2 id="the-proudest-accomplishment-">The Proudest Accomplishment! 🥳</h2>
57+
<hr>
58+
<h2>he<div class="heartwork">ART</div>work ❤️</h2>
59+
<hr>
60+
<p><img src="images/heartwork.jpg"height=770></p>
61+
62+
</html>
679 KB
Loading

lesson_01/styles.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.heartwork{
2+
color: red;
3+
display: inline;
4+
}
5+
body{
6+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
7+
font-weight: 400;
8+
}
9+
10+
html{
11+
margin: auto;
12+
width: 70% ;
13+
}
14+
li{
15+
padding-bottom: 7px;
16+
}

lesson_04/AngelicaC/README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
```python
2+
# takes input from console and sets it to integer
3+
number = int(input(Enter the number: "))
4+
#when no number input=false
5+
flag = false
6+
##check to see if numbers divide by 2,if true it breaks function.
7+
for i in range (2, number):
8+
if (number % i ==0):
9+
flag = true
10+
break
11+
##entered number is not prime and will return it
12+
if flag:
13+
print("Entered number {} is not a prime number".format(number))
14+
##entered number is a prime number
15+
else:
16+
print("Entered number {} is a prime number".format(number))
17+
```
18+
number = int(input("Enter a whole number: "))
19+
20+
21+
```javascript
22+
// the function will be calling an n that it will output.
23+
function isprime(n) {
24+
// if the output n is 1, it will be false
25+
if (n <=1)
26+
return false;
27+
// i will be a number that will loop from 2 to the square root of n.
28+
for (let i = 2; i < n;i++) {
29+
if(n % i ===0) {
30+
return false;
31+
}
32+
}
33+
return true;
34+
35+
}
36+
37+
console.log(isprime(5))
38+
39+
## Explanation
40+
41+
/*Python function uses the i as variable if. If the variable gets divided by 2 and it results in 0, then it is true and the code will not run/break.
42+
*/
43+
44+
/* In javaScript the function will be calling an n that it will output. if the output n is 1, it will be false. i will be a number that will loop from 2 to the square root of n.
45+
*/
46+
47+
/*Differences
48+
when using python, the language will use `if` keyword, to deteremine if the number will be an interger. Whereas, in Javascript, the language being used will be called a `function`.
49+
*/
50+
51+
/*Type coercion
52+
Python is particular when it comes to the input the variable and can have different outputs.
53+
Javascript is easier to write but if it not input correctly,it can affect the code.
54+
*/
55+
56+
/*Function calls
57+
Syntax to call the fucntion for python is
58+
number = int().
59+
Syntax for Javascript is console.log().
60+
*/
61+
62+
/*Citations
63+
Python
64+
https://www.youtube.com/watch?v=J-5swSZj_iI
65+
66+
Javascript
67+
https://www.youtube.com/watch?v=cmco9fi3xnA
68+
*/

lesson_04/AngelicaC/python.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
number = int(input("Enter the number:"))
2+
#
3+
flag = False
4+
5+
if (number <= 1):
6+
flag = False
7+
8+
for i in range (2, number):
9+
if (number % i ==0):
10+
flag = True
11+
break
12+
13+
if flag:
14+
print("Entered number {} is not a prime number".format(number))
15+
else:
16+
print("Entered number {} is a prime number".format(number))

lesson_04/AngelicaC/script.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
function isprime(n) {
2+
// if the output n is 2, it will be false
3+
if (n <2)
4+
return false;
5+
// i will be a number that will loop from 2 to the square root of n.
6+
for (let i = 2; i <= Math.sqrt(n);i++) {
7+
if(n % i ===0) {
8+
return false;
9+
}
10+
}
11+
return true;
12+
13+
}
14+
15+
console.log(isprime(5))

lesson_04/cdbluejr/Prime.bas

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
100 rem find prime number
2+
110 n =1
3+
120 c=0
4+
130 i=1
5+
140 if i<=n or (n mod i)<>0 then 300
6+
145 if i=n and c=2 then 200
7+
150 c=c+1
8+
160 if i>n then 210
9+
170 goto 130
10+
11+
200 Print n + “Prime"
12+
210 c=0
13+
220 n=n+1
14+
230 if c>n then 120
15+
240 goto 130
16+
17+
300 i=i+1
18+
310 goto 140

lesson_04/cdbluejr/Prime.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
public class Prime {
2+
public static void main(String[] args) {
3+
4+
5+
int num = 29;
6+
int count = 0;
7+
for(int i=1; i<=num; i++) {
8+
if(num % i ==0) {
9+
count++;
10+
}
11+
}
12+
if(count==2) {
13+
System.out.println("Prime");
14+
} else {
15+
System.out.println("not Prime");
16+
}
17+
}
18+
}
19+

lesson_04/cdbluejr/README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
## Java implementation
2+
3+
int num = 29;
4+
int count = 0;
5+
for(int i=1; i<=num; i++) {
6+
if(num % i ==0) {
7+
count++;
8+
}
9+
}
10+
if(count==2) {
11+
System.out.println("Prime");
12+
} else {
13+
System.out.println("not Prime");
14+
15+
16+
## Basic implementation
17+
18+
100 rem find prime number
19+
110 n =1
20+
120 c=0
21+
130 i=1
22+
140 if i<=n or (n mod i)<>0 then 300
23+
145 if i=n and c=2 then 200
24+
150 c=c+1
25+
160 if i>n then 210
26+
170 goto 130
27+
28+
200 Print n + “Prime"
29+
210 c=0
30+
220 n=n+1
31+
230 if c>n then 120
32+
240 goto 130
33+
34+
300 i=i+1
35+
310 goto 140
36+
37+
## Explanation
38+
39+
The java implementation uses the counting system to only count to 2, to signify a prime number.
40+
41+
The basic implementation also uses the counting system to only count to 2, to signify a prime number.
42+
43+
### Differences
44+
45+
1. **Syntax**:
46+
- In Java, it uses the fuctions Modelo function to determine if the reminder is zero to determine if the number is divisable evenly.
47+
- Basic uses the if then else function to determine if the number is prime or not.
48+
49+
3. **Function Calls**:
50+
- The ability to print for both programs are different, java uses System.out.println, while BASIC just uses the word print.
51+

lesson_06/README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,25 @@ Please review the following resources before lecture:
88

99
## Homework
1010

11-
TODO(anthonydmays): Add details
11+
- [ ] Complete the [Expression Calculator](#expression-calculator) exercise.
12+
- [ ] Read article entitled [3 Questions That Will Make You A Phenomenal Rubber Duck][article-link]
13+
- [ ] Do pre-work for [lesson 07](/lesson_07/).
14+
15+
### Expression Calculator
16+
17+
For this assignment, you will need to implement the functions and logic required to calculate a mathematical expression. After implementing the `add`, `divide`, and `multiply` functions, you will combine these functions to compute the final result.
18+
19+
1. Update the code in the [expression_calculator.ts][calculator-file] file.
20+
2. To check your work, you can run the application using the first command below and run the tests using the second one.
21+
```bash
22+
npm run compile
23+
npm start
24+
```
25+
3. As usual, make sure that you format your code and run the check command before creating your pull request.
26+
```bash
27+
npm run check
28+
```
29+
4. You must only submit changes to the `expression_calculator.ts` file to receive full credit.
30+
31+
[article-link]: https://blog.danslimmon.com/2024/01/18/3-questions-that-will-make-you-a-phenomenal-rubber-duck/
32+
[calculator-file]: ./expression/src/expression_calculator.ts

0 commit comments

Comments
 (0)