Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #87

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .learn/resets/01-Console/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# prin "Hello World!" on the console
1 change: 1 addition & 0 deletions .learn/resets/02-Declare-Variables/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# your code here
1 change: 1 addition & 0 deletions .learn/resets/03-Print-Variables-In-The-Console/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#your code here
1 change: 1 addition & 0 deletions .learn/resets/04-Multiply-Two-Values/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# your code here
4 changes: 4 additions & 0 deletions .learn/resets/05-User-Inputed-Values/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
age = int(input('What is your age?\n'))
# CHANGE THE CODE BELOW TO ADD 10 TO AGE

print("Your age is: "+str(age))
6 changes: 6 additions & 0 deletions .learn/resets/06-String-Concatenation/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Set the values for my_var1 and my_var2 here


## Don't change below this line
the_new_string = my_var1+' '+my_var2
print(the_new_string)
12 changes: 12 additions & 0 deletions .learn/resets/07-Create-a-Basic-HTML/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
a = '</title>'
b = '</html>'
c = '<head>'
d = '</body>'
e = '<html>'
f = '</head>'
g = '<title>'
h = '<body>'

# ⬆ DON'T CHANGE THE CODE ABOVE ⬆
# ↓ start coding below here ↓

3 changes: 3 additions & 0 deletions .learn/resets/08.1-Your-First-If/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
total = int(input('How much money do you have in your pocket\n'))

# YOUR CODE HERE
6 changes: 6 additions & 0 deletions .learn/resets/08.2-How-Much-The-Wedding-Costs/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
user_input = int(input('How many people are coming to your wedding?\n'))

if user_input <= 50:
price = 4000

print('Your wedding will cost '+str(price)+' dollars')
8 changes: 8 additions & 0 deletions .learn/resets/09-Random-Numbers/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import random

def get_randomInt():
# CHANGE ONLY THIS LINE BELOW
random_number = random.random()
return random_number

print(get_randomInt())
6 changes: 6 additions & 0 deletions .learn/resets/10-Calling-Your-First-Function/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def is_odd(my_number):
return (my_number % 2 != 0)


def my_main_code():
# your code here
6 changes: 6 additions & 0 deletions .learn/resets/10.1-Creating-Your-First-Function/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def addNumbers(a,b):
# This is the function body. Write your code here.


# Do not change the code below
print(addNumbers(3,4))
3 changes: 3 additions & 0 deletions .learn/resets/11-Create-A-New-Function/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import random

# your code here
7 changes: 7 additions & 0 deletions .learn/resets/12-Rand-From-One-to-Twelve/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import random

def get_randomInt():
# Your code here
return None

print(get_randomInt())
4 changes: 4 additions & 0 deletions .learn/resets/13-Create-A-For-Loop/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
def standards_maker():
#your code here

#remember to call the function outside (here)
6 changes: 6 additions & 0 deletions .learn/resets/14-Your-First-Loop/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def start_counting():
for i in range(10):
print(i)
return i

start_counting()
5 changes: 5 additions & 0 deletions .learn/resets/15-Looping-With-FizzBuzz/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
def fizz_buzz():
# your code here


fizz_buzz()
23 changes: 23 additions & 0 deletions .learn/resets/16-Random-Colors-Loop/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import random

def get_color(color_number=4):
# making sure is a number and not a string
color_number = int(color_number)

switcher={
0:'red',
1:'yellow',
2:'blue',
3:'green',
4:'black'
}
return switcher.get(color_number,"Invalid Color Number")


def get_allStudentColors():
example_color = get_color(1)
students_array = []
#your loop here


print(get_allStudentColors())
17 changes: 17 additions & 0 deletions .learn/resets/17-Russian-Roulette/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import random

bullet_position = 3

def spin_chamber():
chamber_position = random.randint(1,6)
return chamber_position

# DON'T CHANGE THE CODE ABOVE
def fire_gun():
# YOUR CODE HERE
return None




print(fire_gun())
1 change: 1 addition & 0 deletions .learn/resets/18-The-Beatles/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Your code here!!
1 change: 1 addition & 0 deletions .learn/resets/19-Bottles-Of-Milk/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Your code here!
2 changes: 1 addition & 1 deletion exercises/01-Console/app.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# print "Hello World!" on the console
print("Hello World!")
4 changes: 3 additions & 1 deletion exercises/02-Declare-Variables/app.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# your code here
color = "Yellow"

print(color)
4 changes: 3 additions & 1 deletion exercises/03-Print-Variables-In-The-Console/app.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#your code here
color = "red"

print(color)
4 changes: 3 additions & 1 deletion exercises/04-Multiply-Two-Values/app.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# your code here
variables_are_cool = 2345 * 7323

print(variables_are_cool)
1 change: 1 addition & 0 deletions exercises/05-User-Inputed-Values/app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
age = int(input('What is your age?\n'))
# CHANGE THE CODE BELOW TO ADD 10 TO AGE
age = age + 10

