From 194c8faa45adc1000dd00efb0ef08d44e2695985 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 14 Jul 2026 19:18:46 -0400 Subject: [PATCH 01/42] add warmup2.py --- week-2/assignment-2/warmup2.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 week-2/assignment-2/warmup2.py diff --git a/week-2/assignment-2/warmup2.py b/week-2/assignment-2/warmup2.py new file mode 100644 index 0000000..cb78df2 --- /dev/null +++ b/week-2/assignment-2/warmup2.py @@ -0,0 +1,7 @@ +#navigations commands I used: +# cd week-2 +#cd assignment-2 +#mkdir warmup2.py + +date = input("What is today's date? ") +print(f'You said today is {date}') From cd37436b2c98072bf0258353717a289ff3bbb60f Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 14 Jul 2026 20:41:49 -0400 Subject: [PATCH 02/42] add warmup3.py --- week-2/assignment-2/warmup3.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 week-2/assignment-2/warmup3.py diff --git a/week-2/assignment-2/warmup3.py b/week-2/assignment-2/warmup3.py new file mode 100644 index 0000000..e7895e8 --- /dev/null +++ b/week-2/assignment-2/warmup3.py @@ -0,0 +1,6 @@ +#194c8fa (HEAD -> assignment-2, origin/assignment-2) add warmup2.py +#294742d (origin/main, origin/HEAD, main) add week 2 folder +#58d836d Add files via upload +#d8c0c05 Update README.md + + From 4ab4081c9467bdf465d7adf487b87c44c4b129c0 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 14 Jul 2026 20:43:27 -0400 Subject: [PATCH 03/42] add warmup4.py --- week-2/assignment-2/warmup4.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 week-2/assignment-2/warmup4.py diff --git a/week-2/assignment-2/warmup4.py b/week-2/assignment-2/warmup4.py new file mode 100644 index 0000000..1f5fda8 --- /dev/null +++ b/week-2/assignment-2/warmup4.py @@ -0,0 +1,14 @@ +name = input('what is your name? ') +print(f'Your name is {name}') + +#File "c:\Users\genes\python_class\working\python-intro-homework\week-2\assignment-2\warmup4.py", line 2, in + # print(f'Your name is {naame}') + # ^^^^^ +#NameError: name 'naame' is not defined. Did you mean: 'name'? + +#My error was first I wrote the wrong varible name on line 5 +# My second error was I didnt write input in line 1 so the user is not +# able to even type their own name + +#I fixed my error by correct my variable name and including the word input on line 1 + From 2d134460cb4f67bc81a5909ad108cb822c1ee40e Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 14 Jul 2026 20:44:17 -0400 Subject: [PATCH 04/42] add mini_project.py --- week-2/assignment-2/mini_project.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 week-2/assignment-2/mini_project.py diff --git a/week-2/assignment-2/mini_project.py b/week-2/assignment-2/mini_project.py new file mode 100644 index 0000000..aa3926b --- /dev/null +++ b/week-2/assignment-2/mini_project.py @@ -0,0 +1,8 @@ +fahrenheit = int(input("Enter a temperature in Fahrenheit:")) + +celcius = round(fahrenheit - 32) * 5 / 9 + +print(f'{fahrenheit} is {celcius:.1f}C.') + + + \ No newline at end of file From 54b759a2ffe75bfdeafb6ec4b5e011ff57e01f17 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 14 Jul 2026 20:48:25 -0400 Subject: [PATCH 05/42] add warmup1.py --- week-2/assignment-2/warmup1.py | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 week-2/assignment-2/warmup1.py diff --git a/week-2/assignment-2/warmup1.py b/week-2/assignment-2/warmup1.py new file mode 100644 index 0000000..139597f --- /dev/null +++ b/week-2/assignment-2/warmup1.py @@ -0,0 +1,2 @@ + + From baf23b18d508654973840916d3cbb3c4946fac3d Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 21 Jul 2026 17:26:24 -0400 Subject: [PATCH 06/42] add warmup1.py --- week-2/assignment-2/warmup1.py | 1 + 1 file changed, 1 insertion(+) diff --git a/week-2/assignment-2/warmup1.py b/week-2/assignment-2/warmup1.py index 139597f..7e81075 100644 --- a/week-2/assignment-2/warmup1.py +++ b/week-2/assignment-2/warmup1.py @@ -1,2 +1,3 @@ +print ('Python is working !') From 9ac9efa23bc398dcb21ea930e6908cadf163c617 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 21 Jul 2026 17:31:16 -0400 Subject: [PATCH 07/42] add warmup2.py --- week-2/assignment-2/warmup2.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/week-2/assignment-2/warmup2.py b/week-2/assignment-2/warmup2.py index cb78df2..317374c 100644 --- a/week-2/assignment-2/warmup2.py +++ b/week-2/assignment-2/warmup2.py @@ -1,7 +1,8 @@ #navigations commands I used: -# cd week-2 +# cd python-intro-homework +#cd week-2 #cd assignment-2 #mkdir warmup2.py date = input("What is today's date? ") -print(f'You said today is {date}') +print(f'You said today is {date}.') From 5fa6bd5378a4bf2e1a75076b05b2d08a9707bce8 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 21 Jul 2026 17:32:34 -0400 Subject: [PATCH 08/42] add warmup3.py --- week-2/assignment-2/warmup3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/week-2/assignment-2/warmup3.py b/week-2/assignment-2/warmup3.py index e7895e8..2479cea 100644 --- a/week-2/assignment-2/warmup3.py +++ b/week-2/assignment-2/warmup3.py @@ -3,4 +3,4 @@ #58d836d Add files via upload #d8c0c05 Update README.md - +print("This week I learned how to use Python input, work with strings, and run Git commands in the terminal!") From ddf1940329e860595c2f17a1ae7505edf72162af Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 21 Jul 2026 17:34:38 -0400 Subject: [PATCH 09/42] add warmup4.py --- week-2/assignment-2/warmup4.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/week-2/assignment-2/warmup4.py b/week-2/assignment-2/warmup4.py index 1f5fda8..0bfd37c 100644 --- a/week-2/assignment-2/warmup4.py +++ b/week-2/assignment-2/warmup4.py @@ -1,14 +1,16 @@ -name = input('what is your name? ') -print(f'Your name is {name}') -#File "c:\Users\genes\python_class\working\python-intro-homework\week-2\assignment-2\warmup4.py", line 2, in - # print(f'Your name is {naame}') - # ^^^^^ -#NameError: name 'naame' is not defined. Did you mean: 'name'? +''' 1. What the error message said: + NameError: name 'naame' is not defined. Did you mean: 'name'? -#My error was first I wrote the wrong varible name on line 5 -# My second error was I didnt write input in line 1 so the user is not -# able to even type their own name +2. What caused it: + I misspelled the variable name as 'naame' inside the print statement + and forgot to include input() on line 1, so Python didn't know what 'naame' was. -#I fixed my error by correct my variable name and including the word input on line 1 +3. How I fixed it: + I added input() to line 1 to capture the user's input and corrected + the spelling of the variable to 'name' in the print statement.''' +# Fixed, working code: + +name = input("What is your name? ") +print(f"Your name is {name}.") From cac6c530af46df6d3d8f27b48859b7b632b21f14 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 21 Jul 2026 17:40:53 -0400 Subject: [PATCH 10/42] add mini_project.py --- week-2/assignment-2/mini_project.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/week-2/assignment-2/mini_project.py b/week-2/assignment-2/mini_project.py index aa3926b..87dd084 100644 --- a/week-2/assignment-2/mini_project.py +++ b/week-2/assignment-2/mini_project.py @@ -1,8 +1,8 @@ -fahrenheit = int(input("Enter a temperature in Fahrenheit:")) +fahrenheit = float(input("Enter a temperature in Fahrenheit:")) -celcius = round(fahrenheit - 32) * 5 / 9 +celcius = (fahrenheit - 32) * 5 / 9 -print(f'{fahrenheit} is {celcius:.1f}C.') +print(f'{fahrenheit:.1f}°F is {celcius:.1f}°C.') \ No newline at end of file From 6922c1a17060503f959b8f8e5c214a6aeda6d0fd Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 21 Jul 2026 17:48:05 -0400 Subject: [PATCH 11/42] add warmup1.py --- week-2/assignment-2/warmup1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/week-2/assignment-2/warmup1.py b/week-2/assignment-2/warmup1.py index 7e81075..f7ae2bf 100644 --- a/week-2/assignment-2/warmup1.py +++ b/week-2/assignment-2/warmup1.py @@ -1,3 +1,3 @@ -print ('Python is working !') +print ('Python is working!') From 6579456537927cf67b89a717b9613627a2067e2b Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 21 Jul 2026 17:50:26 -0400 Subject: [PATCH 12/42] add warmup2.py --- week-2/assignment-2/warmup2.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/week-2/assignment-2/warmup2.py b/week-2/assignment-2/warmup2.py index 317374c..cd5eef7 100644 --- a/week-2/assignment-2/warmup2.py +++ b/week-2/assignment-2/warmup2.py @@ -1,8 +1,10 @@ #navigations commands I used: # cd python-intro-homework +#ls #cd week-2 #cd assignment-2 -#mkdir warmup2.py +#pwd + date = input("What is today's date? ") print(f'You said today is {date}.') From fd355160889ad7296adacb720f459458cf5e5a4b Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 21 Jul 2026 17:51:39 -0400 Subject: [PATCH 13/42] add warmup3.py --- week-2/assignment-2/warmup3.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/week-2/assignment-2/warmup3.py b/week-2/assignment-2/warmup3.py index 2479cea..7654760 100644 --- a/week-2/assignment-2/warmup3.py +++ b/week-2/assignment-2/warmup3.py @@ -1,6 +1,7 @@ -#194c8fa (HEAD -> assignment-2, origin/assignment-2) add warmup2.py -#294742d (origin/main, origin/HEAD, main) add week 2 folder -#58d836d Add files via upload -#d8c0c05 Update README.md +# git log --oneline output: +# 194c8fa add warmup2.py +# 294742d add week 2 folder +# 58d836d Add files via upload +# d8c0c05 Update README.md print("This week I learned how to use Python input, work with strings, and run Git commands in the terminal!") From 9a0219cc7882bc45a6492df9239e13faf172982f Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 21 Jul 2026 17:53:21 -0400 Subject: [PATCH 14/42] add warmup4.py --- week-2/assignment-2/warmup4.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/week-2/assignment-2/warmup4.py b/week-2/assignment-2/warmup4.py index 0bfd37c..44072ed 100644 --- a/week-2/assignment-2/warmup4.py +++ b/week-2/assignment-2/warmup4.py @@ -1,14 +1,14 @@ -''' 1. What the error message said: - NameError: name 'naame' is not defined. Did you mean: 'name'? +# 1. What the error message said: + # NameError: name 'naame' is not defined. Did you mean: 'name'? -2. What caused it: - I misspelled the variable name as 'naame' inside the print statement - and forgot to include input() on line 1, so Python didn't know what 'naame' was. +#2. What caused it: + # I misspelled the variable name as 'naame' inside the print statement + # and forgot to include input() on line 1, so Python didn't know what 'naame' was. -3. How I fixed it: - I added input() to line 1 to capture the user's input and corrected - the spelling of the variable to 'name' in the print statement.''' +#3. How I fixed it: + # I added input() to line 1 to capture the user's input and corrected + # the spelling of the variable to 'name' in the print statement.''' # Fixed, working code: From 543059c714da9180d275696896985b0c19597417 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Wed, 22 Jul 2026 19:48:51 -0400 Subject: [PATCH 15/42] add warmup1.py --- week-3/assignment-3/warmup1.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 week-3/assignment-3/warmup1.py diff --git a/week-3/assignment-3/warmup1.py b/week-3/assignment-3/warmup1.py new file mode 100644 index 0000000..2f72847 --- /dev/null +++ b/week-3/assignment-3/warmup1.py @@ -0,0 +1,15 @@ +score = 100 +if score >= 90: + print('A') +elif score >= 80: + print('B') +elif score >= 70: + print('C') +elif score >= 60: + print('D') +else: + print('F') + + + + From 1b753928bb26509c87a7c51789fb57566fbad5e9 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Wed, 22 Jul 2026 20:03:58 -0400 Subject: [PATCH 16/42] add warmup2.py --- week-3/assignment-3/warmup2.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 week-3/assignment-3/warmup2.py diff --git a/week-3/assignment-3/warmup2.py b/week-3/assignment-3/warmup2.py new file mode 100644 index 0000000..842fee0 --- /dev/null +++ b/week-3/assignment-3/warmup2.py @@ -0,0 +1,11 @@ +age = int(input('What is your age ')) + +if age >=0 and age <= 12: + print('You are a Child. ') +elif age >= 13 and age <= 17: + print(' You are a Teen. ') +elif age >= 18 and age <= 64: + print(' You are an adult. ') +elif age >= 65: + print('You are a senior') + From 28bb5354f3d4beca1147fa83c34d017f0cae097c Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Wed, 22 Jul 2026 20:22:52 -0400 Subject: [PATCH 17/42] add warmup3.py --- week-3/assignment-3/warmup3.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 week-3/assignment-3/warmup3.py diff --git a/week-3/assignment-3/warmup3.py b/week-3/assignment-3/warmup3.py new file mode 100644 index 0000000..bef1175 --- /dev/null +++ b/week-3/assignment-3/warmup3.py @@ -0,0 +1,14 @@ +# 'not True' is False and since one side is False False and False gives False +print(not True and False) + +# 'True or False' only needs one to ne True so it gives True +print(True or False and False) + +# 5 is greater than 3 so thats True and adding not flips True to False so its False. +print(not (5 > 3)) + +# 10 equals 10 is true, but 4 not equal to 4 is False. Both arent True 'and' gives False +print(10 == 10 and 4 != 4) + +# 'not False' is True, and 'not True' is False. It gives True +print(not False or not True) \ No newline at end of file From 06d79987c6db8e56e135e7fdb6cd531ef3468651 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Wed, 22 Jul 2026 20:42:37 -0400 Subject: [PATCH 18/42] add warmup4.py --- week-3/assignment-3/warmup4.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 week-3/assignment-3/warmup4.py diff --git a/week-3/assignment-3/warmup4.py b/week-3/assignment-3/warmup4.py new file mode 100644 index 0000000..c9c8a96 --- /dev/null +++ b/week-3/assignment-3/warmup4.py @@ -0,0 +1,15 @@ +number = int(input('Enter a number: ')) + +if number > 0: + print(f'{number} is positive.') +elif number < 0: + print(f'{number} is negative.') +else: + print(f'{number} is zero. ') + +if number % 2 == 0: + print(f'{number} is even. ') + +else: + print(f'{number} is odd.') + \ No newline at end of file From 6eebc4efeaed8d3934150885ff1725843ec14b45 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Wed, 22 Jul 2026 21:29:04 -0400 Subject: [PATCH 19/42] add mini_project.py --- week-3/assignment-3/mini_project.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 week-3/assignment-3/mini_project.py diff --git a/week-3/assignment-3/mini_project.py b/week-3/assignment-3/mini_project.py new file mode 100644 index 0000000..b17c6fd --- /dev/null +++ b/week-3/assignment-3/mini_project.py @@ -0,0 +1,29 @@ +day = input('Please enter a day of the week: ') +time_of_day = input("Please enter a time of day (morning, afternoon, or evening): ") + +if day == "monday": + if time_of_day == "morning": + print("Activity: Go for an early morning walk!! ") + elif time_of_day == "afternnon": + print('Activity: Make yourself a yummy snack!! ') + elif time_of_day == "evening": + print('Activity: Make yourself a yummy and healthy dinner') + else: + print('Invalid time of day') +elif day == "saturday": + if time_of_day == "morning": + print('Activity: Make yourself a nice cup of coffee to start your day!!') + elif time_of_day == "afternoon": + print('Activity: Spend your afternoon in a park or somewhere outdoors') + elif time_of_day == "evening": + print('Activity: Go and have nice dinner with a special someone') + else: + print('Invalid time of day') +elif day == "sunday": + if time_of_day == "morning": + print('Activity: Visit a local farmers market!!') + elif time_of_day == "afternoon": + print('Activity: Visit family or friends') + elif time_of_day == "evening": + print('Activity: Movie night!!') + From 5b3d9345e2b5c06492f1d17780f6f7f90cfa3946 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Sun, 26 Jul 2026 12:37:29 -0400 Subject: [PATCH 20/42] updated warmup1.py --- week-3/assignment-3/warmup1.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/week-3/assignment-3/warmup1.py b/week-3/assignment-3/warmup1.py index 2f72847..df9a800 100644 --- a/week-3/assignment-3/warmup1.py +++ b/week-3/assignment-3/warmup1.py @@ -1,14 +1,19 @@ score = 100 if score >= 90: - print('A') + grade = 'A' elif score >= 80: - print('B') + grade = 'B' elif score >= 70: - print('C') + grade = 'C' elif score >= 60: - print('D') + grade = 'D' else: - print('F') + grade = 'F' + +print(f'Score: {score}') +print(f'Grade: {grade}') + + From 5cbb1e58db297da125e56d4367d86660542a7536 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Sun, 26 Jul 2026 12:40:26 -0400 Subject: [PATCH 21/42] updated warmup2.py --- week-3/assignment-3/warmup2.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/week-3/assignment-3/warmup2.py b/week-3/assignment-3/warmup2.py index 842fee0..8e85828 100644 --- a/week-3/assignment-3/warmup2.py +++ b/week-3/assignment-3/warmup2.py @@ -5,7 +5,9 @@ elif age >= 13 and age <= 17: print(' You are a Teen. ') elif age >= 18 and age <= 64: - print(' You are an adult. ') + print(' You are an Adult. ') elif age >= 65: - print('You are a senior') + print('You are a Senior') +else: + print('Invalid Age') From b33614c527f212b0152637a009efa6c71c1442ea Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Sun, 26 Jul 2026 12:45:29 -0400 Subject: [PATCH 22/42] updated warmup4.py --- week-3/assignment-3/warmup4.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/week-3/assignment-3/warmup4.py b/week-3/assignment-3/warmup4.py index c9c8a96..84f6b5b 100644 --- a/week-3/assignment-3/warmup4.py +++ b/week-3/assignment-3/warmup4.py @@ -7,9 +7,10 @@ else: print(f'{number} is zero. ') + + if number % 2 == 0: print(f'{number} is even. ') else: print(f'{number} is odd.') - \ No newline at end of file From d239725025d71b2ad7a8948f0573520383584143 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Sun, 26 Jul 2026 12:59:04 -0400 Subject: [PATCH 23/42] updated mini_project.py --- week-3/assignment-3/mini_project.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/week-3/assignment-3/mini_project.py b/week-3/assignment-3/mini_project.py index b17c6fd..db455c5 100644 --- a/week-3/assignment-3/mini_project.py +++ b/week-3/assignment-3/mini_project.py @@ -1,10 +1,10 @@ -day = input('Please enter a day of the week: ') -time_of_day = input("Please enter a time of day (morning, afternoon, or evening): ") +day = input('Please enter a day of the week: ').strip().lower() +time_of_day = input("Please enter a time of day (morning, afternoon, or evening): ").strip().lower() if day == "monday": if time_of_day == "morning": print("Activity: Go for an early morning walk!! ") - elif time_of_day == "afternnon": + elif time_of_day == "afternoon": print('Activity: Make yourself a yummy snack!! ') elif time_of_day == "evening": print('Activity: Make yourself a yummy and healthy dinner') @@ -26,4 +26,8 @@ print('Activity: Visit family or friends') elif time_of_day == "evening": print('Activity: Movie night!!') + else: + print('Invalid time of day') +else: + print('Invalid day of the week. Please choose Monday, Saturday, or Sunday!') From 627755931b094dc8662c1978f5fd2a3a0765298e Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 28 Jul 2026 11:59:30 -0400 Subject: [PATCH 24/42] added warmup1.py --- week-4/assignment-4/warmup1.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 week-4/assignment-4/warmup1.py diff --git a/week-4/assignment-4/warmup1.py b/week-4/assignment-4/warmup1.py new file mode 100644 index 0000000..e5124e7 --- /dev/null +++ b/week-4/assignment-4/warmup1.py @@ -0,0 +1,13 @@ +num = ["2", "4", "6", "8", "10", "12", "14", "16"] + +#first item +print(num[0]) + +#last item(negative index) +print(num[-1]) + +##slice, only the middle four numbers +print(num[2:6]) +#the full list in reverse +num.reverse() +print(num) \ No newline at end of file From 91fbc061948683cbea572064b920e222ab2e9f42 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 28 Jul 2026 12:12:31 -0400 Subject: [PATCH 25/42] added warmup2.py --- week-4/assignment-4/warmup2.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 week-4/assignment-4/warmup2.py diff --git a/week-4/assignment-4/warmup2.py b/week-4/assignment-4/warmup2.py new file mode 100644 index 0000000..5a8a28e --- /dev/null +++ b/week-4/assignment-4/warmup2.py @@ -0,0 +1,10 @@ +student = {"name": "Genesis", + "Grade": "B", + 'subjects': ["english", "math", "history"]} + +for key, value in student.items(): + print(f"{key}: {value}") + +student["graduated"] = False + +print(student) \ No newline at end of file From 62ad1c7173c302c4eb4269182eaf495276e0ba14 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 28 Jul 2026 12:33:59 -0400 Subject: [PATCH 26/42] added warmup3.py --- week-4/assignment-4/warmup3.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 week-4/assignment-4/warmup3.py diff --git a/week-4/assignment-4/warmup3.py b/week-4/assignment-4/warmup3.py new file mode 100644 index 0000000..ec95ce6 --- /dev/null +++ b/week-4/assignment-4/warmup3.py @@ -0,0 +1,9 @@ +list1 = ["Python", "Java", "C++", "Javascript"] +list2 = ["HTML", "CSS", "Bash Script", "Javascript"] + +set1 = set(list1) +set2 = set(list2) + +print(set1.union(set2)) +print(set1.intersection(set2)) +print(set1.difference(set2)) \ No newline at end of file From fd4929565526fdae81199e2c7196886c43e43f28 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 28 Jul 2026 15:53:05 -0400 Subject: [PATCH 27/42] finish warmups and mini project --- week-4/assignment-4/mini_project.py | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 week-4/assignment-4/mini_project.py diff --git a/week-4/assignment-4/mini_project.py b/week-4/assignment-4/mini_project.py new file mode 100644 index 0000000..0d50670 --- /dev/null +++ b/week-4/assignment-4/mini_project.py @@ -0,0 +1,36 @@ +students = [ + {"name": "Jazmine", "score": 88, "subject": "Python"}, + {"name": "Luis", "score": 74, "subject": "Data"}, + {"name": "Sara", "score": 91, "subject": "Python"}, + {"name": "Marcus", "score": 68, "subject": "Web"}, + {"name": "Priya", "score": 95, "subject": "Data"}, + {"name": "Devon", "score": 72, "subject": "Python"}, + {"name": "Mia", "score": 83, "subject": "Web"}, + {"name": "Eli", "score": 79, "subject": "Data"}, +] + +highest_score = 0 +top_scorer_name = "" +total = 0 +subject = set() +high_scorers = [] + +for student in students: + if student["score"] >= 92: + highest_score = student["score"] + top_scorer_name = student["name"] + + total += student["score"] + + + subject.add(student["subject"]) + + if student["score"] > 75: + high_scorers.append(student["name"]) + + average = total / len(students) + +print(f"Top scorer: {top_scorer_name} ({highest_score})") +print(f"Class average: {average}") +print(f"Subjects offered: {subject}") + From ce002791f9560c526468411e979b6983e206e0ab Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Mon, 3 Aug 2026 21:16:36 -0400 Subject: [PATCH 28/42] added warmup1.py --- week-4/assignment-4/mini_project.py | 2 +- week-5/assignment-5/warmup1.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 week-5/assignment-5/warmup1.py diff --git a/week-4/assignment-4/mini_project.py b/week-4/assignment-4/mini_project.py index 0d50670..75cc5c8 100644 --- a/week-4/assignment-4/mini_project.py +++ b/week-4/assignment-4/mini_project.py @@ -16,7 +16,7 @@ high_scorers = [] for student in students: - if student["score"] >= 92: + if student["score"] > highest_score: highest_score = student["score"] top_scorer_name = student["name"] diff --git a/week-5/assignment-5/warmup1.py b/week-5/assignment-5/warmup1.py new file mode 100644 index 0000000..e35dbc5 --- /dev/null +++ b/week-5/assignment-5/warmup1.py @@ -0,0 +1,5 @@ + +total = 0 +for number in range(1,101): + total += number +print(f'The sum of 1 to 100 is: {total} ') \ No newline at end of file From 310a8f1b19284b5eae8fbabb3fdb291222a511a0 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Mon, 3 Aug 2026 21:42:55 -0400 Subject: [PATCH 29/42] added warmup2.py --- week-5/assignment-5/warmup2.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 week-5/assignment-5/warmup2.py diff --git a/week-5/assignment-5/warmup2.py b/week-5/assignment-5/warmup2.py new file mode 100644 index 0000000..103deb7 --- /dev/null +++ b/week-5/assignment-5/warmup2.py @@ -0,0 +1,16 @@ + +while True: + + try: + user_in = input('Please enter a number: ') + if user_in.isdigit(): + number = int(user_in) + break + else: + print("That's not a positive integer. Try again.") + + except ValueError: + + print("That's not a positive integer. Try again.") + +print(f'Got it: {number}') \ No newline at end of file From eb6759db3a00829bbed5c21692a137edd1437ffb Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Wed, 5 Aug 2026 12:24:31 -0400 Subject: [PATCH 30/42] added warmup3.py --- week-5/assignment-5/warmup3.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 week-5/assignment-5/warmup3.py diff --git a/week-5/assignment-5/warmup3.py b/week-5/assignment-5/warmup3.py new file mode 100644 index 0000000..26ca8ef --- /dev/null +++ b/week-5/assignment-5/warmup3.py @@ -0,0 +1,14 @@ +name = ["Genesis", "John", "Alice", "Bob", "Mary", "Jane", "Tom", "Jerry", "Sam", "Lucy"] + +find = input("Enter a name to find: ") + +counter = 0 + +for n in name: + if n == find: + print(f" Found {find} at index {counter}.") + else: + counter += 1 + +if counter == len(name): + print(f"{find} is not in the list.") \ No newline at end of file From 3fe0a06036562a781729412cb0468cfd1fcc5fda Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Wed, 5 Aug 2026 12:33:28 -0400 Subject: [PATCH 31/42] added warmup4.py --- week-5/assignment-5/warmup4.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 week-5/assignment-5/warmup4.py diff --git a/week-5/assignment-5/warmup4.py b/week-5/assignment-5/warmup4.py new file mode 100644 index 0000000..4f1e4c0 --- /dev/null +++ b/week-5/assignment-5/warmup4.py @@ -0,0 +1,10 @@ + +for number in range(1, 31): + if number % 3 == 0 and number % 5 == 0: + print("FizzBuzz") + elif number % 3 == 0: + print("Fizz") + elif number % 5 == 0: + print("Buzz") + else: + print(number) From c7cae7c9e95454bc36bd69f9c1c94469c7dd676d Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Wed, 5 Aug 2026 14:45:05 -0400 Subject: [PATCH 32/42] added mini_project.py --- week-5/assignment-5/mini_project.py | 59 +++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 week-5/assignment-5/mini_project.py diff --git a/week-5/assignment-5/mini_project.py b/week-5/assignment-5/mini_project.py new file mode 100644 index 0000000..3e1e5c5 --- /dev/null +++ b/week-5/assignment-5/mini_project.py @@ -0,0 +1,59 @@ +numbers = [42, 17, 83, 5, 61, 29, 74, 8, 55, 93, 31, 66, 14, 47, 78, 3, 59, 22, 86, 40] + +def show_menu(): + print('=== Number Cruncher ===') + print('1. Find the minimum number') + print('2. Find the maximum number') + print('3. Search for a number') + print('4. Sort the list') + print('5. Quit') + + +running = True +while running: + show_menu() + choice = input("\nEnter your choice: ") + + ##user input validation + + if choice == '1': + min_number = numbers[0] + for number in numbers: + if number < min_number: + min_number = number + print(f'The minimum number is: {min_number}') + + elif choice == '2': + max_number = numbers[0] + for number in numbers: + if number > max_number: + max_number = number + print(f'The maximum number is: {max_number}') + + elif choice == '3': + search = input("Enter a number to search for: ") + found = False #this is set to keep track of if its found or not + + #this is to loop through every index of the list to find the number + + for i in range(len(numbers)): + if numbers[i] == search: + print(f'Found {search} at index {i}.') + found = True + break + if not found: + print(f'{search} was not found in the list.') + + ##This is bubble sort without .sort() or sorted() + elif choice == '4': + + for i in range(len(numbers)): + for j in range(0, len(numbers) - i - 1): + if numbers[j] > numbers[j + 1]: + numbers[j], numbers[j + 1] = numbers[j + 1], numbers[j] + print(f'The sorted list is: {numbers}') + elif choice == '5': + print('Goodbye!') + running = False + else: + print('Invalid choice. Please try again.') From 4625e64e8ef049138973befa1938a4704bd01e0e Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 11 Aug 2026 12:33:38 -0400 Subject: [PATCH 33/42] added warmup1.py --- week-6/assignment-6/warmup1.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 week-6/assignment-6/warmup1.py diff --git a/week-6/assignment-6/warmup1.py b/week-6/assignment-6/warmup1.py new file mode 100644 index 0000000..1b047c1 --- /dev/null +++ b/week-6/assignment-6/warmup1.py @@ -0,0 +1,14 @@ +def greet(name, greeting= "Hello"): + + print(f"{greeting}, {name}!") + +greet("Alex") + +#call with a name and custom greeting +greet("Alex", "Good morning") + +#greeting passed as a keyword argument +greet(name="Alex", greeting="Hello") + + + From a83c093cd9437322714ff1acecc2cc7fc51d729d Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 11 Aug 2026 12:55:12 -0400 Subject: [PATCH 34/42] added warmup2.py --- week-6/assignment-6/warmup2.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 week-6/assignment-6/warmup2.py diff --git a/week-6/assignment-6/warmup2.py b/week-6/assignment-6/warmup2.py new file mode 100644 index 0000000..345303d --- /dev/null +++ b/week-6/assignment-6/warmup2.py @@ -0,0 +1,15 @@ +# celsius to fahrenheit + +# 1. Function definitions returning rounded values +def celsius_to_fahrenheit(c): + return round((c * 9/5) + 32, 1) + +def fahrenheit_to_celsius(f): + return round((f - 32) * 5/9, 1) + +# 2. Test values and print calls using f-strings +print(f"35°C = {celsius_to_fahrenheit(35)}°F") +print(f"10°C = {celsius_to_fahrenheit(10)}°F") +print(f"72°F = {fahrenheit_to_celsius(72)}°C") + + From 060e260b69226d3edfbf42895c2893e0cc46c167 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 11 Aug 2026 13:34:37 -0400 Subject: [PATCH 35/42] added warmup3.py --- week-6/assignment-6/warmup3.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 week-6/assignment-6/warmup3.py diff --git a/week-6/assignment-6/warmup3.py b/week-6/assignment-6/warmup3.py new file mode 100644 index 0000000..9e73fa5 --- /dev/null +++ b/week-6/assignment-6/warmup3.py @@ -0,0 +1,12 @@ +def set_name(): + name = "Harry" + return name # prints "Harry" + +print(set_name()) + + + +#print(name)# +# print(name) # NameError: name 'name' is not defined + ## ^^^^ +#NameError: name 'name' is not defined \ No newline at end of file From b973c3ecfe61a2bbe2c66187e6dd7011ef14bb06 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 11 Aug 2026 13:34:52 -0400 Subject: [PATCH 36/42] added warmup4.py --- week-6/assignment-6/warmup4.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 week-6/assignment-6/warmup4.py diff --git a/week-6/assignment-6/warmup4.py b/week-6/assignment-6/warmup4.py new file mode 100644 index 0000000..1985a20 --- /dev/null +++ b/week-6/assignment-6/warmup4.py @@ -0,0 +1,11 @@ +def is_valid_score(score): + if score < 0 or score > 100: + return False + else: + return True + +user_score = int(input("Enter a score between 0 and 100: ")) +if is_valid_score(user_score): + print("Valid score.") +else: + print("Invalid score - must be between 0 and 100.") \ No newline at end of file From 6e2f6ec441389936f278b473a596454fdd28d629 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 11 Aug 2026 14:05:20 -0400 Subject: [PATCH 37/42] mini_project.py --- week-6/assignment-6/mini_project.py | 90 +++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 week-6/assignment-6/mini_project.py diff --git a/week-6/assignment-6/mini_project.py b/week-6/assignment-6/mini_project.py new file mode 100644 index 0000000..c94a817 --- /dev/null +++ b/week-6/assignment-6/mini_project.py @@ -0,0 +1,90 @@ +numbers = [42, 17, 83, 5, 61, 29, 74, 8, 55, 93, 31, 66, 14, 47, 78, 3, 59, 22, 86, 40] + +#Findind minimum number +def find_minimum(numbers): + min_number = numbers[0] + for number in numbers: + if number < min_number: + min_number = number + return min_number + +#Finding maximum number +def find_maximum(numbers): + max_number = numbers[0] + for number in numbers: + if number > max_number: + max_number = number + return max_number + +#Searching for a number +def search_number(numbers, target): + + for i in range(len(numbers)): + if numbers[i] == target: + return i + return -1 + +#Bubble sort + +def bubble_sort(numbers): + +#make copy of the list to avoid modifying the original list + sorted_numbers = numbers.copy() + + for i in range(len(sorted_numbers)): + for j in range(0, len(sorted_numbers) - i - 1): + if sorted_numbers[j] > sorted_numbers[j + 1]: + sorted_numbers[j], sorted_numbers[j + 1] = sorted_numbers[j + 1], sorted_numbers[j] + print(f'The sorted list is: {sorted_numbers}') + + return bubble_sort + +#Prints the menu options +def show_menu(): + print('=== Number Cruncher ===') + print('1. Find the minimum number') + print('2. Find the maximum number') + print('3. Search for a number') + print('4. Sort the list') + print('5. Quit') + + return show_menu + +#Main program loop that calls for show_menu() and takes user input to call the appropriate function + +if __name__ == "__main__": + running = True + while running: + show_menu() + choice = input("\nEnter your choice: ") + + ##user input validation + + if choice == '1': + min_number = find_minimum(numbers) + print(f'The minimum number is: {min_number}') + + elif choice == '2': + max_number = find_maximum(numbers) + print(f'The maximum number is: {max_number}') + + elif choice == '3': + target = int(input("Enter a number to search for: ")) + index = search_number(numbers, target) + + if index != -1: + print(f'Found {target} at index {index}.') + else: + print(f'{target} was not found in the list.') + + elif choice == '4': + bubble_sort(numbers) + + elif choice == '5': + print('Goodbye!') + running = False + else: + print('Invalid choice. Please try again.') + + + \ No newline at end of file From af972d126a92f06d3a7814ac6f9aa188a1f4d645 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 18 Aug 2026 13:42:18 -0400 Subject: [PATCH 38/42] added warmup1.py --- week-7/assignment-7/warmup1.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 week-7/assignment-7/warmup1.py diff --git a/week-7/assignment-7/warmup1.py b/week-7/assignment-7/warmup1.py new file mode 100644 index 0000000..a13f8eb --- /dev/null +++ b/week-7/assignment-7/warmup1.py @@ -0,0 +1,7 @@ +# Warmup 1 +# Read a Text File and Print Line by Line + + +with open('python-intro-homework/week-7/data/notes.txt', 'r') as file: + for line in file: + print(line.strip()) \ No newline at end of file From 8c52ee6f41b60668fd70aa1cf79696b35f51a487 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 18 Aug 2026 13:46:06 -0400 Subject: [PATCH 39/42] added warmup2.py --- week-7/assignment-7/warmup2.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 week-7/assignment-7/warmup2.py diff --git a/week-7/assignment-7/warmup2.py b/week-7/assignment-7/warmup2.py new file mode 100644 index 0000000..b16375f --- /dev/null +++ b/week-7/assignment-7/warmup2.py @@ -0,0 +1,8 @@ +#Read a CSV with DictReader and Print Line by Line + +import csv + +with open('python-intro-homework/week-7/data/students.csv', 'r') as file: + reader = csv.DictReader(file) + for row in reader: + print(row['name'], row['score']) \ No newline at end of file From 8272fa1090e22686083b803fc74cd3ebd6f87129 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 18 Aug 2026 14:09:50 -0400 Subject: [PATCH 40/42] added warmup3.py --- week-7/assignment-7/warmup3.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 week-7/assignment-7/warmup3.py diff --git a/week-7/assignment-7/warmup3.py b/week-7/assignment-7/warmup3.py new file mode 100644 index 0000000..65c13f6 --- /dev/null +++ b/week-7/assignment-7/warmup3.py @@ -0,0 +1,18 @@ +#Using the os module +#print current directory, Check whether ../data/expenses.csv exists using os.path.exists(). Print "expenses.csv found." or "expenses.csv not found." accordingly. +#Use os.path.join() to build the path "../data/expenses.csv" from unittest import result + +import os + +print(os.getcwd()) + +# build the path to the file +path = os.path.join('..', 'data', 'expenses.csv') + +#check if the file exists +if os.path.exists(path): + print("expenses.csv found.") +else: + print("expenses.csv not found.") + +print(path) \ No newline at end of file From 88f204d16b1316c57439ac914b178960b72f7c83 Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 18 Aug 2026 14:10:08 -0400 Subject: [PATCH 41/42] added warmup4.py --- week-7/assignment-7/warmup4.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 week-7/assignment-7/warmup4.py diff --git a/week-7/assignment-7/warmup4.py b/week-7/assignment-7/warmup4.py new file mode 100644 index 0000000..21b888a --- /dev/null +++ b/week-7/assignment-7/warmup4.py @@ -0,0 +1,7 @@ +#Use datetime module to print the current date and time in the format "Today is: YYYY-MM-DD HH:MM:SS" + +import datetime + +from datetime import datetime +now = datetime.now() +print("Today is:", now.strftime("%B %d, %Y")) \ No newline at end of file From fd4b98cb065b5127d28d073a152256a8e998a2ed Mon Sep 17 00:00:00 2001 From: genesisjzm-rgb Date: Tue, 18 Aug 2026 15:05:58 -0400 Subject: [PATCH 42/42] added mini_project.py --- week-7/assignment-7/mini_project.py | 43 +++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 week-7/assignment-7/mini_project.py diff --git a/week-7/assignment-7/mini_project.py b/week-7/assignment-7/mini_project.py new file mode 100644 index 0000000..d41d781 --- /dev/null +++ b/week-7/assignment-7/mini_project.py @@ -0,0 +1,43 @@ +#Expense Report Generator +#use os.path.exists() to check if the file exists. If it does, read the file into list of dictionaries using csv.DictReader. If it does not exist, print "File not found." and exit the program. +#convert the amount field to float for each row +#filter the list to only rows where category is "Food" +#Write report to food_export/txt file in format Food Expenses Report- genrated (todays date) + +import os +import datetime +import csv + +# build the path to the file +path = os.path.join('..', 'data', 'expenses.csv') + +#check if the file exists +if os.path.exists(path): + print("expenses.csv found.") + with open(path, 'r') as f: + reader = csv.DictReader(f) + expenses = [] + #convery numeric fields to float + for row in reader: + row['amount'] = float(row['amount']) + expenses.append(row) + + + #filter the list to only rows where category is "Food" + food_expenses = [row for row in expenses if row['category'] == 'Food'] + + #calculate total + total_food = sum(item['amount'] for item in food_expenses) + + #Format date and write report + today = datetime.datetime.now().strftime("%B, %d, %Y") + + with open('food_report.txt', 'w') as report_file: + report_file.write(f'Food Expenses Report - Generated {today}\n') + + for expense in food_expenses: + report_file.write(f"{expense['date']}: {expense['amount']}") + report_file.write(f"\n Total: {total_food:.2f}\n") +else: + print("expenses.csv not found.") +