From c981e33342f7c435571dcc321c875887342970ae Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Mon, 13 Jul 2026 19:46:15 -0400 Subject: [PATCH 01/30] warmups files --- week-2/assignment-2/warmup3.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) 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..e69de29 From e8c3550f617abf4f93d04a6a6ccb63cabaf09b00 Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Mon, 13 Jul 2026 19:48:11 -0400 Subject: [PATCH 02/30] warmups files --- week-2/assignment-2/warmup3.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/week-2/assignment-2/warmup3.py b/week-2/assignment-2/warmup3.py index e69de29..a6324f7 100644 --- a/week-2/assignment-2/warmup3.py +++ b/week-2/assignment-2/warmup3.py @@ -0,0 +1,2 @@ +# git log --oneline output: +#c981e33 (HEAD -> assignment-2, origin/assignment-2) warmups files \ No newline at end of file From 02308a4f5abc19f888f0e18abe112be781e81ded Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 21 Jul 2026 11:44:51 -0400 Subject: [PATCH 03/30] adding assignment 3 files --- week-3/assignment-3/mini-project.py | 67 +++++++++++++++++++++++++++++ week-3/assignment-3/warmup1.py | 17 ++++++++ week-3/assignment-3/warmup2.py | 14 ++++++ week-3/assignment-3/warmup3.py | 5 +++ week-3/assignment-3/warmup4.py | 19 ++++++++ 5 files changed, 122 insertions(+) create mode 100644 week-3/assignment-3/mini-project.py create mode 100644 week-3/assignment-3/warmup1.py create mode 100644 week-3/assignment-3/warmup2.py create mode 100644 week-3/assignment-3/warmup3.py create mode 100644 week-3/assignment-3/warmup4.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..747a106 --- /dev/null +++ b/week-3/assignment-3/mini-project.py @@ -0,0 +1,67 @@ +day = input("What day is it? ").capitalize() +timeOfDay = input("What time of day? ").lower() + +if day=="Sunday": + if(timeOfDay == "morning"): + print("Suggestion: Good Morning, it's a great time to go for a walk!") + elif(timeOfDay == "afternoon"): + print("Suggestion: It's time for lunch.") + elif(timeOfDay == "evening"): + print("Suggestion: Good evening, it's time to make dinner!") + + +elif day=="Monday": + if(timeOfDay =='morning'): + print("Suggestion: Morning, it's a great time to make Pancakes for Breakfast!") + elif(timeOfDay == "afternoon"): + print("Suggestion: Good afternoon, it's a great time to read a book!") + elif(timeOfDay == "evening"): + print("Suggestion: Good evening, it's a great time to go to a friend's house.") + + +elif day=="Tuesday": + if(timeOfDay =='morning'): + print("Suggestion: Morning, it's a great time to go to a Cafe for Breakfast!") + elif(timeOfDay == "afternoon"): + print("Suggestion: Good afternoon, it's a great time to go to lunch!") + elif(timeOfDay == "evening"): + print("Suggestion: Good evening, it's a great time to go to the gym!") + + +elif day=="Wednesday": + if(timeOfDay =='morning'): + print("Suggestion: Morning, it's a great time to go for a run!") + elif(timeOfDay == "afternoon"): + print("Suggestion: Good afternoon, it's a great time to go to the grocery store.") + elif(timeOfDay == "evening"): + print("Suggestion: Good evening, it's a great time to a restaurant!") + + +elif day=="Thursday": + if(timeOfDay =='morning'): + print("Suggestion: Morning, it's a great time to have coffee!") + elif(timeOfDay == "afternoon"): + print("Suggestion: Good afternoon, it's a great time to go to the post office.") + elif(timeOfDay == "evening"): + print("Suggestion: Good evening, it's a great time to walk the dog!!") + + +elif day=="Friday": + if(timeOfDay =='morning'): + print("Suggestion: Morning, it's a great time to exercise!") + elif(timeOfDay == "afternoon"): + print("Suggestion: Good afternoon, it's a great time to play Ping Pong.") + elif(timeOfDay == "evening"): + print("Suggestion: Good evening, it's a great time to watch TV!") + + +elif day=="Saturday": + if(timeOfDay =='morning'): + print("Suggestion: Morning, it's a great time watch the news!") + elif(timeOfDay == "afternoon"): + print("Suggestion: Good afternoon, it's a great time to go for Ice Cream!") + elif(timeOfDay == "evening"): + print("Suggestion: Good evening, it's a great time to watch a movie!") + +else: + print("Sorry, I don't recognize that day. Try: Monday, Tuesday, Wednesday...") \ No newline at end of file diff --git a/week-3/assignment-3/warmup1.py b/week-3/assignment-3/warmup1.py new file mode 100644 index 0000000..eca378a --- /dev/null +++ b/week-3/assignment-3/warmup1.py @@ -0,0 +1,17 @@ +score = 54 + +if score >= 90 and score <=100: + print(f"Score: {score}") + print("Grade: A") +elif score >= 80 and score <=89: + print(f"Score: {score}") + print("Grade: B") +elif score >= 70 and score <=79: + print(f"Score: {score}") + print("Grade: C") +elif score >= 60 and score <=69: + print(f"Score: {score}") + print("Grade: D") +else: + print(f"Score: {score}") + print("Grade: F") diff --git a/week-3/assignment-3/warmup2.py b/week-3/assignment-3/warmup2.py new file mode 100644 index 0000000..3328f6e --- /dev/null +++ b/week-3/assignment-3/warmup2.py @@ -0,0 +1,14 @@ +age = int(input("Enter your age:")) + +if age>=0 and age<=12: + print(f"Enter your age: {age}") + print("You are a Child.") +elif age>=13 and age<=17: + print(f"Enter your age: {age}") + print("You are a Teen.") +elif age>=18 and age<=64: + print(f"Enter your age: {age}") + print("You are a Adult.") +else: + print(f"Enter your age: {age}") + print("You are a Senior.") diff --git a/week-3/assignment-3/warmup3.py b/week-3/assignment-3/warmup3.py new file mode 100644 index 0000000..1044339 --- /dev/null +++ b/week-3/assignment-3/warmup3.py @@ -0,0 +1,5 @@ +print(not True and False) #not True is False; False and False is False +print(True or False and False) # The expression is True because of the order of operation. The 'and' statement is evaluated first then the "OR" expressiona and for 'OR' you only need for one expressiont to be true. +print(not (5 > 3)) # 5 is greater than 3 which is True; but the not makes it False +print(10 == 10 and 4 != 4) # 10==10 is True; and 4!=4 is False so the expression is False because with an "and" expression they both have to be true +print(not False or not True) # With an OR expression only one statement has to be True. \ No newline at end of file diff --git a/week-3/assignment-3/warmup4.py b/week-3/assignment-3/warmup4.py new file mode 100644 index 0000000..c398d47 --- /dev/null +++ b/week-3/assignment-3/warmup4.py @@ -0,0 +1,19 @@ +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 !=0 and number%2 == 0: + print(f"{number} is even.") + +elif number !=0 and number%2 !=0: + print(f"{number} is odd.") + +else: + print(f"{number} is even.") From a34c84b061ef4eb1025342caafb44daa5efe1668 Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 21 Jul 2026 12:19:40 -0400 Subject: [PATCH 04/30] adding friendly message to mini-project --- week-3/assignment-3/.gitignore | 1 + week-3/assignment-3/mini-project.py | 26 +++++++++++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 week-3/assignment-3/.gitignore diff --git a/week-3/assignment-3/.gitignore b/week-3/assignment-3/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/week-3/assignment-3/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/week-3/assignment-3/mini-project.py b/week-3/assignment-3/mini-project.py index 747a106..8a7c1a5 100644 --- a/week-3/assignment-3/mini-project.py +++ b/week-3/assignment-3/mini-project.py @@ -8,6 +8,8 @@ print("Suggestion: It's time for lunch.") elif(timeOfDay == "evening"): print("Suggestion: Good evening, it's time to make dinner!") + else: + print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day on {day}.") elif day=="Monday": @@ -17,7 +19,8 @@ print("Suggestion: Good afternoon, it's a great time to read a book!") elif(timeOfDay == "evening"): print("Suggestion: Good evening, it's a great time to go to a friend's house.") - + else: + print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day on {day}.") elif day=="Tuesday": if(timeOfDay =='morning'): @@ -26,7 +29,8 @@ print("Suggestion: Good afternoon, it's a great time to go to lunch!") elif(timeOfDay == "evening"): print("Suggestion: Good evening, it's a great time to go to the gym!") - + else: + print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day on {day}.") elif day=="Wednesday": if(timeOfDay =='morning'): @@ -35,7 +39,8 @@ print("Suggestion: Good afternoon, it's a great time to go to the grocery store.") elif(timeOfDay == "evening"): print("Suggestion: Good evening, it's a great time to a restaurant!") - + else: + print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day on {day}.") elif day=="Thursday": if(timeOfDay =='morning'): @@ -44,7 +49,8 @@ print("Suggestion: Good afternoon, it's a great time to go to the post office.") elif(timeOfDay == "evening"): print("Suggestion: Good evening, it's a great time to walk the dog!!") - + else: + print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day on {day}.") elif day=="Friday": if(timeOfDay =='morning'): @@ -53,7 +59,8 @@ print("Suggestion: Good afternoon, it's a great time to play Ping Pong.") elif(timeOfDay == "evening"): print("Suggestion: Good evening, it's a great time to watch TV!") - + else: + print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day on {day}.") elif day=="Saturday": if(timeOfDay =='morning'): @@ -62,6 +69,11 @@ print("Suggestion: Good afternoon, it's a great time to go for Ice Cream!") elif(timeOfDay == "evening"): print("Suggestion: Good evening, it's a great time to watch a movie!") - + else: + print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day on {day}.") else: - print("Sorry, I don't recognize that day. Try: Monday, Tuesday, Wednesday...") \ No newline at end of file + print("Sorry, I don't recognize that day. Try: Monday, Tuesday, Wednesday...") + + if(timeOfDay != 'morning' or 'afternoon' or 'evening'): + print("Sorry, I don't recognize that time of day. Try: morning, afternoon or evening.") + From 4bae462baf99e4fffa769e3070138190a343f975 Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 21 Jul 2026 12:27:12 -0400 Subject: [PATCH 05/30] adding updates suggested by the AI Review. --- week-3/assignment-3/warmup2.py | 2 +- week-3/assignment-3/warmup4.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/week-3/assignment-3/warmup2.py b/week-3/assignment-3/warmup2.py index 3328f6e..7b8bc28 100644 --- a/week-3/assignment-3/warmup2.py +++ b/week-3/assignment-3/warmup2.py @@ -8,7 +8,7 @@ print("You are a Teen.") elif age>=18 and age<=64: print(f"Enter your age: {age}") - print("You are a Adult.") + print("You are an Adult.") else: print(f"Enter your age: {age}") print("You are a Senior.") diff --git a/week-3/assignment-3/warmup4.py b/week-3/assignment-3/warmup4.py index c398d47..59c9e9d 100644 --- a/week-3/assignment-3/warmup4.py +++ b/week-3/assignment-3/warmup4.py @@ -1,5 +1,7 @@ number = int(input("Enter a number: ")) +# if/elif/else statement 1 for sign + if number>0: print(f"{number} is positive.") @@ -9,11 +11,13 @@ else: print(f"{number} is zero.") +# if/elif/else statement 2 for parity including zero + if number !=0 and number%2 == 0: print(f"{number} is even.") elif number !=0 and number%2 !=0: print(f"{number} is odd.") -else: +elif number ==0: print(f"{number} is even.") From bc422d8d45161b336703f9c7fa025a30819a7c6d Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 21 Jul 2026 12:51:52 -0400 Subject: [PATCH 06/30] adding updates suggested by the AI Review 2. --- .../{mini-project.py => mini_project.py} | 26 ++++++++++++------- week-3/assignment-3/warmup2.py | 2 +- week-3/assignment-3/warmup3.py | 4 +-- week-3/assignment-3/warmup4.py | 2 +- 4 files changed, 21 insertions(+), 13 deletions(-) rename week-3/assignment-3/{mini-project.py => mini_project.py} (84%) diff --git a/week-3/assignment-3/mini-project.py b/week-3/assignment-3/mini_project.py similarity index 84% rename from week-3/assignment-3/mini-project.py rename to week-3/assignment-3/mini_project.py index 8a7c1a5..9c5c1b0 100644 --- a/week-3/assignment-3/mini-project.py +++ b/week-3/assignment-3/mini_project.py @@ -1,7 +1,7 @@ day = input("What day is it? ").capitalize() -timeOfDay = input("What time of day? ").lower() if day=="Sunday": + timeOfDay = input("What time of day? ").lower() if(timeOfDay == "morning"): print("Suggestion: Good Morning, it's a great time to go for a walk!") elif(timeOfDay == "afternoon"): @@ -11,8 +11,9 @@ else: print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day on {day}.") - elif day=="Monday": + timeOfDay = input("What time of day? ").lower() + if(timeOfDay =='morning'): print("Suggestion: Morning, it's a great time to make Pancakes for Breakfast!") elif(timeOfDay == "afternoon"): @@ -21,8 +22,10 @@ print("Suggestion: Good evening, it's a great time to go to a friend's house.") else: print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day on {day}.") - + elif day=="Tuesday": + timeOfDay = input("What time of day? ").lower() + if(timeOfDay =='morning'): print("Suggestion: Morning, it's a great time to go to a Cafe for Breakfast!") elif(timeOfDay == "afternoon"): @@ -33,6 +36,8 @@ print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day on {day}.") elif day=="Wednesday": + timeOfDay = input("What time of day? ").lower() + if(timeOfDay =='morning'): print("Suggestion: Morning, it's a great time to go for a run!") elif(timeOfDay == "afternoon"): @@ -43,30 +48,36 @@ print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day on {day}.") elif day=="Thursday": + timeOfDay = input("What time of day? ").lower() + if(timeOfDay =='morning'): print("Suggestion: Morning, it's a great time to have coffee!") elif(timeOfDay == "afternoon"): - print("Suggestion: Good afternoon, it's a great time to go to the post office.") + print("Suggestion: Good afternoon, it's a great time to go to the post office.") elif(timeOfDay == "evening"): print("Suggestion: Good evening, it's a great time to walk the dog!!") else: print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day on {day}.") elif day=="Friday": + timeOfDay = input("What time of day? ").lower() + if(timeOfDay =='morning'): print("Suggestion: Morning, it's a great time to exercise!") elif(timeOfDay == "afternoon"): - print("Suggestion: Good afternoon, it's a great time to play Ping Pong.") + print("Suggestion: Good afternoon, it's a great time to play Ping Pong.") elif(timeOfDay == "evening"): print("Suggestion: Good evening, it's a great time to watch TV!") else: print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day on {day}.") elif day=="Saturday": + timeOfDay = input("What time of day? ").lower() + if(timeOfDay =='morning'): print("Suggestion: Morning, it's a great time watch the news!") elif(timeOfDay == "afternoon"): - print("Suggestion: Good afternoon, it's a great time to go for Ice Cream!") + print("Suggestion: Good afternoon, it's a great time to go for Ice Cream!") elif(timeOfDay == "evening"): print("Suggestion: Good evening, it's a great time to watch a movie!") else: @@ -74,6 +85,3 @@ else: print("Sorry, I don't recognize that day. Try: Monday, Tuesday, Wednesday...") - if(timeOfDay != 'morning' or 'afternoon' or 'evening'): - print("Sorry, I don't recognize that time of day. Try: morning, afternoon or evening.") - diff --git a/week-3/assignment-3/warmup2.py b/week-3/assignment-3/warmup2.py index 7b8bc28..3328f6e 100644 --- a/week-3/assignment-3/warmup2.py +++ b/week-3/assignment-3/warmup2.py @@ -8,7 +8,7 @@ print("You are a Teen.") elif age>=18 and age<=64: print(f"Enter your age: {age}") - print("You are an Adult.") + print("You are a Adult.") else: print(f"Enter your age: {age}") print("You are a Senior.") diff --git a/week-3/assignment-3/warmup3.py b/week-3/assignment-3/warmup3.py index 1044339..57de4e0 100644 --- a/week-3/assignment-3/warmup3.py +++ b/week-3/assignment-3/warmup3.py @@ -1,5 +1,5 @@ print(not True and False) #not True is False; False and False is False -print(True or False and False) # The expression is True because of the order of operation. The 'and' statement is evaluated first then the "OR" expressiona and for 'OR' you only need for one expressiont to be true. +print(True or False and False) # The expression is True because of the order of operation. The 'and' statement is evaluated first with the result of False; then the "OR" expressiona and for 'OR' you only need for one expressiont to be true. print(not (5 > 3)) # 5 is greater than 3 which is True; but the not makes it False print(10 == 10 and 4 != 4) # 10==10 is True; and 4!=4 is False so the expression is False because with an "and" expression they both have to be true -print(not False or not True) # With an OR expression only one statement has to be True. \ No newline at end of file +print(not False or not True) # With an OR expression only one statement has to be True; 'not False' is evaluated as True and 'not True' as False; the expression is TRUE \ No newline at end of file diff --git a/week-3/assignment-3/warmup4.py b/week-3/assignment-3/warmup4.py index 59c9e9d..6f9eaae 100644 --- a/week-3/assignment-3/warmup4.py +++ b/week-3/assignment-3/warmup4.py @@ -19,5 +19,5 @@ elif number !=0 and number%2 !=0: print(f"{number} is odd.") -elif number ==0: +else: print(f"{number} is even.") From 199b846707fc976711379561550d134224b145b0 Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 21 Jul 2026 12:55:50 -0400 Subject: [PATCH 07/30] adding updates suggested by the AI Review 3. --- week-3/assignment-3/mini_project.py | 2 +- week-3/assignment-3/warmup2.py | 2 +- week-3/assignment-3/warmup4.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/week-3/assignment-3/mini_project.py b/week-3/assignment-3/mini_project.py index 9c5c1b0..bae8ea4 100644 --- a/week-3/assignment-3/mini_project.py +++ b/week-3/assignment-3/mini_project.py @@ -1,4 +1,4 @@ -day = input("What day is it? ").capitalize() +day = input("What day is it? ").lower() if day=="Sunday": timeOfDay = input("What time of day? ").lower() diff --git a/week-3/assignment-3/warmup2.py b/week-3/assignment-3/warmup2.py index 3328f6e..7b8bc28 100644 --- a/week-3/assignment-3/warmup2.py +++ b/week-3/assignment-3/warmup2.py @@ -8,7 +8,7 @@ print("You are a Teen.") elif age>=18 and age<=64: print(f"Enter your age: {age}") - print("You are a Adult.") + print("You are an Adult.") else: print(f"Enter your age: {age}") print("You are a Senior.") diff --git a/week-3/assignment-3/warmup4.py b/week-3/assignment-3/warmup4.py index 6f9eaae..59c9e9d 100644 --- a/week-3/assignment-3/warmup4.py +++ b/week-3/assignment-3/warmup4.py @@ -19,5 +19,5 @@ elif number !=0 and number%2 !=0: print(f"{number} is odd.") -else: +elif number ==0: print(f"{number} is even.") From d4921fdb5a3ef74c0d181adeafa605c46880e157 Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 21 Jul 2026 13:02:40 -0400 Subject: [PATCH 08/30] adding updates suggested by the AI Review 3. --- week-3/assignment-3/warmup1.py | 2 +- week-3/assignment-3/warmup4.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/week-3/assignment-3/warmup1.py b/week-3/assignment-3/warmup1.py index eca378a..f0c60af 100644 --- a/week-3/assignment-3/warmup1.py +++ b/week-3/assignment-3/warmup1.py @@ -12,6 +12,6 @@ elif score >= 60 and score <=69: print(f"Score: {score}") print("Grade: D") -else: +elif score >= 0 and score <=59: print(f"Score: {score}") print("Grade: F") diff --git a/week-3/assignment-3/warmup4.py b/week-3/assignment-3/warmup4.py index 59c9e9d..0ccb778 100644 --- a/week-3/assignment-3/warmup4.py +++ b/week-3/assignment-3/warmup4.py @@ -13,11 +13,9 @@ # if/elif/else statement 2 for parity including zero -if number !=0 and number%2 == 0: +if number%2 == 0: print(f"{number} is even.") -elif number !=0 and number%2 !=0: +elif number%2 !=0: print(f"{number} is odd.") -elif number ==0: - print(f"{number} is even.") From f650354edf94971603ccb8a16a1edb520e3efa03 Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 21 Jul 2026 13:13:46 -0400 Subject: [PATCH 09/30] adding updates suggested by the AI Review 4. --- week-3/assignment-3/mini_project.py | 27 +++++++++++++-------------- week-3/assignment-3/warmup1.py | 2 +- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/week-3/assignment-3/mini_project.py b/week-3/assignment-3/mini_project.py index bae8ea4..4cc11f3 100644 --- a/week-3/assignment-3/mini_project.py +++ b/week-3/assignment-3/mini_project.py @@ -1,6 +1,6 @@ day = input("What day is it? ").lower() -if day=="Sunday": +if day=="sunday": timeOfDay = input("What time of day? ").lower() if(timeOfDay == "morning"): print("Suggestion: Good Morning, it's a great time to go for a walk!") @@ -9,11 +9,10 @@ elif(timeOfDay == "evening"): print("Suggestion: Good evening, it's time to make dinner!") else: - print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day on {day}.") + print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day.") -elif day=="Monday": +elif day=="monday": timeOfDay = input("What time of day? ").lower() - if(timeOfDay =='morning'): print("Suggestion: Morning, it's a great time to make Pancakes for Breakfast!") elif(timeOfDay == "afternoon"): @@ -21,9 +20,9 @@ elif(timeOfDay == "evening"): print("Suggestion: Good evening, it's a great time to go to a friend's house.") else: - print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day on {day}.") + print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day.") -elif day=="Tuesday": +elif day=="tuesday": timeOfDay = input("What time of day? ").lower() if(timeOfDay =='morning'): @@ -33,9 +32,9 @@ elif(timeOfDay == "evening"): print("Suggestion: Good evening, it's a great time to go to the gym!") else: - print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day on {day}.") + print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day.") -elif day=="Wednesday": +elif day=="wednesday": timeOfDay = input("What time of day? ").lower() if(timeOfDay =='morning'): @@ -45,7 +44,7 @@ elif(timeOfDay == "evening"): print("Suggestion: Good evening, it's a great time to a restaurant!") else: - print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day on {day}.") + print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day.") elif day=="Thursday": timeOfDay = input("What time of day? ").lower() @@ -57,9 +56,9 @@ elif(timeOfDay == "evening"): print("Suggestion: Good evening, it's a great time to walk the dog!!") else: - print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day on {day}.") + print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day.") -elif day=="Friday": +elif day=="friday": timeOfDay = input("What time of day? ").lower() if(timeOfDay =='morning'): @@ -69,9 +68,9 @@ elif(timeOfDay == "evening"): print("Suggestion: Good evening, it's a great time to watch TV!") else: - print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day on {day}.") + print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day.") -elif day=="Saturday": +elif day=="saturday": timeOfDay = input("What time of day? ").lower() if(timeOfDay =='morning'): @@ -81,7 +80,7 @@ elif(timeOfDay == "evening"): print("Suggestion: Good evening, it's a great time to watch a movie!") else: - print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day on {day}.") + print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day.") else: print("Sorry, I don't recognize that day. Try: Monday, Tuesday, Wednesday...") diff --git a/week-3/assignment-3/warmup1.py b/week-3/assignment-3/warmup1.py index f0c60af..c8b44dc 100644 --- a/week-3/assignment-3/warmup1.py +++ b/week-3/assignment-3/warmup1.py @@ -1,4 +1,4 @@ -score = 54 +score = int(input("Pick any number between 0 and 100: ")) if score >= 90 and score <=100: print(f"Score: {score}") From d1def7c0946f92ef1247e6922a47720ad094f7ef Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 21 Jul 2026 13:16:39 -0400 Subject: [PATCH 10/30] adding updates suggested by the AI Review 5. --- week-3/assignment-3/mini_project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/week-3/assignment-3/mini_project.py b/week-3/assignment-3/mini_project.py index 4cc11f3..0bfa340 100644 --- a/week-3/assignment-3/mini_project.py +++ b/week-3/assignment-3/mini_project.py @@ -46,7 +46,7 @@ else: print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day.") -elif day=="Thursday": +elif day=="thursday": timeOfDay = input("What time of day? ").lower() if(timeOfDay =='morning'): From 4dfb92fd471edc7d7d9601bbd2e8c3ffaeb8463c Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 21 Jul 2026 13:45:29 -0400 Subject: [PATCH 11/30] adding updates suggested by the AI Review 6. --- week-3/assignment-3/warmup3.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/week-3/assignment-3/warmup3.py b/week-3/assignment-3/warmup3.py index 57de4e0..8a752d9 100644 --- a/week-3/assignment-3/warmup3.py +++ b/week-3/assignment-3/warmup3.py @@ -1,5 +1,5 @@ print(not True and False) #not True is False; False and False is False -print(True or False and False) # The expression is True because of the order of operation. The 'and' statement is evaluated first with the result of False; then the "OR" expressiona and for 'OR' you only need for one expressiont to be true. -print(not (5 > 3)) # 5 is greater than 3 which is True; but the not makes it False -print(10 == 10 and 4 != 4) # 10==10 is True; and 4!=4 is False so the expression is False because with an "and" expression they both have to be true -print(not False or not True) # With an OR expression only one statement has to be True; 'not False' is evaluated as True and 'not True' as False; the expression is TRUE \ No newline at end of file +print(True or False and False) # True or False is True; And False is False +print(not (5 > 3)) # 5 is greater than 3 which is True; Not True is False +print(10 == 10 and 4 != 4) # 10==10 is True; and 4!=4 is False; True and False is False +print(not False or not True) # Not False is True; not True is False; True or False is True \ No newline at end of file From bdb834a6d0163bd3fa5e47a225b25ae8440c2bf1 Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 21 Jul 2026 13:51:33 -0400 Subject: [PATCH 12/30] adding updates suggested by the AI Review 7 adding parity for zero. --- week-3/assignment-3/warmup4.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/week-3/assignment-3/warmup4.py b/week-3/assignment-3/warmup4.py index 0ccb778..4793a89 100644 --- a/week-3/assignment-3/warmup4.py +++ b/week-3/assignment-3/warmup4.py @@ -13,9 +13,12 @@ # if/elif/else statement 2 for parity including zero -if number%2 == 0: +if number !=0 and number%2 == 0: print(f"{number} is even.") -elif number%2 !=0: +elif number !=0 and number%2 !=0: print(f"{number} is odd.") +elif number ==0: + print(f"{number} is even.") + From e6c5931c0ea4efee433926a2d4a0d3e5458df495 Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 21 Jul 2026 13:55:03 -0400 Subject: [PATCH 13/30] adding updates suggested by the AI Review 7 changing text for enter your age. --- week-3/assignment-3/warmup2.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/week-3/assignment-3/warmup2.py b/week-3/assignment-3/warmup2.py index 7b8bc28..8657837 100644 --- a/week-3/assignment-3/warmup2.py +++ b/week-3/assignment-3/warmup2.py @@ -1,14 +1,14 @@ age = int(input("Enter your age:")) if age>=0 and age<=12: - print(f"Enter your age: {age}") + print(f"Your age is {age}.") print("You are a Child.") elif age>=13 and age<=17: - print(f"Enter your age: {age}") + print(f"Your age is {age}.") print("You are a Teen.") elif age>=18 and age<=64: - print(f"Enter your age: {age}") + print(f"Your age is {age}.") print("You are an Adult.") else: - print(f"Enter your age: {age}") + print(f"Your age is {age}.") print("You are a Senior.") From 95cf8791410978ebcc859411fb7280787dfce3f4 Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 21 Jul 2026 13:57:26 -0400 Subject: [PATCH 14/30] adding updates suggested by the AI Review 7 changing text for enter your age. --- week-3/assignment-3/warmup4.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/week-3/assignment-3/warmup4.py b/week-3/assignment-3/warmup4.py index 4793a89..0914cda 100644 --- a/week-3/assignment-3/warmup4.py +++ b/week-3/assignment-3/warmup4.py @@ -10,6 +10,7 @@ else: print(f"{number} is zero.") + print(f"{number} is even." # if/elif/else statement 2 for parity including zero @@ -19,6 +20,4 @@ elif number !=0 and number%2 !=0: print(f"{number} is odd.") -elif number ==0: - print(f"{number} is even.") - + ) From 8857c92e81de30601d7baf8127979d0acec6d1e4 Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 21 Jul 2026 14:00:46 -0400 Subject: [PATCH 15/30] adding updates suggested by the AI Review 8 --- week-3/assignment-3/warmup2.py | 8 ++++---- week-3/assignment-3/warmup4.py | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/week-3/assignment-3/warmup2.py b/week-3/assignment-3/warmup2.py index 8657837..cb69451 100644 --- a/week-3/assignment-3/warmup2.py +++ b/week-3/assignment-3/warmup2.py @@ -1,14 +1,14 @@ age = int(input("Enter your age:")) if age>=0 and age<=12: - print(f"Your age is {age}.") + #print(f"Your age is {age}.") print("You are a Child.") elif age>=13 and age<=17: - print(f"Your age is {age}.") + #print(f"Your age is {age}.") print("You are a Teen.") elif age>=18 and age<=64: - print(f"Your age is {age}.") + #print(f"Your age is {age}.") print("You are an Adult.") else: - print(f"Your age is {age}.") + #print(f"Your age is {age}.") print("You are a Senior.") diff --git a/week-3/assignment-3/warmup4.py b/week-3/assignment-3/warmup4.py index 0914cda..403b834 100644 --- a/week-3/assignment-3/warmup4.py +++ b/week-3/assignment-3/warmup4.py @@ -10,7 +10,7 @@ else: print(f"{number} is zero.") - print(f"{number} is even." + # if/elif/else statement 2 for parity including zero @@ -20,4 +20,5 @@ elif number !=0 and number%2 !=0: print(f"{number} is odd.") - ) +elif number == 0: + print(f"{number} is even.") From be29fbc4687a014e1c008e9745bbcc9e6f5bc93f Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 21 Jul 2026 14:09:19 -0400 Subject: [PATCH 16/30] adding updates suggested by the AI Review 9 --- week-3/assignment-3/warmup2.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/week-3/assignment-3/warmup2.py b/week-3/assignment-3/warmup2.py index cb69451..2b98608 100644 --- a/week-3/assignment-3/warmup2.py +++ b/week-3/assignment-3/warmup2.py @@ -2,13 +2,13 @@ if age>=0 and age<=12: #print(f"Your age is {age}.") - print("You are a Child.") + print("Child.") elif age>=13 and age<=17: #print(f"Your age is {age}.") - print("You are a Teen.") + print("Teen.") elif age>=18 and age<=64: #print(f"Your age is {age}.") - print("You are an Adult.") + print("Adult.") else: #print(f"Your age is {age}.") - print("You are a Senior.") + print("Senior.") From c85ac91ab95cd0338c1ed60ceb0f17b32f68b030 Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 21 Jul 2026 14:10:53 -0400 Subject: [PATCH 17/30] adding updates suggested by the AI Review 10 --- week-3/assignment-3/warmup2.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/week-3/assignment-3/warmup2.py b/week-3/assignment-3/warmup2.py index 2b98608..cb69451 100644 --- a/week-3/assignment-3/warmup2.py +++ b/week-3/assignment-3/warmup2.py @@ -2,13 +2,13 @@ if age>=0 and age<=12: #print(f"Your age is {age}.") - print("Child.") + print("You are a Child.") elif age>=13 and age<=17: #print(f"Your age is {age}.") - print("Teen.") + print("You are a Teen.") elif age>=18 and age<=64: #print(f"Your age is {age}.") - print("Adult.") + print("You are an Adult.") else: #print(f"Your age is {age}.") - print("Senior.") + print("You are a Senior.") From 9a830764f9eb43c365dcdf852022f3260fa44ad8 Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 21 Jul 2026 14:14:31 -0400 Subject: [PATCH 18/30] adding updates suggested by the AI Review 11 --- week-3/assignment-3/warmup2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/week-3/assignment-3/warmup2.py b/week-3/assignment-3/warmup2.py index cb69451..a8bd54c 100644 --- a/week-3/assignment-3/warmup2.py +++ b/week-3/assignment-3/warmup2.py @@ -9,6 +9,6 @@ elif age>=18 and age<=64: #print(f"Your age is {age}.") print("You are an Adult.") -else: +elif age>=65 and age<=125: #print(f"Your age is {age}.") print("You are a Senior.") From e00257c484168ebb3fc787c94cfa0711aeddea0b Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 21 Jul 2026 20:22:14 -0400 Subject: [PATCH 19/30] adding updates suggested by the AI Review 12 --- week-3/assignment-3/mini_project.py | 16 +++++++++------- week-3/assignment-3/warmup2.py | 6 ++++-- week-3/assignment-3/warmup3.py | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/week-3/assignment-3/mini_project.py b/week-3/assignment-3/mini_project.py index 0bfa340..294f331 100644 --- a/week-3/assignment-3/mini_project.py +++ b/week-3/assignment-3/mini_project.py @@ -1,7 +1,9 @@ day = input("What day is it? ").lower() +timeOfDay = input("What time of day? ").lower() + if day=="sunday": - timeOfDay = input("What time of day? ").lower() + #timeOfDay = input("What time of day? ").lower() if(timeOfDay == "morning"): print("Suggestion: Good Morning, it's a great time to go for a walk!") elif(timeOfDay == "afternoon"): @@ -12,7 +14,7 @@ print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day.") elif day=="monday": - timeOfDay = input("What time of day? ").lower() + #timeOfDay = input("What time of day? ").lower() if(timeOfDay =='morning'): print("Suggestion: Morning, it's a great time to make Pancakes for Breakfast!") elif(timeOfDay == "afternoon"): @@ -23,7 +25,7 @@ print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day.") elif day=="tuesday": - timeOfDay = input("What time of day? ").lower() + #timeOfDay = input("What time of day? ").lower() if(timeOfDay =='morning'): print("Suggestion: Morning, it's a great time to go to a Cafe for Breakfast!") @@ -35,7 +37,7 @@ print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day.") elif day=="wednesday": - timeOfDay = input("What time of day? ").lower() + #timeOfDay = input("What time of day? ").lower() if(timeOfDay =='morning'): print("Suggestion: Morning, it's a great time to go for a run!") @@ -47,7 +49,7 @@ print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day.") elif day=="thursday": - timeOfDay = input("What time of day? ").lower() + #timeOfDay = input("What time of day? ").lower() if(timeOfDay =='morning'): print("Suggestion: Morning, it's a great time to have coffee!") @@ -59,7 +61,7 @@ print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day.") elif day=="friday": - timeOfDay = input("What time of day? ").lower() + #timeOfDay = input("What time of day? ").lower() if(timeOfDay =='morning'): print("Suggestion: Morning, it's a great time to exercise!") @@ -71,7 +73,7 @@ print(f"Sorry, I don't recognize that time of day. Try: morning, afternoon or evening for the time of day.") elif day=="saturday": - timeOfDay = input("What time of day? ").lower() + #timeOfDay = input("What time of day? ").lower() if(timeOfDay =='morning'): print("Suggestion: Morning, it's a great time watch the news!") diff --git a/week-3/assignment-3/warmup2.py b/week-3/assignment-3/warmup2.py index a8bd54c..6d3cd8c 100644 --- a/week-3/assignment-3/warmup2.py +++ b/week-3/assignment-3/warmup2.py @@ -1,5 +1,6 @@ -age = int(input("Enter your age:")) +#age = int(input("Enter your age:")) +age = 54 if age>=0 and age<=12: #print(f"Your age is {age}.") print("You are a Child.") @@ -9,6 +10,7 @@ elif age>=18 and age<=64: #print(f"Your age is {age}.") print("You are an Adult.") -elif age>=65 and age<=125: +elif age>=65: #print(f"Your age is {age}.") print("You are a Senior.") + diff --git a/week-3/assignment-3/warmup3.py b/week-3/assignment-3/warmup3.py index 8a752d9..03f2c8c 100644 --- a/week-3/assignment-3/warmup3.py +++ b/week-3/assignment-3/warmup3.py @@ -1,5 +1,5 @@ print(not True and False) #not True is False; False and False is False -print(True or False and False) # True or False is True; And False is False +print(True or False and False) # False is False is False; True or False is True; print(not (5 > 3)) # 5 is greater than 3 which is True; Not True is False print(10 == 10 and 4 != 4) # 10==10 is True; and 4!=4 is False; True and False is False print(not False or not True) # Not False is True; not True is False; True or False is True \ No newline at end of file From be501cd6ea43524b763d31889a84350e3d86edb4 Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 21 Jul 2026 20:25:49 -0400 Subject: [PATCH 20/30] adding updates suggested by the AI Review 13 asking for the user age. --- week-3/assignment-3/warmup1.py | 4 +++- week-3/assignment-3/warmup2.py | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/week-3/assignment-3/warmup1.py b/week-3/assignment-3/warmup1.py index c8b44dc..f465e55 100644 --- a/week-3/assignment-3/warmup1.py +++ b/week-3/assignment-3/warmup1.py @@ -1,4 +1,6 @@ -score = int(input("Pick any number between 0 and 100: ")) +#score = int(input("Pick any number between 0 and 100: ")) + +score = 54 if score >= 90 and score <=100: print(f"Score: {score}") diff --git a/week-3/assignment-3/warmup2.py b/week-3/assignment-3/warmup2.py index 6d3cd8c..e4d1780 100644 --- a/week-3/assignment-3/warmup2.py +++ b/week-3/assignment-3/warmup2.py @@ -1,6 +1,5 @@ -#age = int(input("Enter your age:")) +age = int(input("Enter your age:")) -age = 54 if age>=0 and age<=12: #print(f"Your age is {age}.") print("You are a Child.") From 2d0f1fe7944a5eac23c45f8d7b327547cdb1ff97 Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 21 Jul 2026 20:35:30 -0400 Subject: [PATCH 21/30] adding updates suggested by the AI Review 14 --- week-3/assignment-3/warmup4.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/week-3/assignment-3/warmup4.py b/week-3/assignment-3/warmup4.py index 403b834..149600d 100644 --- a/week-3/assignment-3/warmup4.py +++ b/week-3/assignment-3/warmup4.py @@ -14,11 +14,11 @@ # if/elif/else statement 2 for parity including zero -if number !=0 and number%2 == 0: +if number % 2 == 0: print(f"{number} is even.") -elif number !=0 and number%2 !=0: +elif number %2 !=0: print(f"{number} is odd.") -elif number == 0: +else: print(f"{number} is even.") From 5b89a26457ee91f1d8a10279e93cb25195247335 Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Mon, 27 Jul 2026 09:20:16 -0400 Subject: [PATCH 22/30] adding an else statement to warmup2.py --- week-3/assignment-3/warmup2.py | 2 ++ week-3/assignment-3/warmup4.py | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/week-3/assignment-3/warmup2.py b/week-3/assignment-3/warmup2.py index e4d1780..45f50a6 100644 --- a/week-3/assignment-3/warmup2.py +++ b/week-3/assignment-3/warmup2.py @@ -12,4 +12,6 @@ elif age>=65: #print(f"Your age is {age}.") print("You are a Senior.") +else: + print("Invalid number, please enter a valid number.") diff --git a/week-3/assignment-3/warmup4.py b/week-3/assignment-3/warmup4.py index 149600d..a10ac76 100644 --- a/week-3/assignment-3/warmup4.py +++ b/week-3/assignment-3/warmup4.py @@ -17,8 +17,5 @@ if number % 2 == 0: print(f"{number} is even.") -elif number %2 !=0: - print(f"{number} is odd.") - else: - print(f"{number} is even.") + print(f"{number} is odd.") From f4eba327673e81d26a321578ca1acca480c3aa2b Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 28 Jul 2026 10:02:23 -0400 Subject: [PATCH 23/30] adding week-4 assignment files --- week-4/mini_project.py | 43 ++++++++++++++++++++++++++++++++++++++++++ week-4/warmup1.py | 6 ++++++ week-4/warmup2.py | 14 ++++++++++++++ week-4/warmup3.py | 14 ++++++++++++++ 4 files changed, 77 insertions(+) create mode 100644 week-4/mini_project.py create mode 100644 week-4/warmup1.py create mode 100644 week-4/warmup2.py create mode 100644 week-4/warmup3.py diff --git a/week-4/mini_project.py b/week-4/mini_project.py new file mode 100644 index 0000000..607d508 --- /dev/null +++ b/week-4/mini_project.py @@ -0,0 +1,43 @@ +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"}, +] +#Find the top scorer +top_scorer_name = "" +top_score = 0 + +for student in students: + if student["score"] > top_score: + top_score = student["score"] + top_scorer_name = student["name"] + +print(f"Top scorer: {top_scorer_name} ({top_score})") + +#Calculate the class average +total = 0 +for student in students: + total+= student["score"] +average = total / len(students) +print(f"Class average: {average}") # Output: Class average: 85.5 + +#List all unique subjects + +subjects = set() +for student in students: + subjects.add(student["subject"]) + +print(f"Subjects offered: {subjects}") + +#List High Scorers with score over 75 +high_scorers = [] +for student in students: + if student["score"] >=75: + high_scorers.append(student["name"]) + +print(f"High scorers: {high_scorers}") \ No newline at end of file diff --git a/week-4/warmup1.py b/week-4/warmup1.py new file mode 100644 index 0000000..3a55638 --- /dev/null +++ b/week-4/warmup1.py @@ -0,0 +1,6 @@ +#Warmup 1 List Operations +numbers = [27, 40, 45, 50, 51, 52, 70, 99] +print(f"First: {numbers[0]}") +print(f"Last: {numbers[-1]}") +print(f"Middle: {numbers[1:7]} ") +print(f"Reversed: {numbers[::-1]} ") \ No newline at end of file diff --git a/week-4/warmup2.py b/week-4/warmup2.py new file mode 100644 index 0000000..72b6999 --- /dev/null +++ b/week-4/warmup2.py @@ -0,0 +1,14 @@ +#Warmup 2 Dictonary Operations + +students = { + "name": "Khalilah", + "grade": "A", + "subjects": {"English, Math, Computer Science"} +} +for student in students.values(): + print(student) + +students["graduated"] ="False" + +for student in students.values(): + print(student) \ No newline at end of file diff --git a/week-4/warmup3.py b/week-4/warmup3.py new file mode 100644 index 0000000..ef60ae5 --- /dev/null +++ b/week-4/warmup3.py @@ -0,0 +1,14 @@ +#Warmup 3 Set Operations +language_list1 = ["BASIC", "Pascal", "Assembly", "Fortran", "C", "C++", "Perl", "Java", "XML", "HTML", "CSS", "JavaScript", "Visual Basic", "VB.NET", "C#"] +language_list2 = ["HTML", "XML", "CSS", "JavaScript", "TypeScript", "JSON", "PHP", "SQL", "Python"] + +#Convert list to set + +language_list1_set1 = set(language_list1) +language_list1_set2 = set(language_list2) + +#print language sets + +print(language_list1_set1 | language_list1_set2) # Union: All languages from both lists, no duplicates +print(language_list1_set1 & language_list1_set2) # Intersection: Languages in both lists +print(language_list1_set1 - language_list1_set2) # Difference: Languges only in the first list \ No newline at end of file From a2c2ca61e08944bac9ea2a2e12531b433c248052 Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 28 Jul 2026 10:11:36 -0400 Subject: [PATCH 24/30] fixing warmup1 to only asks for the four middle items --- week-4/warmup1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/week-4/warmup1.py b/week-4/warmup1.py index 3a55638..154c4ba 100644 --- a/week-4/warmup1.py +++ b/week-4/warmup1.py @@ -2,5 +2,5 @@ numbers = [27, 40, 45, 50, 51, 52, 70, 99] print(f"First: {numbers[0]}") print(f"Last: {numbers[-1]}") -print(f"Middle: {numbers[1:7]} ") +print(f"Middle: {numbers[2:6]} ") print(f"Reversed: {numbers[::-1]} ") \ No newline at end of file From 33ed4f3fc4f459d71903f5900ab7274d987010b1 Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 28 Jul 2026 10:39:57 -0400 Subject: [PATCH 25/30] changing warumup2 from sets to list and updating output to include key value pair --- week-4/mini_project.py | 2 +- week-4/warmup2.py | 12 ++++++------ week-4/warmup3.py | 3 +-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/week-4/mini_project.py b/week-4/mini_project.py index 607d508..7619b59 100644 --- a/week-4/mini_project.py +++ b/week-4/mini_project.py @@ -37,7 +37,7 @@ #List High Scorers with score over 75 high_scorers = [] for student in students: - if student["score"] >=75: + if student["score"] >75: high_scorers.append(student["name"]) print(f"High scorers: {high_scorers}") \ No newline at end of file diff --git a/week-4/warmup2.py b/week-4/warmup2.py index 72b6999..67b03fa 100644 --- a/week-4/warmup2.py +++ b/week-4/warmup2.py @@ -3,12 +3,12 @@ students = { "name": "Khalilah", "grade": "A", - "subjects": {"English, Math, Computer Science"} + "subjects": ["English, Math, Computer Science"] } -for student in students.values(): - print(student) +for key, value in students.items(): + print(f"{key}: {value}") -students["graduated"] ="False" +students["graduated"] = False -for student in students.values(): - print(student) \ No newline at end of file +for key, value in students.items(): + print(f"{key}: {value}") diff --git a/week-4/warmup3.py b/week-4/warmup3.py index ef60ae5..9596d05 100644 --- a/week-4/warmup3.py +++ b/week-4/warmup3.py @@ -8,7 +8,6 @@ language_list1_set2 = set(language_list2) #print language sets - print(language_list1_set1 | language_list1_set2) # Union: All languages from both lists, no duplicates print(language_list1_set1 & language_list1_set2) # Intersection: Languages in both lists -print(language_list1_set1 - language_list1_set2) # Difference: Languges only in the first list \ No newline at end of file +print(language_list1_set1 - language_list1_set2) # Difference: Languages only in the first list \ No newline at end of file From 736aef259022b75661b6abc5eff68eb754c64b8b Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 28 Jul 2026 10:49:29 -0400 Subject: [PATCH 26/30] formatting average in the mini_project by 1 decimal point, removing trailing spaces in warmup1, and updating warmup2 to a list of strings --- week-4/mini_project.py | 2 +- week-4/warmup2.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/week-4/mini_project.py b/week-4/mini_project.py index 7619b59..6538bcf 100644 --- a/week-4/mini_project.py +++ b/week-4/mini_project.py @@ -24,7 +24,7 @@ for student in students: total+= student["score"] average = total / len(students) -print(f"Class average: {average}") # Output: Class average: 85.5 +print(f"Class average: {average:.1f}") # Output: Class average: 85.5 #List all unique subjects diff --git a/week-4/warmup2.py b/week-4/warmup2.py index 67b03fa..9142122 100644 --- a/week-4/warmup2.py +++ b/week-4/warmup2.py @@ -3,7 +3,7 @@ students = { "name": "Khalilah", "grade": "A", - "subjects": ["English, Math, Computer Science"] + "subjects": ["English", "Math", "Computer Science"] } for key, value in students.items(): print(f"{key}: {value}") From 33d2e000b6f6276b1c9f2a2a51c3b1eccc0004df Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 4 Aug 2026 22:41:16 -0400 Subject: [PATCH 27/30] adding all files for week 5 lesson --- week-5/data/selection_sort.py | 11 ++++++ week-5/mini_project.py | 66 +++++++++++++++++++++++++++++++++++ week-5/warmup1.py | 6 ++++ week-5/warmup2.py | 18 ++++++++++ week-5/warmup3.py | 37 ++++++++++++++++++++ week-5/warmup4.py | 14 ++++++++ 6 files changed, 152 insertions(+) create mode 100644 week-5/data/selection_sort.py create mode 100644 week-5/mini_project.py create mode 100644 week-5/warmup1.py create mode 100644 week-5/warmup2.py create mode 100644 week-5/warmup3.py create mode 100644 week-5/warmup4.py diff --git a/week-5/data/selection_sort.py b/week-5/data/selection_sort.py new file mode 100644 index 0000000..3644aa4 --- /dev/null +++ b/week-5/data/selection_sort.py @@ -0,0 +1,11 @@ +def selection_sort(data): + for i in range(len(data)): + min_index = i + for j in range(i + 1, len(data)): + if data[j] < data[min_index]: + min_index = j + data[i], data[min_index] = data[min_index], data[i] + return data + +sorted_list = selection_sort(numbers) +print(f"Minimum number is {sorted_list[0]}") \ No newline at end of file diff --git a/week-5/mini_project.py b/week-5/mini_project.py new file mode 100644 index 0000000..facd1b5 --- /dev/null +++ b/week-5/mini_project.py @@ -0,0 +1,66 @@ +numbers = [42, 17, 83, 5, 61, 29, 74, 8, 55, 93, 31, 66, 14, 47, 78, 3, 59, 22, 86, 40] + +while True: + #Print Number Cruncher Menu + print("") + print("=== Number Cruncher ===") + print("1. Find minimum") + print("2. Find maximum") + print("3. Search for a number") + print("4. Sort the list") + print("5. Quit") + print("") + + option = int(input("Choose an option (1-5):")) + + #Find Minimum + if option == 1: + min_number = numbers[0] + for number in numbers: + if number < min_number: + min_number = number + + print(f"The minimum number is {min_number}.") + + #Find Maximum + elif option == 2: + + max_number = 0 + for number in numbers: + if number > max_number: + max_number = number + + print(f"The maximum number is {max_number}.") + + #Search for a number + elif option == 3: + + target = int(input("Enter a number: ")) + + def linear_search(data, target): + for i in range(len(data)): + if data[i] == target: + return i + return -1 + + result = linear_search(numbers, target) + if result != -1: + print(f"Found at index {result}") + elif result == -1: + print(f"{target} not found") + + #Sort the List + elif option == 4: + + n = len(numbers) + + for index in range(n-1): + for j in range(n-index-1): + if numbers[j] > numbers[j+1]: + numbers[j], numbers[j+1] = numbers[j+1], numbers[j] + print(numbers) + + #Quit Loop + elif option == 5: + print("Quitting Number Cruncher") + break \ No newline at end of file diff --git a/week-5/warmup1.py b/week-5/warmup1.py new file mode 100644 index 0000000..0afc13e --- /dev/null +++ b/week-5/warmup1.py @@ -0,0 +1,6 @@ +#Calculating the sum of all integers from 1 t0 100 +sum_of_integers = 0 +for num in range(1,101): + sum_of_integers += num + +print (f" The sum of 1 to 100 is {sum_of_integers}.") \ No newline at end of file diff --git a/week-5/warmup2.py b/week-5/warmup2.py new file mode 100644 index 0000000..8f6d377 --- /dev/null +++ b/week-5/warmup2.py @@ -0,0 +1,18 @@ +while True: + user_input = input("Enter a positive integer: ") + + if user_input.isdigit(): + if int(user_input) > 0: + print(f"Got it: {user_input}") + break + + elif int(user_input) <=0: + print("That's not a positive integer. Try again.") + + else: + print("That's not a positive integer. Try again.") + + + + + diff --git a/week-5/warmup3.py b/week-5/warmup3.py new file mode 100644 index 0000000..7973e1b --- /dev/null +++ b/week-5/warmup3.py @@ -0,0 +1,37 @@ +#Linear Search: Find a name in a list +names = [ + "Liam", + "Noah", + "Oliver", + "Theodore", + "Henry", + "JaKmes", + "Elijah", + "Mateo", + "William", + "Lucas", + "Olivia", + "Charlotte", + "Emma", + "Amelia", + "Sophia", + "Mia", + "Isabella", + "Evelyn", + "Sofia", + "Elian" +] +#User input the name to be searched +username = input("Enter a name to search for: ").capitalize() +found = False + +for i, name in enumerate(names): + if name == username: + found = True + break + +if found: + print(f"Found {username} at index {i}.") + +else: + print (f"{username} was not found in the list.") \ No newline at end of file diff --git a/week-5/warmup4.py b/week-5/warmup4.py new file mode 100644 index 0000000..fa087a0 --- /dev/null +++ b/week-5/warmup4.py @@ -0,0 +1,14 @@ +#Loop from 1 to 30 +for num in range(1,31): + + if num % 3 == 0 and num % 5 == 0: + print("FizzBuzz") + + elif num % 3 == 0: + print("Fizz") + + elif num % 5 == 0: + print("Buzz") + + else: + print(num) \ No newline at end of file From 6680be158cbeed96191f51d64a56b0129009ec75 Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 4 Aug 2026 22:56:16 -0400 Subject: [PATCH 28/30] updated warmup3.py to remove the capitlize function and simplifed the function in warmup2 --- week-5/mini_project.py | 2 +- week-5/warmup2.py | 8 +++----- week-5/warmup3.py | 6 +++--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/week-5/mini_project.py b/week-5/mini_project.py index facd1b5..55224a6 100644 --- a/week-5/mini_project.py +++ b/week-5/mini_project.py @@ -25,7 +25,7 @@ #Find Maximum elif option == 2: - max_number = 0 + max_number = numbers[0] for number in numbers: if number > max_number: max_number = number diff --git a/week-5/warmup2.py b/week-5/warmup2.py index 8f6d377..97a1566 100644 --- a/week-5/warmup2.py +++ b/week-5/warmup2.py @@ -1,13 +1,11 @@ while True: user_input = input("Enter a positive integer: ") - if user_input.isdigit(): - if int(user_input) > 0: + if user_input.isdigit() and int(user_input) > 0: print(f"Got it: {user_input}") break - - elif int(user_input) <=0: - print("That's not a positive integer. Try again.") + #elif int(user_input) <=0: + #print("That's not a positive integer. Try again.") else: print("That's not a positive integer. Try again.") diff --git a/week-5/warmup3.py b/week-5/warmup3.py index 7973e1b..7ee27b1 100644 --- a/week-5/warmup3.py +++ b/week-5/warmup3.py @@ -22,7 +22,7 @@ "Elian" ] #User input the name to be searched -username = input("Enter a name to search for: ").capitalize() +username = input("Enter a name to search for: ") found = False for i, name in enumerate(names): @@ -31,7 +31,7 @@ break if found: - print(f"Found {username} at index {i}.") + print(f'Found "{username}" at index {i}.') else: - print (f"{username} was not found in the list.") \ No newline at end of file + print (f'"{username}" was not found in the list.') \ No newline at end of file From f2bd9da80e4e7cf2bfcbe492ba43bbc43f50b6ac Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 4 Aug 2026 23:12:23 -0400 Subject: [PATCH 29/30] fixing the bubble sort to include a full pass until it produces zero --- week-5/mini_project.py | 19 +++++++++++++------ week-5/warmup1.py | 4 ++-- week-5/warmup2.py | 5 ++--- week-5/warmup3.py | 2 +- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/week-5/mini_project.py b/week-5/mini_project.py index 55224a6..91572a4 100644 --- a/week-5/mini_project.py +++ b/week-5/mini_project.py @@ -52,13 +52,20 @@ def linear_search(data, target): #Sort the List elif option == 4: - n = len(numbers) + swapped = True - for index in range(n-1): - for j in range(n-index-1): - if numbers[j] > numbers[j+1]: - numbers[j], numbers[j+1] = numbers[j+1], numbers[j] - print(numbers) + while swapped: + swapped = False + + n = len(numbers) + + for index in range(n-1): + if numbers[index] > numbers[index + 1]: + numbers[index], numbers[index + 1 ] = numbers[index+ 1], numbers[index] + + swapped = True + + print(f"Sorted list: {numbers}") #Quit Loop elif option == 5: diff --git a/week-5/warmup1.py b/week-5/warmup1.py index 0afc13e..9d5d347 100644 --- a/week-5/warmup1.py +++ b/week-5/warmup1.py @@ -1,6 +1,6 @@ -#Calculating the sum of all integers from 1 t0 100 +#Calculating the sum of all integers from 1 to 100 sum_of_integers = 0 for num in range(1,101): sum_of_integers += num -print (f" The sum of 1 to 100 is {sum_of_integers}.") \ No newline at end of file +print (f"The sum of 1 to 100 is {sum_of_integers}.") \ No newline at end of file diff --git a/week-5/warmup2.py b/week-5/warmup2.py index 97a1566..bb19d2c 100644 --- a/week-5/warmup2.py +++ b/week-5/warmup2.py @@ -4,11 +4,10 @@ if user_input.isdigit() and int(user_input) > 0: print(f"Got it: {user_input}") break - #elif int(user_input) <=0: - #print("That's not a positive integer. Try again.") else: - print("That's not a positive integer. Try again.") + print("That's not a positive integer. Try again. \n") + diff --git a/week-5/warmup3.py b/week-5/warmup3.py index 7ee27b1..9e2e3ac 100644 --- a/week-5/warmup3.py +++ b/week-5/warmup3.py @@ -18,7 +18,7 @@ "Mia", "Isabella", "Evelyn", - "Sofia", + "Ava", "Elian" ] #User input the name to be searched From c1ab56d27cc10d518552a03dcf18fa4120b17f01 Mon Sep 17 00:00:00 2001 From: kfbmartin Date: Tue, 4 Aug 2026 23:23:08 -0400 Subject: [PATCH 30/30] fixed sorted lists was stuck in a infinite loop --- week-5/mini_project.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/week-5/mini_project.py b/week-5/mini_project.py index 91572a4..5552c36 100644 --- a/week-5/mini_project.py +++ b/week-5/mini_project.py @@ -61,13 +61,14 @@ def linear_search(data, target): for index in range(n-1): if numbers[index] > numbers[index + 1]: - numbers[index], numbers[index + 1 ] = numbers[index+ 1], numbers[index] + numbers[index], numbers[index + 1 ] = (numbers[index+ 1], numbers[index]) - swapped = True + swapped = True - print(f"Sorted list: {numbers}") + print(f"Sorted list: {numbers}") #Quit Loop + elif option == 5: print("Quitting Number Cruncher") break \ No newline at end of file