From ac890fa5b8760df4910b9afc28f6dcdd80253d05 Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+Alexagarcia5280@users.noreply.github.com> Date: Thu, 2 Oct 2025 20:59:02 -0600 Subject: [PATCH 01/26] Create day 2 --- 02_Day_Variables_builtin_functions/day 2 | 1 + 1 file changed, 1 insertion(+) create mode 100644 02_Day_Variables_builtin_functions/day 2 diff --git a/02_Day_Variables_builtin_functions/day 2 b/02_Day_Variables_builtin_functions/day 2 new file mode 100644 index 000000000..d1581552d --- /dev/null +++ b/02_Day_Variables_builtin_functions/day 2 @@ -0,0 +1 @@ +#day 2 \ No newline at end of file From b41b30e31d7c475ca6b8b05f95d43a3b1f7f2e37 Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+Alexagarcia5280@users.noreply.github.com> Date: Thu, 2 Oct 2025 21:07:07 -0600 Subject: [PATCH 02/26] Create variables_Alexa.py --- 02_Day_Variables_builtin_functions/variables_Alexa.py | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 02_Day_Variables_builtin_functions/variables_Alexa.py diff --git a/02_Day_Variables_builtin_functions/variables_Alexa.py b/02_Day_Variables_builtin_functions/variables_Alexa.py new file mode 100644 index 000000000..6049d7b0d --- /dev/null +++ b/02_Day_Variables_builtin_functions/variables_Alexa.py @@ -0,0 +1,2 @@ +#Day 2: 30 days of python programming + From 9c6313014eb644f59054fb2f75ed8c67bc4f8411 Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+Alexagarcia5280@users.noreply.github.com> Date: Thu, 2 Oct 2025 21:07:59 -0600 Subject: [PATCH 03/26] Update variables_Alexa.py --- 02_Day_Variables_builtin_functions/variables_Alexa.py | 1 + 1 file changed, 1 insertion(+) diff --git a/02_Day_Variables_builtin_functions/variables_Alexa.py b/02_Day_Variables_builtin_functions/variables_Alexa.py index 6049d7b0d..9c8a25c0d 100644 --- a/02_Day_Variables_builtin_functions/variables_Alexa.py +++ b/02_Day_Variables_builtin_functions/variables_Alexa.py @@ -1,2 +1,3 @@ #Day 2: 30 days of python programming +first_name \ No newline at end of file From 184f5e4e95fef3c6267610067b76a19e67961744 Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+Alexagarcia5280@users.noreply.github.com> Date: Thu, 2 Oct 2025 21:19:33 -0600 Subject: [PATCH 04/26] Update variables_Alexa.py --- 02_Day_Variables_builtin_functions/variables_Alexa.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/02_Day_Variables_builtin_functions/variables_Alexa.py b/02_Day_Variables_builtin_functions/variables_Alexa.py index 9c8a25c0d..d36088504 100644 --- a/02_Day_Variables_builtin_functions/variables_Alexa.py +++ b/02_Day_Variables_builtin_functions/variables_Alexa.py @@ -1,3 +1,10 @@ #Day 2: 30 days of python programming -first_name \ No newline at end of file +first_name = 'Alexa' +last_name = 'Garcia' +full_name = first_name + " " + last_name + +country = 'United States' +city = 'Salt Lake City' +age = 37 +year = 2025 \ No newline at end of file From d0578de7815e02ed4f9ccc84c6b1b0b9945e7d30 Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+Alexagarcia5280@users.noreply.github.com> Date: Thu, 2 Oct 2025 21:28:07 -0600 Subject: [PATCH 05/26] Update variables_Alexa.py --- 02_Day_Variables_builtin_functions/variables_Alexa.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/02_Day_Variables_builtin_functions/variables_Alexa.py b/02_Day_Variables_builtin_functions/variables_Alexa.py index d36088504..de54173c9 100644 --- a/02_Day_Variables_builtin_functions/variables_Alexa.py +++ b/02_Day_Variables_builtin_functions/variables_Alexa.py @@ -7,4 +7,10 @@ country = 'United States' city = 'Salt Lake City' age = 37 -year = 2025 \ No newline at end of file +year = 2025 +is_married = False +is_true = True +is_light_on = True +demographics = { 'full_name', +'country', +'city' } From 599937797cd0ee6385045b25126542626f20a04e Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+Alexagarcia5280@users.noreply.github.com> Date: Thu, 2 Oct 2025 21:34:34 -0600 Subject: [PATCH 06/26] Update variables_Alexa.py --- 02_Day_Variables_builtin_functions/variables_Alexa.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/02_Day_Variables_builtin_functions/variables_Alexa.py b/02_Day_Variables_builtin_functions/variables_Alexa.py index de54173c9..d155bec86 100644 --- a/02_Day_Variables_builtin_functions/variables_Alexa.py +++ b/02_Day_Variables_builtin_functions/variables_Alexa.py @@ -11,6 +11,8 @@ is_married = False is_true = True is_light_on = True -demographics = { 'full_name', -'country', -'city' } +demographics = { + 'full_name': full_name, + 'country': country, + 'city': city +} From c7ce9b87009f971ec3d9bc27817c911532370944 Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+Alexagarcia5280@users.noreply.github.com> Date: Thu, 2 Oct 2025 22:22:17 -0600 Subject: [PATCH 07/26] Update variables_Alexa.py --- .../variables_Alexa.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/02_Day_Variables_builtin_functions/variables_Alexa.py b/02_Day_Variables_builtin_functions/variables_Alexa.py index d155bec86..77e7ddd64 100644 --- a/02_Day_Variables_builtin_functions/variables_Alexa.py +++ b/02_Day_Variables_builtin_functions/variables_Alexa.py @@ -16,3 +16,32 @@ 'country': country, 'city': city } + + +print(first_name) +print(len(first_name)) + +print(last_name) +print(len(last_name)) + +print(full_name) +print(len(full_name)) + +print(country) +print(len(country)) + +print(city) +print(len(city)) + +print(age) #int has no len + +print(year) #int has no len + +print(is_married) #bool has no len + +print(is_true) #bool has no len + +print(is_light_on) #bool has no len + +print(demographics) +print(len(demographics)) \ No newline at end of file From 2ce60a8984c2a4fe2a6e8b2f26296373e6c66106 Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+Alexagarcia5280@users.noreply.github.com> Date: Fri, 3 Oct 2025 08:18:25 -0600 Subject: [PATCH 08/26] Update variables_Alexa.py --- 02_Day_Variables_builtin_functions/variables_Alexa.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/02_Day_Variables_builtin_functions/variables_Alexa.py b/02_Day_Variables_builtin_functions/variables_Alexa.py index 77e7ddd64..be69b2c71 100644 --- a/02_Day_Variables_builtin_functions/variables_Alexa.py +++ b/02_Day_Variables_builtin_functions/variables_Alexa.py @@ -44,4 +44,11 @@ print(is_light_on) #bool has no len print(demographics) -print(len(demographics)) \ No newline at end of file +print(len(demographics)) + +#assigning int values to find sum +num_one = 5 +num_two = 4 +total_sum = num_one + num_two +diff = num_one - num_two +product = num_one * num_two \ No newline at end of file From d0390e9d339f0f89649487f83b6f190fde787b58 Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+Alexagarcia5280@users.noreply.github.com> Date: Fri, 3 Oct 2025 08:32:32 -0600 Subject: [PATCH 09/26] Update variables_Alexa.py --- 02_Day_Variables_builtin_functions/variables_Alexa.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/02_Day_Variables_builtin_functions/variables_Alexa.py b/02_Day_Variables_builtin_functions/variables_Alexa.py index be69b2c71..f913e755a 100644 --- a/02_Day_Variables_builtin_functions/variables_Alexa.py +++ b/02_Day_Variables_builtin_functions/variables_Alexa.py @@ -51,4 +51,7 @@ num_two = 4 total_sum = num_one + num_two diff = num_one - num_two -product = num_one * num_two \ No newline at end of file +product = num_one * num_two +result = num_one / num_two +remainder = num_one % num_two +exp = num_one ** num_two From 597eb046a58c2961171449035eb787265b3b122e Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+developedbyAlexa@users.noreply.github.com> Date: Sat, 4 Oct 2025 18:06:55 -0600 Subject: [PATCH 10/26] Update variables_Alexa.py --- .../variables_Alexa.py | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/02_Day_Variables_builtin_functions/variables_Alexa.py b/02_Day_Variables_builtin_functions/variables_Alexa.py index f913e755a..94efb6b4f 100644 --- a/02_Day_Variables_builtin_functions/variables_Alexa.py +++ b/02_Day_Variables_builtin_functions/variables_Alexa.py @@ -1,5 +1,7 @@ #Day 2: 30 days of python programming +import math + first_name = 'Alexa' last_name = 'Garcia' full_name = first_name + " " + last_name @@ -55,3 +57,32 @@ result = num_one / num_two remainder = num_one % num_two exp = num_one ** num_two +floor_division = num_one // num_two + +#Calculate the area of a circle and assign the value to a variable name of area_of_circle +radius = 30 +area_of_circle = math.pi (radius ** 2) +#Calculate the circumference of a circle and assign the value to a variable name of circum_of_circle +circum_of_circle = 2 * math.pi * radius + +##Take radius as user input and calculate the area +# Get radius as user input +radius = float(input("Enter the radius of the circle: ")) +# Calculate the area +area = math.pi * (radius ** 2) +# Display the result +print(f"The area of the circle with radius {radius} is: {area}") + +#Use the built-in input function to get first name, last name, country and age from a user and store the value to their corresponding variable names +user_first_name = input("First Name") +user_last_name = input("Last Name) +user_country = input("Country") +user_age = int(input("Age")) + +#Run help('keywords') in Python shell or in your file to check for the Python reserved words or keywords +import keyword +print(keyword.kwlist) +#['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', +'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', +'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', +'pass', 'raise', 'return', 'try', 'while', 'with', 'yield'] From 6739a3d91c656c016a11cd47e2e239f25015041e Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+developedbyAlexa@users.noreply.github.com> Date: Sat, 4 Oct 2025 18:15:58 -0600 Subject: [PATCH 11/26] Update variables_Alexa.py --- 02_Day_Variables_builtin_functions/variables_Alexa.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/02_Day_Variables_builtin_functions/variables_Alexa.py b/02_Day_Variables_builtin_functions/variables_Alexa.py index 94efb6b4f..7d5c9213b 100644 --- a/02_Day_Variables_builtin_functions/variables_Alexa.py +++ b/02_Day_Variables_builtin_functions/variables_Alexa.py @@ -1,6 +1,7 @@ #Day 2: 30 days of python programming import math +import keyword first_name = 'Alexa' last_name = 'Garcia' @@ -80,7 +81,7 @@ user_age = int(input("Age")) #Run help('keywords') in Python shell or in your file to check for the Python reserved words or keywords -import keyword + print(keyword.kwlist) #['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', From 414c8cf501cdf61c55abc49a483e1c185d107d19 Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+developedbyAlexa@users.noreply.github.com> Date: Sat, 4 Oct 2025 18:27:34 -0600 Subject: [PATCH 12/26] Update variables_Alexa.py --- .../variables_Alexa.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/02_Day_Variables_builtin_functions/variables_Alexa.py b/02_Day_Variables_builtin_functions/variables_Alexa.py index 7d5c9213b..b75e29b34 100644 --- a/02_Day_Variables_builtin_functions/variables_Alexa.py +++ b/02_Day_Variables_builtin_functions/variables_Alexa.py @@ -3,6 +3,7 @@ import math import keyword + first_name = 'Alexa' last_name = 'Garcia' full_name = first_name + " " + last_name @@ -62,28 +63,28 @@ #Calculate the area of a circle and assign the value to a variable name of area_of_circle radius = 30 -area_of_circle = math.pi (radius ** 2) +area_of_circle = math.pi * (radius ** 2) #Calculate the circumference of a circle and assign the value to a variable name of circum_of_circle circum_of_circle = 2 * math.pi * radius ##Take radius as user input and calculate the area # Get radius as user input -radius = float(input("Enter the radius of the circle: ")) +radius = float(input("Enter the radius of the circle:" + " ")) # Calculate the area area = math.pi * (radius ** 2) # Display the result print(f"The area of the circle with radius {radius} is: {area}") #Use the built-in input function to get first name, last name, country and age from a user and store the value to their corresponding variable names -user_first_name = input("First Name") -user_last_name = input("Last Name) -user_country = input("Country") -user_age = int(input("Age")) +user_first_name = input("First Name:" + " ") +user_last_name = input("Last Name:" + " ") +user_country = input("Country:" + " ") +user_age = int(input("Age:" + " ")) #Run help('keywords') in Python shell or in your file to check for the Python reserved words or keywords print(keyword.kwlist) #['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', -'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', -'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', -'pass', 'raise', 'return', 'try', 'while', 'with', 'yield'] +#'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', +#'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', +#'pass', 'raise', 'return', 'try', 'while', 'with', 'yield'] From 841f4299bd0e630c4db2c39db4ed209f6a5682e9 Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+developedbyAlexa@users.noreply.github.com> Date: Sun, 5 Oct 2025 10:16:01 -0600 Subject: [PATCH 13/26] Create data_types_Alexa.py --- 01_Day_Introduction/data_types_Alexa.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 01_Day_Introduction/data_types_Alexa.py diff --git a/01_Day_Introduction/data_types_Alexa.py b/01_Day_Introduction/data_types_Alexa.py new file mode 100644 index 000000000..6e903fe7b --- /dev/null +++ b/01_Day_Introduction/data_types_Alexa.py @@ -0,0 +1,14 @@ +#Check the data types of the following data: +10 +9.8 +3.14 +4 - 4j +['Asabeneh', 'Python', 'Finland'] +Your name +Your family name +Your country +Exercise: Level 2 +Create a folder named day_1 inside 30DaysOfPython folder. Inside day_1 folder, create a python file helloworld.py and repeat questions 1, 2, 3 and 4. Remember to use print() when you are working on a python file. Navigate to the directory where you have saved your file, and run it. +Exercise: Level 3 +Write an example for different Python data types such as Number(Integer, Float, Complex), String, Boolean, List, Tuple, Set and Dictionary. +Find an Euclidian distance between (2, 3) and (10, 8) From 2d93423fd9183b4f5dab046236244c849c5287d0 Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+developedbyAlexa@users.noreply.github.com> Date: Sun, 5 Oct 2025 10:17:10 -0600 Subject: [PATCH 14/26] Update data_types_Alexa.py --- 01_Day_Introduction/data_types_Alexa.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/01_Day_Introduction/data_types_Alexa.py b/01_Day_Introduction/data_types_Alexa.py index 6e903fe7b..82d2acd19 100644 --- a/01_Day_Introduction/data_types_Alexa.py +++ b/01_Day_Introduction/data_types_Alexa.py @@ -7,8 +7,12 @@ Your name Your family name Your country -Exercise: Level 2 + + +#Exercise: Level 2 Create a folder named day_1 inside 30DaysOfPython folder. Inside day_1 folder, create a python file helloworld.py and repeat questions 1, 2, 3 and 4. Remember to use print() when you are working on a python file. Navigate to the directory where you have saved your file, and run it. -Exercise: Level 3 + + +#Exercise: Level 3 Write an example for different Python data types such as Number(Integer, Float, Complex), String, Boolean, List, Tuple, Set and Dictionary. Find an Euclidian distance between (2, 3) and (10, 8) From 71eaeeb61ec6344ad3f64c4b9c7f66dad9185303 Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+developedbyAlexa@users.noreply.github.com> Date: Mon, 6 Oct 2025 07:50:23 -0600 Subject: [PATCH 15/26] Update data_types_Alexa.py --- 01_Day_Introduction/data_types_Alexa.py | 74 +++++++++++++++++++------ 1 file changed, 56 insertions(+), 18 deletions(-) diff --git a/01_Day_Introduction/data_types_Alexa.py b/01_Day_Introduction/data_types_Alexa.py index 82d2acd19..7b640f493 100644 --- a/01_Day_Introduction/data_types_Alexa.py +++ b/01_Day_Introduction/data_types_Alexa.py @@ -1,18 +1,56 @@ -#Check the data types of the following data: -10 -9.8 -3.14 -4 - 4j -['Asabeneh', 'Python', 'Finland'] -Your name -Your family name -Your country - - -#Exercise: Level 2 -Create a folder named day_1 inside 30DaysOfPython folder. Inside day_1 folder, create a python file helloworld.py and repeat questions 1, 2, 3 and 4. Remember to use print() when you are working on a python file. Navigate to the directory where you have saved your file, and run it. - - -#Exercise: Level 3 -Write an example for different Python data types such as Number(Integer, Float, Complex), String, Boolean, List, Tuple, Set and Dictionary. -Find an Euclidian distance between (2, 3) and (10, 8) +a = type(10) +print(a) + +b = type(9.8) +print(b) + +c = type(3.14) +print(c) + +d = type(4 - 4j) +print(d) + +e = type(['Asabeneh', 'Python', 'Finland']) +print(e) + +f = type('Your name') +print(f) + +g = type('Your family name') +print(g) + +h = type('Your country') +print(h) + +#Integer +i = 30 +print(i) + +#Float +j = 5.5 +print(j) + +#Complex +k = (5 - 5j) + +#String +l = "What a wounderful world" +print(l) + +#Boolean +m = 5 < 4 +print(m) + +#List +n = ['Alexa', 'Giraffe', 300] +print(n) + +#Tuple +o = ('banana', 'kiwi', 'strawberry') +print(o) + +#Set +p = {'jason', 23, 5 == 5} + +#Dictionary data type +q_dict = {"k": (5 - 5j), "l": "What a wounderful world"} From 2cfc5f62f7a589a39875add378dcbaacdff025d7 Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+developedbyAlexa@users.noreply.github.com> Date: Mon, 6 Oct 2025 07:52:00 -0600 Subject: [PATCH 16/26] Update data_types_Alexa.py --- 01_Day_Introduction/data_types_Alexa.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01_Day_Introduction/data_types_Alexa.py b/01_Day_Introduction/data_types_Alexa.py index 7b640f493..19aba7724 100644 --- a/01_Day_Introduction/data_types_Alexa.py +++ b/01_Day_Introduction/data_types_Alexa.py @@ -53,4 +53,4 @@ p = {'jason', 23, 5 == 5} #Dictionary data type -q_dict = {"k": (5 - 5j), "l": "What a wounderful world"} +q_dict = {"k": (5 - 5j), "l": "What a wonderful world"} From 18a5a084864ad87de98ec1bae11632c02689e455 Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+developedbyAlexa@users.noreply.github.com> Date: Mon, 6 Oct 2025 08:23:04 -0600 Subject: [PATCH 17/26] Update data_types_Alexa.py --- 01_Day_Introduction/data_types_Alexa.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/01_Day_Introduction/data_types_Alexa.py b/01_Day_Introduction/data_types_Alexa.py index 19aba7724..c108a45a3 100644 --- a/01_Day_Introduction/data_types_Alexa.py +++ b/01_Day_Introduction/data_types_Alexa.py @@ -32,6 +32,7 @@ #Complex k = (5 - 5j) +print(k) #String l = "What a wounderful world" @@ -51,6 +52,9 @@ #Set p = {'jason', 23, 5 == 5} +print(p) #Dictionary data type q_dict = {"k": (5 - 5j), "l": "What a wonderful world"} +print(q_dict) + From 6197406ecc760681cf20c7499b8cf60e70d607c6 Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+developedbyAlexa@users.noreply.github.com> Date: Mon, 6 Oct 2025 19:22:17 -0600 Subject: [PATCH 18/26] Update data_types_Alexa.py --- 01_Day_Introduction/data_types_Alexa.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/01_Day_Introduction/data_types_Alexa.py b/01_Day_Introduction/data_types_Alexa.py index c108a45a3..77ec14c82 100644 --- a/01_Day_Introduction/data_types_Alexa.py +++ b/01_Day_Introduction/data_types_Alexa.py @@ -58,3 +58,16 @@ q_dict = {"k": (5 - 5j), "l": "What a wonderful world"} print(q_dict) +#Find an Euclidian distance between (2, 3) and (10, 8) + +import math + +# Define the two points (p and q) as lists of coordinates +p = [2, 3] # Represents the point (2, 3) +q = [10, 8] # Represents the point (10, 8) + +# Calculate the Euclidean distance +distance = math.dist(p, q) + +# Print the result +print(distance) From fffe85a4858975e5f90600f00dfbcca490d7af7d Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+developedbyAlexa@users.noreply.github.com> Date: Mon, 6 Oct 2025 19:37:30 -0600 Subject: [PATCH 19/26] Create day_03_operators_Alexa.py --- 03_Day_Operators/day_03_operators_Alexa.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 03_Day_Operators/day_03_operators_Alexa.py diff --git a/03_Day_Operators/day_03_operators_Alexa.py b/03_Day_Operators/day_03_operators_Alexa.py new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/03_Day_Operators/day_03_operators_Alexa.py @@ -0,0 +1 @@ + From fb230db1514d39859ab65c918302ca381f913275 Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+developedbyAlexa@users.noreply.github.com> Date: Tue, 7 Oct 2025 08:35:29 -0600 Subject: [PATCH 20/26] Update day_03_operators_Alexa.py --- 03_Day_Operators/day_03_operators_Alexa.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/03_Day_Operators/day_03_operators_Alexa.py b/03_Day_Operators/day_03_operators_Alexa.py index 8b1378917..7107ea7d5 100644 --- a/03_Day_Operators/day_03_operators_Alexa.py +++ b/03_Day_Operators/day_03_operators_Alexa.py @@ -1 +1,23 @@ +#Exercises - Day 3 +#Declare your age as integer variable +age = 35 +print(age) + +#Declare your height as a float variable +height_in_inches = 63.0 +print(height_in_inches + +#Declare a variable that store a complex number +complex = 3 + 4j +print(complex) + +#Write a script that prompts the user to enter base and height of the triangle + #and calculate an area of this triangle (area = 0.5 x b x h). + +user_input_base = input("enter base of triangle: " + ") +user_input_height = input("enter height of triangle: " + ") +# Calculating area of a circle +area = 0.5 +area_of_triangle = 3.14 * area ** 2 +print('Area of a triangle:', area_of_triangle) From b1d8834edc4e21db0ec04de2df123d807e386ce2 Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+developedbyAlexa@users.noreply.github.com> Date: Tue, 7 Oct 2025 08:36:17 -0600 Subject: [PATCH 21/26] Create strings_Alexa.py --- 04_Day_Strings/strings_Alexa.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 04_Day_Strings/strings_Alexa.py diff --git a/04_Day_Strings/strings_Alexa.py b/04_Day_Strings/strings_Alexa.py new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/04_Day_Strings/strings_Alexa.py @@ -0,0 +1 @@ + From ab9a0b32077e1024b025ca0c073631baf578947a Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+developedbyAlexa@users.noreply.github.com> Date: Tue, 7 Oct 2025 08:36:59 -0600 Subject: [PATCH 22/26] Update strings_Alexa.py --- 04_Day_Strings/strings_Alexa.py | 53 ++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/04_Day_Strings/strings_Alexa.py b/04_Day_Strings/strings_Alexa.py index 8b1378917..ab1766737 100644 --- a/04_Day_Strings/strings_Alexa.py +++ b/04_Day_Strings/strings_Alexa.py @@ -1 +1,52 @@ - +#Concatenate the string 'Thirty', 'Days', 'Of', 'Python' to a single string, 'Thirty Days Of Python'. +Concatenate the string 'Coding', 'For' , 'All' to a single string, 'Coding For All'. +Declare a variable named company and assign it to an initial value "Coding For All". +Print the variable company using print(). +Print the length of the company string using len() method and print(). +Change all the characters to uppercase letters using upper() method. +Change all the characters to lowercase letters using lower() method. +Use capitalize(), title(), swapcase() methods to format the value of the string Coding For All. +Cut(slice) out the first word of Coding For All string. +Check if Coding For All string contains a word Coding using the method index, find or other methods. +Replace the word coding in the string 'Coding For All' to Python. +Change Python for Everyone to Python for All using the replace method or other methods. +Split the string 'Coding For All' using space as the separator (split()) . +"Facebook, Google, Microsoft, Apple, IBM, Oracle, Amazon" split the string at the comma. +What is the character at index 0 in the string Coding For All. +What is the last index of the string Coding For All. +What character is at index 10 in "Coding For All" string. +Create an acronym or an abbreviation for the name 'Python For Everyone'. +Create an acronym or an abbreviation for the name 'Coding For All'. +Use index to determine the position of the first occurrence of C in Coding For All. +Use index to determine the position of the first occurrence of F in Coding For All. +Use rfind to determine the position of the last occurrence of l in Coding For All People. +Use index or find to find the position of the first occurrence of the word 'because' in the following sentence: 'You cannot end a sentence with because because because is a conjunction' +Use rindex to find the position of the last occurrence of the word because in the following sentence: 'You cannot end a sentence with because because because is a conjunction' +Slice out the phrase 'because because because' in the following sentence: 'You cannot end a sentence with because because because is a conjunction' +Find the position of the first occurrence of the word 'because' in the following sentence: 'You cannot end a sentence with because because because is a conjunction' +Slice out the phrase 'because because because' in the following sentence: 'You cannot end a sentence with because because because is a conjunction' +Does ''Coding For All' start with a substring Coding? +Does 'Coding For All' end with a substring coding? +' Coding For All ' , remove the left and right trailing spaces in the given string. +Which one of the following variables return True when we use the method isidentifier(): +30DaysOfPython +thirty_days_of_python +The following list contains the names of some of python libraries: ['Django', 'Flask', 'Bottle', 'Pyramid', 'Falcon']. Join the list with a hash with space string. +Use the new line escape sequence to separate the following sentences. +I am enjoying this challenge. +I just wonder what is next. +Use a tab escape sequence to write the following lines. +Name Age Country City +Asabeneh 250 Finland Helsinki +Use the string formatting method to display the following: +radius = 10 +area = 3.14 * radius ** 2 +The area of a circle with radius 10 is 314 meters square. +Make the following using string formatting methods: +8 + 6 = 14 +8 - 6 = 2 +8 * 6 = 48 +8 / 6 = 1.33 +8 % 6 = 2 +8 // 6 = 1 +8 ** 6 = 262144 From 6a9ba0114ac1de57a8fc05d1e5daf441530e4ddf Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+developedbyAlexa@users.noreply.github.com> Date: Tue, 7 Oct 2025 17:42:14 -0600 Subject: [PATCH 23/26] Update strings_Alexa.py --- 04_Day_Strings/strings_Alexa.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/04_Day_Strings/strings_Alexa.py b/04_Day_Strings/strings_Alexa.py index ab1766737..cfcd732c9 100644 --- a/04_Day_Strings/strings_Alexa.py +++ b/04_Day_Strings/strings_Alexa.py @@ -1,5 +1,5 @@ #Concatenate the string 'Thirty', 'Days', 'Of', 'Python' to a single string, 'Thirty Days Of Python'. -Concatenate the string 'Coding', 'For' , 'All' to a single string, 'Coding For All'. +#Concatenate the string 'Coding', 'For' , 'All' to a single string, 'Coding For All'. Declare a variable named company and assign it to an initial value "Coding For All". Print the variable company using print(). Print the length of the company string using len() method and print(). From c7d097a9e880b128709db0d8bbe7b2b0c1a20549 Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+developedbyAlexa@users.noreply.github.com> Date: Wed, 8 Oct 2025 20:59:28 -0600 Subject: [PATCH 24/26] Update strings_Alexa.py --- 04_Day_Strings/strings_Alexa.py | 55 ++++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 7 deletions(-) diff --git a/04_Day_Strings/strings_Alexa.py b/04_Day_Strings/strings_Alexa.py index cfcd732c9..4ac93ee8f 100644 --- a/04_Day_Strings/strings_Alexa.py +++ b/04_Day_Strings/strings_Alexa.py @@ -1,13 +1,54 @@ #Concatenate the string 'Thirty', 'Days', 'Of', 'Python' to a single string, 'Thirty Days Of Python'. +words = ['Thirty', 'Days', 'Of', 'Python'] +result = " ".join(words) +print(result) + + #Concatenate the string 'Coding', 'For' , 'All' to a single string, 'Coding For All'. +words = ['Coding', 'For' , 'All'] +result = " ".join(words) +print(result) + + Declare a variable named company and assign it to an initial value "Coding For All". -Print the variable company using print(). -Print the length of the company string using len() method and print(). -Change all the characters to uppercase letters using upper() method. -Change all the characters to lowercase letters using lower() method. -Use capitalize(), title(), swapcase() methods to format the value of the string Coding For All. -Cut(slice) out the first word of Coding For All string. -Check if Coding For All string contains a word Coding using the method index, find or other methods. +company = 'Coding For All' +print (company), +print len(company), +print upper (company), +print lower(company), +company = text.capitalization +print (company) +company = text.title +print (company) +company = text.swapcase + + +#Cut(slice) out the first word of Coding For All string. +###text = "Python Programming" + +# Slice from index 0 to 6 (excluding 6) + #print(text[0:6]) # Output: Python + +# Slice from index 7 to end + #print(text[7:]) # Output: Programming + +# Slice with step + #print(text[::2]) # Output: Pto rgamn + +# Reverse the string + #print(text[::-1]) # Output: gnimmargorP nohtyP +### +text = 'Coding for all' +Slice from index 0 to 6 +ptint(text[0:6] + + +#Check if Coding For All string contains a word Coding using the method index, find or other methods. +text = 'Coding For All' +if 'Coding' in text: + print("Found using 'in'") + + Replace the word coding in the string 'Coding For All' to Python. Change Python for Everyone to Python for All using the replace method or other methods. Split the string 'Coding For All' using space as the separator (split()) . From 1d16459e97f6ba368f1140c3b7dfb41692a1ee58 Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+developedbyAlexa@users.noreply.github.com> Date: Thu, 9 Oct 2025 21:10:41 -0600 Subject: [PATCH 25/26] Update strings_Alexa.py --- 04_Day_Strings/strings_Alexa.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/04_Day_Strings/strings_Alexa.py b/04_Day_Strings/strings_Alexa.py index 4ac93ee8f..ec8fdc7e2 100644 --- a/04_Day_Strings/strings_Alexa.py +++ b/04_Day_Strings/strings_Alexa.py @@ -49,9 +49,20 @@ print("Found using 'in'") -Replace the word coding in the string 'Coding For All' to Python. +#Replace the word coding in the string 'Coding For All' to Python. +text 'Coding for all' +replace_text = text.replace ('Coding', 'Python') +print(replace_text) + + Change Python for Everyone to Python for All using the replace method or other methods. +text 'Python for Everyone' +replace_python = text.replace ('Python', 'All') +print(replace_python + Split the string 'Coding For All' using space as the separator (split()) . + + "Facebook, Google, Microsoft, Apple, IBM, Oracle, Amazon" split the string at the comma. What is the character at index 0 in the string Coding For All. What is the last index of the string Coding For All. From 6a568f15c9e1869e0f980030c056c2af30643e0f Mon Sep 17 00:00:00 2001 From: Alexa Garcia <84157414+developedbyAlexa@users.noreply.github.com> Date: Thu, 6 Nov 2025 19:30:51 -0700 Subject: [PATCH 26/26] Created using Colab --- .../variables_Alexa.py.ipynb | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 02_Day_Variables_builtin_functions/variables_Alexa.py.ipynb diff --git a/02_Day_Variables_builtin_functions/variables_Alexa.py.ipynb b/02_Day_Variables_builtin_functions/variables_Alexa.py.ipynb new file mode 100644 index 000000000..2c3953b5e --- /dev/null +++ b/02_Day_Variables_builtin_functions/variables_Alexa.py.ipynb @@ -0,0 +1,165 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "provenance": [], + "authorship_tag": "ABX9TyPYdNylgu9hKpcCnZhtWO4x", + "include_colab_link": true + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + } + }, + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "view-in-github", + "colab_type": "text" + }, + "source": [ + "\"Open" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "GWRo3hMeIP8A", + "outputId": "24e7fdcb-fd1a-4a57-fc44-708fe5a3044e" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Alexa\n", + "5\n", + "Garcia\n", + "6\n", + "Alexa Garcia\n", + "12\n", + "United States\n", + "13\n", + "Salt Lake City\n", + "14\n", + "37\n", + "2025\n", + "False\n", + "True\n", + "True\n", + "{'full_name': 'Alexa Garcia', 'country': 'United States', 'city': 'Salt Lake City'}\n", + "3\n", + "Enter the radius of the circle: 33\n", + "The area of the circle with radius 33.0 is: 3421.194399759285\n", + "First Name: Alexa\n", + "Last Name: Garcia\n", + "Country: United States\n", + "Age: 33\n", + "['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']\n" + ] + } + ], + "source": [ + "#Day 2: 30 days of python programming\n", + "\n", + "import math\n", + "import keyword\n", + "\n", + "\n", + "first_name = 'Alexa'\n", + "last_name = 'Garcia'\n", + "full_name = first_name + \" \" + last_name\n", + "\n", + "country = 'United States'\n", + "city = 'Salt Lake City'\n", + "age = 37\n", + "year = 2025\n", + "is_married = False\n", + "is_true = True\n", + "is_light_on = True\n", + "demographics = {\n", + " 'full_name': full_name,\n", + " 'country': country,\n", + " 'city': city\n", + "}\n", + "\n", + "\n", + "print(first_name)\n", + "print(len(first_name))\n", + "\n", + "print(last_name)\n", + "print(len(last_name))\n", + "\n", + "print(full_name)\n", + "print(len(full_name))\n", + "\n", + "print(country)\n", + "print(len(country))\n", + "\n", + "print(city)\n", + "print(len(city))\n", + "\n", + "print(age) #int has no len\n", + "\n", + "print(year) #int has no len\n", + "\n", + "print(is_married) #bool has no len\n", + "\n", + "print(is_true) #bool has no len\n", + "\n", + "print(is_light_on) #bool has no len\n", + "\n", + "print(demographics)\n", + "print(len(demographics))\n", + "\n", + "#assigning int values to find sum\n", + "num_one = 5\n", + "num_two = 4\n", + "total_sum = num_one + num_two\n", + "diff = num_one - num_two\n", + "product = num_one * num_two\n", + "result = num_one / num_two\n", + "remainder = num_one % num_two\n", + "exp = num_one ** num_two\n", + "floor_division = num_one // num_two\n", + "\n", + "#Calculate the area of a circle and assign the value to a variable name of area_of_circle\n", + "radius = 30\n", + "area_of_circle = math.pi * (radius ** 2)\n", + "#Calculate the circumference of a circle and assign the value to a variable name of circum_of_circle\n", + "circum_of_circle = 2 * math.pi * radius\n", + "\n", + "##Take radius as user input and calculate the area\n", + "# Get radius as user input\n", + "radius = float(input(\"Enter the radius of the circle:\" + \" \"))\n", + "# Calculate the area\n", + "area = math.pi * (radius ** 2)\n", + "# Display the result\n", + "print(f\"The area of the circle with radius {radius} is: {area}\")\n", + "\n", + "#Use the built-in input function to get first name, last name, country and age from a user and store the value to their corresponding variable names\n", + "user_first_name = input(\"First Name:\" + \" \")\n", + "user_last_name = input(\"Last Name:\" + \" \")\n", + "user_country = input(\"Country:\" + \" \")\n", + "user_age = int(input(\"Age:\" + \" \"))\n", + "\n", + "#Run help('keywords') in Python shell or in your file to check for the Python reserved words or keywords\n", + "\n", + "print(keyword.kwlist)\n", + "#['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break',\n", + "#'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for',\n", + "#'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or',\n", + "#'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']" + ] + } + ] +} \ No newline at end of file