diff --git a/week-2/assignment-2/warmup3.py b/week-2/assignment-2/warmup3.py index 7e3b977..6e452de 100644 --- a/week-2/assignment-2/warmup3.py +++ b/week-2/assignment-2/warmup3.py @@ -1,3 +1,4 @@ # git log --oneline output: #c981e33 (HEAD -> assignment-2, origin/assignment-2) warmups files -print("I learn that there is a lot to learn about git and github. I was familiar with both, but I have gaps that need to be addressed. I also learn what the git log command was and the oneline flag does, which show you first lines changes to your git repo") \ No newline at end of file +#c981e33 (HEAD -> assignment-2, origin/assignment-2) warmups files +print("I learn that there is a lot to learn about git and github. I was familiar with both, but I have gaps that need to be addressed. I also learn what the git log command was and the oneline flag does, which show you first lines changes to your git repo") 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 new file mode 100644 index 0000000..294f331 --- /dev/null +++ b/week-3/assignment-3/mini_project.py @@ -0,0 +1,88 @@ +day = input("What day is it? ").lower() +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"): + 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.") + +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"): + 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.") + +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"): + 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.") + +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"): + 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.") + +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.") + 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.") + +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.") + 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.") + +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!") + 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.") +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 new file mode 100644 index 0000000..f465e55 --- /dev/null +++ b/week-3/assignment-3/warmup1.py @@ -0,0 +1,19 @@ +#score = int(input("Pick any number between 0 and 100: ")) + +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") +elif score >= 0 and score <=59: + 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..e4d1780 --- /dev/null +++ b/week-3/assignment-3/warmup2.py @@ -0,0 +1,15 @@ +age = int(input("Enter your age:")) + +if age>=0 and age<=12: + #print(f"Your age is {age}.") + print("You are a Child.") +elif age>=13 and age<=17: + #print(f"Your age is {age}.") + print("You are a Teen.") +elif age>=18 and age<=64: + #print(f"Your age is {age}.") + print("You are an Adult.") +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 new file mode 100644 index 0000000..03f2c8c --- /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) # 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 diff --git a/week-3/assignment-3/warmup4.py b/week-3/assignment-3/warmup4.py new file mode 100644 index 0000000..149600d --- /dev/null +++ b/week-3/assignment-3/warmup4.py @@ -0,0 +1,24 @@ +number = int(input("Enter a number: ")) + +# if/elif/else statement 1 for sign + +if number>0: + print(f"{number} is positive.") + +elif number< 0: + print(f"{number} is negative.") + +else: + print(f"{number} is zero.") + + +# if/elif/else statement 2 for parity including zero + +if number % 2 == 0: + print(f"{number} is even.") + +elif number %2 !=0: + print(f"{number} is odd.") + +else: + print(f"{number} is even.")