print("Your age is: "+str(age))
3 changes: 2 additions & 1 deletion exercises/06-String-Concatenation/app.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Set the values for my_var1 and my_var2 here

my_var1 = "Hello"
my_var2 = "World"

## Don't change below this line
the_new_string = my_var1+' '+my_var2
Expand Down
3 changes: 2 additions & 1 deletion exercises/07-Create-a-Basic-HTML/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
h = '<body>'

# ⬆ DON'T CHANGE THE CODE ABOVE ⬆
# ↓ start coding below here ↓
html_document = e + c + g + a + f + h + d + b

print(html_document)
6 changes: 6 additions & 0 deletions exercises/08.1-Your-First-If/app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
total = int(input('How much money do you have in your pocket\n'))

# YOUR CODE HERE
if total > 100:
print("Going to a trip.")
elif total > 50 and total <= 100:
print("Going out for dinner.")
elif total <=50:
print("Better stay at home and save some money.")
6 changes: 6 additions & 0 deletions exercises/08.2-How-Much-The-Wedding-Costs/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@

if user_input <= 50:
price = 4000
elif user_input > 50 and user_input <= 100:
price = 10000
elif user_input > 100 and user_input <= 200:
price = 15000
elif user_input > 200:
price = 20000

print('Your wedding will cost '+str(price)+' dollars')
3 changes: 2 additions & 1 deletion exercises/09-Random-Numbers/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

def get_randomInt():
# CHANGE ONLY THIS LINE BELOW
random_number = random.random()
random_number = random.randint(1,10)
return random_number


print(get_randomInt())
4 changes: 3 additions & 1 deletion exercises/10-Calling-Your-First-Function/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ def is_odd(my_number):


def my_main_code():
# your code here
print(is_odd(45345))

print(my_main_code())
2 changes: 1 addition & 1 deletion exercises/10.1-Creating-Your-First-Function/app.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def addNumbers(a,b):
# This is the function body. Write your code here.
return a + b


# Do not change the code below
Expand Down
7 changes: 6 additions & 1 deletion exercises/11-Create-A-New-Function/app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import random

# your code here
# your code here
def generate_random():
random_number = random.randint(0, 9)
print(random_number)
return random_number

4 changes: 2 additions & 2 deletions exercises/12-Rand-From-One-to-Twelve/app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import random

def get_randomInt():
# Your code here
return None
my_random_number = random.randrange(1,13)
return my_random_number

print(get_randomInt())
6 changes: 4 additions & 2 deletions exercises/13-Create-A-For-Loop/app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
def standards_maker():
#your code here
for i in range(300):
print("I will write questions if I am stuck")

#remember to call the function outside (here)
#remember to call the function outside (here)
standards_maker()
2 changes: 1 addition & 1 deletion exercises/14-Your-First-Loop/app.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def start_counting():
for i in range(10):
for i in range(12):
print(i)
return i

Expand Down
10 changes: 9 additions & 1 deletion exercises/15-Looping-With-FizzBuzz/app.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
def fizz_buzz():
# your code here
for i in range(101):
if i % 3 == 0 and i % 5 == 0:
print("FizzBuzz")
elif i % 3 == 0:
print('Fizz')
elif i % 5 == 0:
print("Buzz")
else:
print(i)


fizz_buzz()
5 changes: 5 additions & 0 deletions exercises/16-Random-Colors-Loop/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ def get_allStudentColors():
example_color = get_color(1)
students_array = []
#your loop here
for i in range(10):
random_number = random.randint(1,3)
students_array.append(get_color(random_number))

return students_array


print(get_allStudentColors())
4 changes: 3 additions & 1 deletion exercises/17-Russian-Roulette/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ def spin_chamber():
# DON'T CHANGE THE CODE ABOVE
def fire_gun():
# YOUR CODE HERE
return None
if bullet_position == spin_chamber():
return 'You are dead!'
return 'Keep playing!'



Expand Down
12 changes: 12 additions & 0 deletions exercises/18-The-Beatles/app.py
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
# Your code here!!
def sing():
song = ""
for verse in range(11):
if verse == 4:
song += "whisper words of wisdom, "
elif verse == 10:
song += "there will be an answer, let it be"
else:
song += "let it be, "
return song

print(sing())
10 changes: 10 additions & 0 deletions exercises/19-Bottles-Of-Milk/app.py
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
# Your code here!
def number_of_bottles():
for i in range(99, 2, -1):

print(f"{i} bottles of milk on the wall, {i} bottles of milk. Take one down and pass it around, {i} bottles of milk on the wall.")

print("1 bottle of milk on the wall, 1 bottle of milk. Take one down and pass it around, no more bottles of milk on the wall.")

print("2 bottles of milk on the wall, 2 bottles of milk. Take one down and pass it around, 1 bottle of milk on the wall.")

print("No more bottles of milk on the wall, no more bottles of milk. Go to the store and buy some more, 99 bottles of milk on the wall.")
Loading