From badcb09f67fd4da201162e5e32c2fb368a418c6e Mon Sep 17 00:00:00 2001 From: Cristina Lopes Ayres Date: Sun, 26 Jul 2026 21:28:50 -0400 Subject: [PATCH 1/7] Add restaurant decision script --- week-3/assignment-3/restaurant.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 week-3/assignment-3/restaurant.py diff --git a/week-3/assignment-3/restaurant.py b/week-3/assignment-3/restaurant.py new file mode 100644 index 0000000..173cdcd --- /dev/null +++ b/week-3/assignment-3/restaurant.py @@ -0,0 +1,11 @@ +food = input("What type of food do you want? ").lower() +budget = input("Do you want a cheap meal? (yes/no): ").lower() + +if food == "pizza" and budget == "yes": + print("You should try a budget-friendly pizza place.") +elif food == "pizza": + print("You should try a nicer pizza restaurant.") +elif food == "burger": + print("You should try a burger restaurant.") +else: + print("You should try a local restaurant.") \ No newline at end of file From 490c909cfbe4fc7be09cbb96ce73cecf40334f93 Mon Sep 17 00:00:00 2001 From: Cristina Lopes Ayres Date: Mon, 27 Jul 2026 09:24:09 -0400 Subject: [PATCH 2/7] Add assignment 3 control flow exercises --- week-3/assignment-3/Mini_project.py | 37 +++++++++++++++++++++++++++++ week-3/assignment-3/warmup1.py | 19 +++++++++++++++ week-3/assignment-3/warmup2.py | 14 +++++++++++ week-3/assignment-3/warmup3.py | 16 +++++++++++++ week-3/assignment-3/warmup4.py | 17 +++++++++++++ 5 files changed, 103 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..bb0033d --- /dev/null +++ b/week-3/assignment-3/Mini_project.py @@ -0,0 +1,37 @@ +# Mini Project - Day Planner + +day = input("What day is it? ").lower() +time_of_day = input("What time of day? ").lower() + +if day == "monday": + if time_of_day == "morning": + print("Suggestion: Go for an early morning walk!") + elif time_of_day == "afternoon": + print("Suggestion: Make yourself a yummy snack!") + elif time_of_day == "evening": + print("Suggestion: Make yourself a healthy dinner!") + else: + print("Sorry, I don't recognize that time of day.") + +elif day == "saturday": + if time_of_day == "morning": + print("Suggestion: Make a nice cup of coffee to start your day!") + elif time_of_day == "afternoon": + print("Suggestion: Spend your afternoon outdoors!") + elif time_of_day == "evening": + print("Suggestion: Have dinner or watch a movie!") + else: + print("Sorry, I don't recognize that time of day.") + +elif day == "sunday": + if time_of_day == "morning": + print("Suggestion: Visit a local farmers market!") + elif time_of_day == "afternoon": + print("Suggestion: Visit family or friends!") + elif time_of_day == "evening": + print("Suggestion: Movie night!") + else: + print("Sorry, I don't recognize that time of day.") + +else: + print("Sorry, I don't recognize that day. Try Monday, Saturday, or Sunday.") \ 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..69833f8 --- /dev/null +++ b/week-3/assignment-3/warmup1.py @@ -0,0 +1,19 @@ +# Warmup 1 - Letter Grades + +score = 84 + +if score >= 90: + grade = "A" +elif score >= 80: + grade = "B" +elif score >= 70: + grade = "C" +elif score >= 60: + grade = "D" +else: + grade = "F" + +print(f"Score: {score}") +print(f"Grade: {grade}") + + diff --git a/week-3/assignment-3/warmup2.py b/week-3/assignment-3/warmup2.py new file mode 100644 index 0000000..8e29efb --- /dev/null +++ b/week-3/assignment-3/warmup2.py @@ -0,0 +1,14 @@ +# Warmup 2 - Age Categories + +age = int(input("Enter 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.") +else: + print("Invalid age.") \ No newline at end of file diff --git a/week-3/assignment-3/warmup3.py b/week-3/assignment-3/warmup3.py new file mode 100644 index 0000000..9461cd7 --- /dev/null +++ b/week-3/assignment-3/warmup3.py @@ -0,0 +1,16 @@ +# Warmup 3 - Boolean Expression Practice + +print(not True and False) +# not True is False; False and False is False + +print(True or False and False) +# False and False is False; True or False is True + +print(not (5 > 3)) +# 5 > 3 is True; not True is False + +print(10 == 10 and 4 != 4) +# 10 == 10 is True; 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 diff --git a/week-3/assignment-3/warmup4.py b/week-3/assignment-3/warmup4.py new file mode 100644 index 0000000..c330778 --- /dev/null +++ b/week-3/assignment-3/warmup4.py @@ -0,0 +1,17 @@ +# Warmup 4 - Sign and Parity + +number = int(input("Enter a number: ")) + +# Check sign +if number > 0: + print(f"{number} is positive.") +elif number < 0: + print(f"{number} is negative.") +else: + print(f"{number} is zero.") + +# Check parity +if number % 2 == 0: + print(f"{number} is even.") +else: + print(f"{number} is odd.") \ No newline at end of file From ece5b0c80e81e663a91123491f816eebde71f7da Mon Sep 17 00:00:00 2001 From: Cristina Lopes Ayres Date: Mon, 27 Jul 2026 10:02:52 -0400 Subject: [PATCH 3/7] Fix assignment 3 feedback --- week-3/assignment-3/Mini_project.py | 26 +++++++++++++------------- week-3/assignment-3/warmup2.py | 2 +- week-3/assignment-3/warmup4.py | 2 -- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/week-3/assignment-3/Mini_project.py b/week-3/assignment-3/Mini_project.py index bb0033d..4a56173 100644 --- a/week-3/assignment-3/Mini_project.py +++ b/week-3/assignment-3/Mini_project.py @@ -1,37 +1,37 @@ # Mini Project - Day Planner -day = input("What day is it? ").lower() -time_of_day = input("What time of day? ").lower() +day = input("What day is it? ").strip().lower() +time_of_day = input("What time of day? ").strip().lower() if day == "monday": if time_of_day == "morning": print("Suggestion: Go for an early morning walk!") elif time_of_day == "afternoon": - print("Suggestion: Make yourself a yummy snack!") + print("Suggestion: Work on your Python practice!") elif time_of_day == "evening": - print("Suggestion: Make yourself a healthy dinner!") + print("Suggestion: Make a healthy dinner!") else: print("Sorry, I don't recognize that time of day.") -elif day == "saturday": +elif day == "tuesday": if time_of_day == "morning": - print("Suggestion: Make a nice cup of coffee to start your day!") + print("Suggestion: Start your day with a good breakfast!") elif time_of_day == "afternoon": - print("Suggestion: Spend your afternoon outdoors!") + print("Suggestion: Take a break and enjoy some fresh air!") elif time_of_day == "evening": - print("Suggestion: Have dinner or watch a movie!") + print("Suggestion: Read a book or relax!") else: print("Sorry, I don't recognize that time of day.") -elif day == "sunday": +elif day == "wednesday": if time_of_day == "morning": - print("Suggestion: Visit a local farmers market!") + print("Suggestion: Plan your goals for the day!") elif time_of_day == "afternoon": - print("Suggestion: Visit family or friends!") + print("Suggestion: Finish an important task!") elif time_of_day == "evening": - print("Suggestion: Movie night!") + print("Suggestion: Enjoy a relaxing evening!") else: print("Sorry, I don't recognize that time of day.") else: - print("Sorry, I don't recognize that day. Try Monday, Saturday, or Sunday.") \ No newline at end of file + print("Sorry, I don't recognize that day. Try Monday, Tuesday, or Wednesday.") \ No newline at end of file diff --git a/week-3/assignment-3/warmup2.py b/week-3/assignment-3/warmup2.py index 8e29efb..62e2110 100644 --- a/week-3/assignment-3/warmup2.py +++ b/week-3/assignment-3/warmup2.py @@ -1,4 +1,4 @@ -# Warmup 2 - Age Categories +# Warmup2.py age age = int(input("Enter your age: ")) diff --git a/week-3/assignment-3/warmup4.py b/week-3/assignment-3/warmup4.py index c330778..3fab85b 100644 --- a/week-3/assignment-3/warmup4.py +++ b/week-3/assignment-3/warmup4.py @@ -1,5 +1,3 @@ -# Warmup 4 - Sign and Parity - number = int(input("Enter a number: ")) # Check sign From 57f5d98ecee76474e3ad950a7067e369607604bd Mon Sep 17 00:00:00 2001 From: Cristina Lopes Ayres Date: Mon, 27 Jul 2026 10:20:11 -0400 Subject: [PATCH 4/7] Rename mini project file and update assignment --- week-3/assignment-3/Mini_project.py | 37 ----------------------------- week-3/assignment-3/mini_project.py | 0 2 files changed, 37 deletions(-) delete mode 100644 week-3/assignment-3/Mini_project.py 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 deleted file mode 100644 index 4a56173..0000000 --- a/week-3/assignment-3/Mini_project.py +++ /dev/null @@ -1,37 +0,0 @@ -# Mini Project - Day Planner - -day = input("What day is it? ").strip().lower() -time_of_day = input("What time of day? ").strip().lower() - -if day == "monday": - if time_of_day == "morning": - print("Suggestion: Go for an early morning walk!") - elif time_of_day == "afternoon": - print("Suggestion: Work on your Python practice!") - elif time_of_day == "evening": - print("Suggestion: Make a healthy dinner!") - else: - print("Sorry, I don't recognize that time of day.") - -elif day == "tuesday": - if time_of_day == "morning": - print("Suggestion: Start your day with a good breakfast!") - elif time_of_day == "afternoon": - print("Suggestion: Take a break and enjoy some fresh air!") - elif time_of_day == "evening": - print("Suggestion: Read a book or relax!") - else: - print("Sorry, I don't recognize that time of day.") - -elif day == "wednesday": - if time_of_day == "morning": - print("Suggestion: Plan your goals for the day!") - elif time_of_day == "afternoon": - print("Suggestion: Finish an important task!") - elif time_of_day == "evening": - print("Suggestion: Enjoy a relaxing evening!") - else: - print("Sorry, I don't recognize that time of day.") - -else: - print("Sorry, I don't recognize that day. Try Monday, Tuesday, or Wednesday.") \ No newline at end of file diff --git a/week-3/assignment-3/mini_project.py b/week-3/assignment-3/mini_project.py new file mode 100644 index 0000000..e69de29 From 9ad34f52dd9e610364f5572d9505352fdb17480d Mon Sep 17 00:00:00 2001 From: Cristina Lopes Ayres Date: Mon, 27 Jul 2026 10:31:32 -0400 Subject: [PATCH 5/7] Complete mini project day planner --- week-3/assignment-3/mini_project.py | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/week-3/assignment-3/mini_project.py b/week-3/assignment-3/mini_project.py index e69de29..58238a3 100644 --- a/week-3/assignment-3/mini_project.py +++ b/week-3/assignment-3/mini_project.py @@ -0,0 +1,37 @@ +# Mini Project - Day Planner + +day = input("What day is it? ").strip().lower() +time_of_day = input("What time of day? ").strip().lower() + +if day == "monday": + if time_of_day == "morning": + print("Suggestion: Go for an early morning walk!") + elif time_of_day == "afternoon": + print("Suggestion: Practice Python coding!") + elif time_of_day == "evening": + print("Suggestion: Make a healthy dinner!") + else: + print("Sorry, I don't recognize that time of day.") + +elif day == "tuesday": + if time_of_day == "morning": + print("Suggestion: Start your day with a good breakfast!") + elif time_of_day == "afternoon": + print("Suggestion: Take a break and enjoy some fresh air!") + elif time_of_day == "evening": + print("Suggestion: Read a book and relax!") + else: + print("Sorry, I don't recognize that time of day.") + +elif day == "wednesday": + if time_of_day == "morning": + print("Suggestion: Plan your goals for the day!") + elif time_of_day == "afternoon": + print("Suggestion: Finish an important task!") + elif time_of_day == "evening": + print("Suggestion: Enjoy a relaxing evening!") + else: + print("Sorry, I don't recognize that time of day.") + +else: + print("Sorry, I don't recognize that day. Try Monday, Tuesday, or Wednesday.") \ No newline at end of file From c3f9a5fee5db5811509a0b90a689a673a12a4e67 Mon Sep 17 00:00:00 2001 From: Cristina Lopes Ayres Date: Mon, 27 Jul 2026 10:50:21 -0400 Subject: [PATCH 6/7] Complete mini project day planner --- week-3/assignment-3/mini_project.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/week-3/assignment-3/mini_project.py b/week-3/assignment-3/mini_project.py index 58238a3..b682248 100644 --- a/week-3/assignment-3/mini_project.py +++ b/week-3/assignment-3/mini_project.py @@ -34,4 +34,5 @@ print("Sorry, I don't recognize that time of day.") else: - print("Sorry, I don't recognize that day. Try Monday, Tuesday, or Wednesday.") \ No newline at end of file + print("Sorry, I don't recognize that day. Try Monday, Tuesday, or Wednesday.") + \ No newline at end of file From 3d5e479a6c5bfb9b5ee68b1fba3292c74b79956d Mon Sep 17 00:00:00 2001 From: Cristina Lopes Ayres Date: Mon, 27 Jul 2026 11:00:27 -0400 Subject: [PATCH 7/7] Improve mini project coverage and output formatting --- week-3/assignment-3/mini_project.py | 18 +++++++++--------- week-3/assignment-3/warmup4.py | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/week-3/assignment-3/mini_project.py b/week-3/assignment-3/mini_project.py index b682248..733802f 100644 --- a/week-3/assignment-3/mini_project.py +++ b/week-3/assignment-3/mini_project.py @@ -5,31 +5,31 @@ if day == "monday": if time_of_day == "morning": - print("Suggestion: Go for an early morning walk!") + print("Suggestion: Go for a morning walk.") elif time_of_day == "afternoon": - print("Suggestion: Practice Python coding!") + print("Suggestion: Practice Python coding.") elif time_of_day == "evening": - print("Suggestion: Make a healthy dinner!") + print("Suggestion: Cook a healthy dinner.") else: print("Sorry, I don't recognize that time of day.") elif day == "tuesday": if time_of_day == "morning": - print("Suggestion: Start your day with a good breakfast!") + print("Suggestion: Plan your goals for the day.") elif time_of_day == "afternoon": - print("Suggestion: Take a break and enjoy some fresh air!") + print("Suggestion: Take a short break outside.") elif time_of_day == "evening": - print("Suggestion: Read a book and relax!") + print("Suggestion: Read a book and relax.") else: print("Sorry, I don't recognize that time of day.") elif day == "wednesday": if time_of_day == "morning": - print("Suggestion: Plan your goals for the day!") + print("Suggestion: Start the day with exercise.") elif time_of_day == "afternoon": - print("Suggestion: Finish an important task!") + print("Suggestion: Finish an important project.") elif time_of_day == "evening": - print("Suggestion: Enjoy a relaxing evening!") + print("Suggestion: Watch a movie and unwind.") else: print("Sorry, I don't recognize that time of day.") diff --git a/week-3/assignment-3/warmup4.py b/week-3/assignment-3/warmup4.py index 3fab85b..457ca6c 100644 --- a/week-3/assignment-3/warmup4.py +++ b/week-3/assignment-3/warmup4.py @@ -1,6 +1,6 @@ number = int(input("Enter a number: ")) -# Check sign +# Sign check if number > 0: print(f"{number} is positive.") elif number < 0: @@ -8,7 +8,7 @@ else: print(f"{number} is zero.") -# Check parity +# Parity check if number % 2 == 0: print(f"{number} is even.") else: