From 9877d37a8231ce37412bf717c276790a9d7e923d Mon Sep 17 00:00:00 2001 From: "github-classroom[bot]" <66690702+github-classroom[bot]@users.noreply.github.com> Date: Thu, 19 Jun 2025 16:00:07 +0000 Subject: [PATCH 1/3] Setting up GitHub Classroom Feedback From 44b9d0c65d4f5eebcfb1029a76432d64d781ce6a Mon Sep 17 00:00:00 2001 From: "github-classroom[bot]" <66690702+github-classroom[bot]@users.noreply.github.com> Date: Thu, 19 Jun 2025 16:00:10 +0000 Subject: [PATCH 2/3] add deadline --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 484df16..04b14f8 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![Review Assignment Due Date](https://classroom.github.com/assets/deadline-readme-button-22041afd0340ce965d47ae6ef1cefeee28c7c493a6346c4f15d667ab976d596c.svg)](https://classroom.github.com/a/ElHT0Kw2) ## Assignments 1. Conditional Tests: Write a series of conditional tests. Print a statement From 047a18c79b80b726a9ec6cb33d022254bbc1bbca Mon Sep 17 00:00:00 2001 From: Hashneet24 Date: Fri, 20 Jun 2025 18:42:01 +0400 Subject: [PATCH 3/3] Add files via upload --- assignment5/task1.py | 69 +++++++++++++++++++++++++++++++++++++++++++ assignment5/task10.py | 10 +++++++ assignment5/task11.py | 10 +++++++ assignment5/task2.py | 24 +++++++++++++++ assignment5/task3.py | 8 +++++ assignment5/task4.py | 11 +++++++ assignment5/task5.py | 24 +++++++++++++++ assignment5/task6.py | 14 +++++++++ assignment5/task7.py | 12 ++++++++ assignment5/task8.py | 6 ++++ assignment5/task9.py | 8 +++++ 11 files changed, 196 insertions(+) create mode 100644 assignment5/task1.py create mode 100644 assignment5/task10.py create mode 100644 assignment5/task11.py create mode 100644 assignment5/task2.py create mode 100644 assignment5/task3.py create mode 100644 assignment5/task4.py create mode 100644 assignment5/task5.py create mode 100644 assignment5/task6.py create mode 100644 assignment5/task7.py create mode 100644 assignment5/task8.py create mode 100644 assignment5/task9.py diff --git a/assignment5/task1.py b/assignment5/task1.py new file mode 100644 index 0000000..5fd8dc1 --- /dev/null +++ b/assignment5/task1.py @@ -0,0 +1,69 @@ +laptop = "lenovo" +print("Is the laptop == 'lenovo'? I predict True") +print(laptop == "lenovo") +print ("\nIs the laptop == 'mac'? I predict False") +print(laptop == "mac") +print("-" * 10) + +tshirt = "red" +print("Is the tshirt == 'red'? I predict True.") +print(tshirt == "red") +print("\nIs the tshirt == 'blue'? I predict False.") +print(tshirt == "blue") +print("-" * 10) + +phone = "iphone" +print("Is phone == 'iphone'? I predict True.") +print(phone == "iphone") +print("\nIs phone == 'android'? I predict False.") +print(phone == "android") +print("-" * 10) + +age = 23 +print("Is age == 23? I predict True.") +print(age == 23) +print("\nIs age == 18 ? I predict False.") +print(age == 18) +print("-" * 10) + +exam = "tomorrow" +print("Is exam == 'tomorrow'? I predict True.") +print(exam == "tomorrow") +print("\nIs exam == 'Monday'? I predict False.") +print(exam == "Monday") +print("-" * 10) + +name = "Leo" +print("Is name == 'Leo'? I predict False") +print (name == "Leo") +print("\nIs name == 'Nick'? I predict True") +print(name == "Nick") +print("-" * 10) + +temp = 28 +print("Is temp == 28? I predict False.") +print(temp == 28) +print("\nIs temp == 31? I predict True.") +print(temp == 31) +print("-" * 10) + +fav_sub = "math" +print("Is fav_sub == 'math'? I predict False") +print (fav_sub == "math") +print("\nIs fav_sub == 'history'? I predict True") +print(fav_sub == "history") +print("-" * 10) + + +hair = "black" +print("Is hair == 'black'? I predict False") +print (hair == "black") +print("\nIs hair == 'blonde'? I predict True") +print(hair == "blonde") +print("-" * 10) + +fav_series = "squid game" +print("Is fav_series == 'squid game'? I predict False") +print( fav_series == "squid game") +print("\nIs fav_series == 'vikings'? I predict True") +print(fav_series == "vikings") \ No newline at end of file diff --git a/assignment5/task10.py b/assignment5/task10.py new file mode 100644 index 0000000..92dba3e --- /dev/null +++ b/assignment5/task10.py @@ -0,0 +1,10 @@ +current_users = ["Nick", "Nia", "Louie", "Emily", "Kim"] +new_users = ["Tim", "Louie", "Jenna", "George", "Kim"] + +for user in new_users: + if user == user in current_users: + print("This username is taken! enter a new usename:") + else: + print("This usename is available") + + diff --git a/assignment5/task11.py b/assignment5/task11.py new file mode 100644 index 0000000..eba1a57 --- /dev/null +++ b/assignment5/task11.py @@ -0,0 +1,10 @@ +numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9] +for number in numbers: + if number == 1: + print("1st") + elif number == 2: + print("2nd") + elif number == 3: + print("3rd") + else: + print(f"{number}th") \ No newline at end of file diff --git a/assignment5/task2.py b/assignment5/task2.py new file mode 100644 index 0000000..0ef3982 --- /dev/null +++ b/assignment5/task2.py @@ -0,0 +1,24 @@ +city = "Berlin" +print("Is city == 'Berlin'? I predict True.") +print(city == "Berlin") +print("\nIs the city == 'Paris'? I predict False.") +print(city == "Paris") +print("-" * 11) +print("Is city.lower() == 'berlin'? I predict True.") +print(city.lower() == "berlin") +print("Is city.lower() == 'BERLIN'? I predict False.") +print(city.lower() == "BERLIN") +print("-" * 11) + +age = 12 +print ("Is age == 12 and age > 5? I predict True.") +print (age == 12) +print ("\nIs age == 11 and age > 15") +print(age == 11) +print("-" * 11) + +cities = ["Berlin", "Paris", "London", "Rome"] +print("Is 'Rome' in cities? I predict True") +print("Rome" in cities) +print("Is 'Tbilisi' in cities? I predict False") +print("Tbilisi" in cities) diff --git a/assignment5/task3.py b/assignment5/task3.py new file mode 100644 index 0000000..ab78324 --- /dev/null +++ b/assignment5/task3.py @@ -0,0 +1,8 @@ +alien_color = "green" +if alien_color == "green": + print("You just earned 5 point!") + + +alien_color = "red" +if alien_color == "green": + print("You just earned 5 point!") diff --git a/assignment5/task4.py b/assignment5/task4.py new file mode 100644 index 0000000..cf78f6d --- /dev/null +++ b/assignment5/task4.py @@ -0,0 +1,11 @@ +alien_color = "red" +if alien_color == "green": + print("You just earned 5 points!") +else: + print("You just earned 10 point!") + +alien_color = "green" +if alien_color == "green": + print("You just earned 5 points!") +else: + print("You just earned 10 point!") \ No newline at end of file diff --git a/assignment5/task5.py b/assignment5/task5.py new file mode 100644 index 0000000..bb4b6ea --- /dev/null +++ b/assignment5/task5.py @@ -0,0 +1,24 @@ +alien_color = "green" +if alien_color == "green": + print("You just earned 5 points!") +elif alien_color == "yellow": + print("You just earned 10 points!") +else: + print("You just earned 15 points!") + + +alien_color = "yellow" +if alien_color == "green": + print("You just earned 5 points!") +elif alien_color == "yellow": + print("You just earned 10 points!") +else: + print("You just earned 15 points!") + +alien_color = "red" +if alien_color == "green": + print("You just earned 5 points!") +elif alien_color == "yellow": + print("You just earned 10 points!") +else: + print("You just earned 15 points!") \ No newline at end of file diff --git a/assignment5/task6.py b/assignment5/task6.py new file mode 100644 index 0000000..4acb01d --- /dev/null +++ b/assignment5/task6.py @@ -0,0 +1,14 @@ +age = 14 +if age == 2: + print("You are a baby") +elif age == 2 or age < 4: + print("You are a toddler") +elif age == 4 or age < 13: + print("You are a kid") +elif age == 13 or age < 20: + print("You are a teenager") +elif age == 20 or age < 65: + print("You are an adult") +else: + print("You are an elder") + diff --git a/assignment5/task7.py b/assignment5/task7.py new file mode 100644 index 0000000..6aac99f --- /dev/null +++ b/assignment5/task7.py @@ -0,0 +1,12 @@ +fav_fruits = ["mango", "strawberry", "watermelon"] +for fruit in fav_fruits: + if fruit == "strawberry": + print("You really like strawberries") + if fruit == "mango": + print("You really like mangos") + if fruit == "apple": + print("You really like apples") + if fruit == "avacado": + print("You really like avacados") + if fruit == "watermelon": + print("You really like watemelon") diff --git a/assignment5/task8.py b/assignment5/task8.py new file mode 100644 index 0000000..5131251 --- /dev/null +++ b/assignment5/task8.py @@ -0,0 +1,6 @@ +usernames = ["Leonardo", "Jason", "Marry", "Admin", "Tim", "Jasmine", "Jenny"] +for username in usernames: + if username == "Admin": + print("Hello admin, would you like to see a status report?") + else: + print(f"Hello {username}, thank you for logging in again.") \ No newline at end of file diff --git a/assignment5/task9.py b/assignment5/task9.py new file mode 100644 index 0000000..d79e14a --- /dev/null +++ b/assignment5/task9.py @@ -0,0 +1,8 @@ +users = [] +for user in users: + if user == "Admin": + print("Hello admin, would you like to see a status report?") + else: + print(f"Hello {user}, thank you for logging in again.") +if users == []: + print("We need to find more users!")