Skip to content

Commit 8f71075

Browse files
committed
Pending changes exported from your codespace
1 parent 6932846 commit 8f71075

File tree

24 files changed

+120
-7
lines changed

24 files changed

+120
-7
lines changed

.learn/resets/01-Console/app.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# print "Hello World!" on the console
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# ✅ ↓ your code here ↓ ✅
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# ✅ ↓ your code here ↓ ✅
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# ✅ ↓ your code here ↓ ✅
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
age = int(input('What is your age?\n'))
2+
# ✅ ↓ CHANGE THE CODE BELOW TO ADD 10 TO AGE ↓ ✅
3+
4+
print("Your age is: "+str(age))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# ✅ ↓ Set the values for my_var1 and my_var2 here ↓ ✅
2+
3+
4+
## Don't change anything below this line
5+
the_new_string = my_var1 + ' ' + my_var2
6+
print(the_new_string)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
a = '</title>'
2+
b = '</html>'
3+
c = '<head>'
4+
d = '</body>'
5+
e = '<html>'
6+
f = '</head>'
7+
g = '<title>'
8+
h = '<body>'
9+
10+
# ❌ ⬆ DON'T CHANGE THE CODE ABOVE ⬆ ❌
11+
12+
# ✅ ↓ start coding below here ↓ ✅
13+
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
total = int(input('How much money do you have in your pocket\n'))
2+
3+
# ✅ ↓ YOUR CODE HERE ↓ ✅
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
user_input = int(input('How many people are coming to your wedding?\n'))
2+
3+
# ❌ ⬆ DON'T CHANGE THE CODE ABOVE ⬆ ❌
4+
5+
6+
if user_input <= 50:
7+
price = 4000
8+
# ✅ ↓ Your code here ↓ ✅
9+
10+
11+
# ❌ ↓ DON'T CHANGE THE CODE BELOW ↓ ❌
12+
print('Your wedding will cost '+str(price)+' dollars')
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import random
2+
3+
def get_randomInt():
4+
# ✅ ↓ CHANGE ONLY THIS ONE LINE BELOW ↓ ✅
5+
random_number = random.random()
6+
return random_number
7+
8+
print(get_randomInt())
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
def is_odd(my_number):
2+
return (my_number % 2 != 0)
3+
4+
5+
def my_main_code():
6+
# ✅ ↓ Your code here ↓ ✅
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
def add_numbers(a,b):
2+
# This is the function's body ✅↓ Write your code here ↓✅
3+
4+
5+
# ❌ ↓ DON'T CHANGE THE CODE BELOW ↓ ❌
6+
print(add_numbers(3,4))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import random
2+
3+
# ✅↓ Write your code here ↓✅

.vscode/settings.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
"editor.minimap.enabled": false,
55
"workbench.editorAssociations": {
66
"*.md": "vscode.markdown.preview.editor"
7-
}
7+
},
8+
"githubPullRequests.ignoredPullRequestBranches": [
9+
"master"
10+
]
811
}

exercises/01-Console/app.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
# print "Hello World!" on the console
1+
# print "Hello World!" on the console
2+
3+
print("Hello World!")
4+

exercises/02-Declare-Variables/app.py

+4
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
# ✅ ↓ your code here ↓ ✅
2+
3+
name = "Yellow"
4+
5+
print(name)
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
# ✅ ↓ your code here ↓ ✅
1+
# ✅ ↓ your code here ↓ ✅
2+
color = "red"
3+
item = "marker"
4+
5+
print(color, item)
+4
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
# ✅ ↓ your code here ↓ ✅
2+
3+
variable_are_cool = 2345 * 7323
4+
5+
print(variable_are_cool)

exercises/06-String-Concatenation/app.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# ✅ ↓ Set the values for my_var1 and my_var2 here ↓ ✅
2-
2+
my_var1 = "Hello"
3+
my_var2 = "World"
34

45
## Don't change anything below this line
56
the_new_string = my_var1 + ' ' + my_var2

exercises/07-Create-a-Basic-HTML/app.py

+2
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@
1111

1212
# ✅ ↓ start coding below here ↓ ✅
1313

14+
html_document = str(b + c + a + g +f + d + h + e)
15+
print(html_document)

exercises/08.1-Your-First-If/app.py

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
11
total = int(input('How much money do you have in your pocket\n'))
22

33
# ✅ ↓ YOUR CODE HERE ↓ ✅
4+
5+
if total > 100:
6+
print("Give me your money!")
7+
8+
elif total > 50:
9+
10+
print("Buy me some coffee, you cheap!")
11+
12+
else:
13+
14+
print("You are a poor guy, go away!")
15+
16+

exercises/08.2-How-Much-The-Wedding-Costs/app.py

+7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
price = 4000
88
# ✅ ↓ Your code here ↓ ✅
99

10+
elif user_input <= 100:
11+
price = 10000
12+
elif user_input <= 200:
13+
price = 15000
14+
else:
15+
price = 20000
16+
1017

1118
# ❌ ↓ DON'T CHANGE THE CODE BELOW ↓ ❌
1219
print('Your wedding will cost '+str(price)+' dollars')

exercises/09-Random-Numbers/app.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
def get_randomInt():
44
# ✅ ↓ CHANGE ONLY THIS ONE LINE BELOW ↓ ✅
5-
random_number = random.random()
5+
random_number = random.randint(1, 10)
66
return random_number
77

8-
print(get_randomInt())
8+
print(get_randomInt())
9+
10+
11+

exercises/10-Calling-Your-First-Function/app.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@ def is_odd(my_number):
33

44

55
def my_main_code():
6-
# ✅ ↓ Your code here ↓ ✅
6+
# ✅ ↓ Your code here ↓ ✅
7+
8+
print(is_odd(45345))
9+
10+
my_main_code()

0 commit comments

Comments
 (0)