Skip to content

Commit 5c161ab

Browse files
committed
completed all the exercises
1 parent 86d7718 commit 5c161ab

File tree

90 files changed

+1190
-573
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+1190
-573
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# On the next line, use Python's print function to say `Hello World` in the console (this exercise is case-sensitive!)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
my_list = ['sunday','monday','tuesday','wednesday','thursday','friday','saturday']
3+
4+
# 1. print the item here
5+
6+
# 2. change the position were 'thursday' is to None
7+
8+
# 3. print that position now here
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
my_list = [4,5,734,43,45,100,4,56,23,67,23,58,45,3,100,4,56,23]
2+
3+
# Print in the console the 1st element on the list
4+
5+
# Print in the console the 4th element on the list
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# import the random package here "import random"
2+
import random
3+
4+
def generate_random_list():
5+
aux_list = []
6+
randonlength = random.randint(1, 100)
7+
8+
for i in range(randonlength):
9+
aux_list.append(randonlength)
10+
i += i
11+
return aux_list
12+
my_stupid_list = generate_random_list()
13+
14+
# Feel happy to write the code below this comment, good luck!:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#Remember import random function here:
2+
3+
my_list = [4,5,734,43,45]
4+
5+
#The magic is here:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Your code here, have fun:
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
my_list = [232,32,1,4,55,4,3,32,3,24,5,5,5,34,2,35,5365743,52,34,3,55]
2+
3+
#Your code go here:
4+
print(my_list[0])
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
my_sample_list = [3423,5,4,47889,654,8,867543,23,48,56432,55,23,25,12]
2+
3+
# The magic pass below:
4+
# Create a variable, like "i", that uses the last index position in the array "my_sample_list". Remember we can access the length property of an array using len, and that the position will always be 1 less than the item number (item one is index 0, item 5653 would be one less...)
5+
6+
# You can now use the variable holding the last position to iterate until you get to the first position- which will always be 0. Create a for loop using that variable, make sure the value of the variable is modified on each iteration of the loop.
7+
# while some_variable_reference > 0:
8+
# print(my_sample_list[some_variable_reference])
9+
# chage after doing what we wanted, change the variables value so that the next pass it references the new index position
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
my_sample_list= [3423,5,4,47889,654,8,867543,23,48,56432,55,23,25,12]
2+
3+
#your code go below of this line, nothing change above:
4+
5+
6+
for i in range(0, len(my_sample_list), 1):
7+
print(my_sample_list[i])
8+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
my_list = [3423,5,4,47889,654,8,867543,23,48,56432,55,23,25,12]
2+
3+
#Your code here:
4+
inicialValue = 0
5+
stopValue = 0
6+
increaseValue = 0
7+
8+
for i in range(inicialValue, stopValue):
9+
if i == my_list[i]:
10+
i += increaseValue
11+
print(my_list[i])
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
my_sample_list = ['Esmeralda','Kiko','Ruth','Lebron','Pedro','Maria','Lou','Fernando','Cesco','Bart','Annie']
2+
3+
#Your code here:
4+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
people = [ 'Lebron','Aaliyah','Diamond','Dominique','Aliyah','Jazmin','Darnell','Hatfield','Hawkins','Hayden','Hayes','Haynes','Hays','Head','Heath','Hebert','Henderson','Hendricks','Hendrix','Henry','Hensley','Henson','Herman','Hernandez','Herrera','Herring','Hess','Hester','Hewitt','Hickman','Hicks','Higgins','Hill','Hines','Hinton','Hobbs','Hodge','Hodges','Hoffman','Hogan','Holcomb','Holden','Holder','Holland','Holloway','Holman','Holmes','Holt','Hood','Hooper','Hoover','Hopkins','Hopper','Horn','Horne','Horton','House','Houston','Howard','Howe','Howell','Hubbard','Huber','Hudson','Huff','Wally','Hughes','Hull','Humphrey','Hunt','Hunter','Hurley','Hurst','Hutchinson','Hyde','Ingram','Irwin','Jackson','Jacobs','Jacobson','James','Jarvis','Jefferson','Jenkins','Jennings','Jensen','Jimenez','Johns','Johnson','Johnston','Jones','Jordan','Joseph','Joyce','Joyner','Juarez','Justice','Kane','Kaufman','Keith','Keller','Kelley','Kelly','Kemp','Kennedy','Kent','Kerr','Key','Kidd','Kim','King','Kinney','Kirby','Kirk','Kirkland','Klein','Kline','Knapp','Knight','Knowles','Knox','Koch','Kramer','Lamb','Lambert','Lancaster','Landry','Lane','Lang','Langley','Lara','Larsen','Larson','Lawrence','Lawson','Le','Leach','Leblanc','Lee','Leon','Leonard','Lester','Levine','Levy','Lewis','Lindsay','Lindsey','Little','Livingston','Lloyd','Logan','Long','Lopez','Lott','Love','Lowe','Lowery','Lucas','Luna','Lynch','Lynn','Lyons','Macdonald','Macias','Mack','Madden','Maddox','Maldonado','Malone','Mann','Manning','Marks','Marquez','Marsh','Marshall','Martin','Martinez','Mason','Massey','Mathews','Mathis','Matthews','Maxwell','May','Mayer','Maynard','Mayo','Mays','Mcbride','Mccall','Mccarthy','Mccarty','Mcclain','Mcclure','Mcconnell','Mccormick','Mccoy','Mccray','Wally','Mcdaniel','Mcdonald','Mcdowell','Mcfadden','Mcfarland','Mcgee','Mcgowan','Mcguire','Mcintosh','Mcintyre','Mckay','Mckee','Mckenzie','Mckinney','Mcknight','Mclaughlin','Mclean','Mcleod','Mcmahon','Mcmillan','Mcneil','Mcpherson','Meadows','Medina','Mejia','Melendez','Melton','Mendez','Mendoza','Mercado','Mercer','Merrill','Merritt','Meyer','Meyers','Michael','Middleton','Miles','Miller','Mills','Miranda','Mitchell','Molina','Monroe','Lucas','Jake','Scott','Amy','Molly','Hannah','Lucas']
2+
3+
#Your code here:
4+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
par = "Lorem ipsum dolor sit amet consectetur adipiscing elit Curabitur eget bibendum turpis Curabitur scelerisque eros ultricies venenatis mi at tempor nisl Integer tincidunt accumsan cursus"
2+
3+
counts = {}
4+
#your code go here:
5+
6+
print(counts)
7+
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
arr = [45, 67, 87, 23, 5, 32, 60]
2+
3+
#your code below:
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
mix = [42, True, "towel", [2,1], 'hello', 34.4, {"name": "juan"}]
2+
3+
# Your code below:
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
my_list = [42, True, "towel", [2,1], 'hello', 34.4, {"name": "juan"}]
3+
4+
5+
#your code go here:
6+
7+
print(hello)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
my_sample_list = [3423,5,4,47889,654,8,867543,23,48,5345,234,6,78,54,23,67,3,6,432,55,23,25,12]
2+
3+
4+
def sum_all_values(items):
5+
6+
total= 0
7+
#The magic happens here:
8+
9+
10+
return total
11+
print(sum_all_values(my_sample_list))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
arr = [4,5,734,43,45,100,4,56,23,67,23,58,45]
2+
3+
#Your code go here:
4+
5+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
my_list = [3344,34334,454543,342534,4563456,3445,23455,234,262,2335,43323,4356,345,4545,452,345,434,36,345,4334,5454,345,4352,23,365,345,47,63,425,6578759,768,834,754,35,32,445,453456,56,7536867,3884526,4234,35353245,53244523,566785,7547,743,4324,523472634,26665,63432,54645,32,453625,7568,5669576,754,64356,542644,35,243,371,3251,351223,13231243,734,856,56,53,234342,56,545343]
2+
3+
4+
for numb in my_list:
5+
#the magic go here:
6+
7+
print(numb)
8+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
my_list = [ 1, 0, 0, 0, 1, 0, 0, 0, 1, 1 ]
2+
3+
def my_function(numbers):
4+
new_list = []
5+
for numb in numbers:
6+
#The magic go here:
7+
8+
return new_list
9+
print(my_function(my_list))
10+
11+
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
#Your code go here:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
people = ['juan','ana','michelle','daniella','stefany','lucy','barak']
2+
3+
#Your code go here:
4+
def deletePerson(person_name):
5+
#Your code go here:
6+
7+
print(deletePerson("daniella"))
8+
print(deletePerson("juan"))
9+
print(deletePerson("emilio"))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
chunk_one = [ 'Lebron', 'Aaliyah', 'Diamond', 'Dominique', 'Aliyah', 'Jazmin', 'Darnell' ]
2+
chunk_two = [ 'Lucas' , 'Jake','Scott','Amy', 'Molly','Hannah','Lucas']
3+
4+
5+
def merge_list(list1, list2):
6+
#Your code go here:
7+
8+
print(merge_list(chunk_one, chunk_two))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
list_of_numbers = [4, 80, 85, 59, 37,25, 5, 64, 66, 81,20, 64, 41, 22, 76,76, 55, 96, 2, 68]
2+
3+
4+
#Your code here:
5+
6+
7+
print(merge_two_list(list_of_numbers))
8+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
my_list = [43,23,6,87,43,1,4,6,3,67,8,3445,3,7,5435,63,346,3,456,734,6,34]
2+
3+
4+
#Your code go from here:
5+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
my_list = [3344,34334,454543,342534,4563456,3445,23455,234,262,2335,
2+
43323,4356,345,4545,452,345,434,36,345,4334,5454,345,4352,23,365,345,47,63,
3+
425,6578759,768,834,754,35,32,445,453456,56,7536867,3884526,4234,35353245,53244523,
4+
566785,7547,743,4324,523472634,26665,63432,54645,32,453625,7568,5669576,754,64356,542644,
5+
35,243,371,3251,351223,13231243,734,856,56,53,234342,56,545343]
6+
7+
#Your code here:
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
my_list = [2323,4344,2325,324413,21234,24531,2123,42234,544,456,345,42,5445,23,5656,423]
2+
3+
#Your code here:
4+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
contact = {
2+
"fullname": "Jane Doe",
3+
"phone": "321-321-4321",
4+
"email": "[email protected]"
5+
}
6+
#Your code here:
7+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
coordinatesList = [[33.747252,-112.633853],[-33.867886, -63.987],[41.303921, -81.901693],[-33.350534, -71.653268]]
3+
4+
# Your code go here:
5+
6+
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Celsius_values = [-2,34,56,-10]
2+
3+
4+
5+
def fahrenheit_values(x):
6+
# the magic go here:
7+
8+
result = list(map(fahrenheit_values, Celsius_values))
9+
print(result)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
myNumbers = [23,234,345,4356234,243,43,56,2]
2+
3+
#Your code go here:
4+
5+
print(new_list)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
names = ['Alice','Bob','Marry','Joe','Hilary','Stevia','Dylan']
2+
3+
def prepender(name):
4+
return "My name is: " + name
5+
#Your code go here:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
list_Strings = ['1','5','45','34','343','34',6556,323]
2+
3+
4+
def type_list(items):
5+
return items
6+
7+
new_list = list(map(type_list, list_Strings))
8+
print(new_list)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import datetime
2+
3+
4+
people = [
5+
{ "name": 'Joe', "birthDate": datetime.datetime(1986,10,24) },
6+
{ "name": 'Bob', "birthDate": datetime.datetime(1975,5,24) },
7+
{ "name": 'Erika', "birthDate": datetime.datetime(1989,6,12) },
8+
{ "name": 'Dylan', "birthDate": datetime.datetime(1999,12,14) },
9+
{ "name": 'Steve', "birthDate": datetime.datetime(2003,4,24) }
10+
]
11+
12+
13+
def calculateAge(birthDate):
14+
today = datetime.date.today()
15+
age = today.year - birthDate.year - ((today.month, today.day) < (birthDate.month, birthDate.day))
16+
return age
17+
18+
name_list = list(map(lambda person: person["name"] , people))
19+
print(name_list)
20+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
theBools = [0,1,0,0,1,1,1,0,0,1,0,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,1]
2+
3+
#Your code go here:
4+
5+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
incomingAJAXData = [
2+
{ "name": 'Mario', "lastName": 'Montes' },
3+
{ "name": 'Joe', "lastName": 'Biden' },
4+
{ "name": 'Bill', "lastName": 'Clon' },
5+
{ "name": 'Hilary', "lastName": 'Mccafee' },
6+
{ "name": 'Bobby', "lastName": 'Mc birth' }
7+
]
8+
9+
#Your code go here:
10+
11+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
allNumbers = [23,12,35,5,3,2,3,54,3,21,534,23,42,1]
2+
3+
4+
def filter_function(items):
5+
return items % 2 ==0
6+
greater_than = list(filter(filter_function, allNumbers))
7+
print(greater_than)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
all_names = ["Romario","Boby","Roosevelt","Emiliy", "Michael", "Greta", "Patricia", "Danzalee"]
3+
4+
#Your code go here:
5+
6+
print(resulting_names)
7+
8+
9+
10+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
tasks = [
3+
{ "label": 'Eat my lunch', "done": True },
4+
{ "label": 'Make the bed', "done": False },
5+
{ "label": 'Have some fun', "done": False },
6+
{ "label": 'Finish the replits', "done": False },
7+
{ "label": 'Replit the finishes', "done": True },
8+
{ "label": 'Ask for a raise', "done": False },
9+
{ "label": 'Read a book', "done": True },
10+
{ "label": 'Make a trip', "done": False }
11+
]
12+
13+
14+
#Your code go here:
15+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
names = ['Liam','Emma','Noah','Olivia','William','Ava','James','Isabella','Logan','Sophia',
3+
'Benjamin','Mia','Mason','Charlotte','Elijah','Amelia','Oliver','Evelyn','Jacob','Abigail',
4+
'Lucas','Harper','Michael','Emily','Alexander','Elizabeth','Ethan','Avery','Daniel','Sofia',
5+
'Matthew','Ella','Aiden','Madison','Henry','Scarlett','Joseph','Victoria','Jackson','Aria',
6+
'Samuel','Grace','Sebastian','Chloe','David','Camila','Carter','Penelope','Wyatt','Riley']
7+
8+
9+
#Your code go here:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
all_colors = [
2+
{"label": 'Red', "sexy": True},
3+
{"label": 'Pink', "sexy": False},
4+
{"label": 'Orange', "sexy": True},
5+
{"label": 'Brown', "sexy": False},
6+
{"label": 'Pink', "sexy": True},
7+
{"label": 'Violet', "sexy": True},
8+
{"label": 'Purple', "sexy": False},
9+
]
10+
11+
#Your code go here:
12+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#Import random
2+
3+
#Create the function below:
4+
5+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
parking_state = [
2+
[1,1,1],
3+
[0,0,0],
4+
[1,1,2]
5+
]
6+
7+
#Your code go here:
8+
9+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
3+
# Your code go above, nothing to change after this line:
4+
print(lyrics_generator([0,0,1,1,0,0,0]))
5+
print(lyrics_generator([0,0,1,1,1,0,0,0]))
6+
print(lyrics_generator([0,0,0]))
7+
print(lyrics_generator([1,0,1]))
8+
print(lyrics_generator([1,1,1]))

0 commit comments

Comments
 (0)