Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ac890fa
Create day 2
developedbyAlexa Oct 3, 2025
b41b30e
Create variables_Alexa.py
developedbyAlexa Oct 3, 2025
9c63130
Update variables_Alexa.py
developedbyAlexa Oct 3, 2025
184f5e4
Update variables_Alexa.py
developedbyAlexa Oct 3, 2025
d0578de
Update variables_Alexa.py
developedbyAlexa Oct 3, 2025
5999377
Update variables_Alexa.py
developedbyAlexa Oct 3, 2025
c7ce9b8
Update variables_Alexa.py
developedbyAlexa Oct 3, 2025
2ce60a8
Update variables_Alexa.py
developedbyAlexa Oct 3, 2025
d0390e9
Update variables_Alexa.py
developedbyAlexa Oct 3, 2025
597eb04
Update variables_Alexa.py
developedbyAlexa Oct 5, 2025
6739a3d
Update variables_Alexa.py
developedbyAlexa Oct 5, 2025
414c8cf
Update variables_Alexa.py
developedbyAlexa Oct 5, 2025
841f429
Create data_types_Alexa.py
developedbyAlexa Oct 5, 2025
2d93423
Update data_types_Alexa.py
developedbyAlexa Oct 5, 2025
71eaeeb
Update data_types_Alexa.py
developedbyAlexa Oct 6, 2025
2cfc5f6
Update data_types_Alexa.py
developedbyAlexa Oct 6, 2025
18a5a08
Update data_types_Alexa.py
developedbyAlexa Oct 6, 2025
6197406
Update data_types_Alexa.py
developedbyAlexa Oct 7, 2025
fffe85a
Create day_03_operators_Alexa.py
developedbyAlexa Oct 7, 2025
fb230db
Update day_03_operators_Alexa.py
developedbyAlexa Oct 7, 2025
b1d8834
Create strings_Alexa.py
developedbyAlexa Oct 7, 2025
ab9a0b3
Update strings_Alexa.py
developedbyAlexa Oct 7, 2025
6a9ba01
Update strings_Alexa.py
developedbyAlexa Oct 7, 2025
c7d097a
Update strings_Alexa.py
developedbyAlexa Oct 9, 2025
1d16459
Update strings_Alexa.py
developedbyAlexa Oct 10, 2025
6a568f1
Created using Colab
developedbyAlexa Nov 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions 01_Day_Introduction/data_types_Alexa.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
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)
print(k)

#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}
print(p)

#Dictionary data type
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)
1 change: 1 addition & 0 deletions 02_Day_Variables_builtin_functions/day 2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#day 2
90 changes: 90 additions & 0 deletions 02_Day_Variables_builtin_functions/variables_Alexa.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#Day 2: 30 days of python programming

import math
import keyword


first_name = 'Alexa'
last_name = 'Garcia'
full_name = first_name + " " + last_name

country = 'United States'
city = 'Salt Lake City'
age = 37
year = 2025
is_married = False
is_true = True
is_light_on = True
demographics = {
'full_name': full_name,
'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))

#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
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

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']
165 changes: 165 additions & 0 deletions 02_Day_Variables_builtin_functions/variables_Alexa.py.ipynb
Original file line number Diff line number Diff line change
@@ -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": [
"<a href=\"https://colab.research.google.com/github/developedbyAlexa/30-Days-Of-Python/blob/master/02_Day_Variables_builtin_functions/variables_Alexa.py.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"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']"
]
}
]
}
23 changes: 23 additions & 0 deletions 03_Day_Operators/day_03_operators_Alexa.py
Original file line number Diff line number Diff line change
@@ -0,0 +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)
Loading