File tree 24 files changed +120
-7
lines changed
03-Print-Variables-In-The-Console
08.2-How-Much-The-Wedding-Costs
10-Calling-Your-First-Function
10.1-Creating-Your-First-Function
03-Print-Variables-In-The-Console
08.2-How-Much-The-Wedding-Costs
10-Calling-Your-First-Function
24 files changed +120
-7
lines changed Original file line number Diff line number Diff line change
1
+ # print "Hello World!" on the console
Original file line number Diff line number Diff line change
1
+ # ✅ ↓ your code here ↓ ✅
Original file line number Diff line number Diff line change
1
+ # ✅ ↓ your code here ↓ ✅
Original file line number Diff line number Diff line change
1
+ # ✅ ↓ your code here ↓ ✅
Original file line number Diff line number Diff line change
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 number Diff line number Diff line change
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 number Diff line number Diff line change
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
+
Original file line number Diff line number Diff line change
1
+ total = int (input ('How much money do you have in your pocket\n ' ))
2
+
3
+ # ✅ ↓ YOUR CODE HERE ↓ ✅
Original file line number Diff line number Diff line change
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' )
Original file line number Diff line number Diff line change
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 number Diff line number Diff line change
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 number Diff line number Diff line change
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 number Diff line number Diff line change
1
+ import random
2
+
3
+ # ✅↓ Write your code here ↓✅
Original file line number Diff line number Diff line change 4
4
"editor.minimap.enabled" : false ,
5
5
"workbench.editorAssociations" : {
6
6
"*.md" : " vscode.markdown.preview.editor"
7
- }
7
+ },
8
+ "githubPullRequests.ignoredPullRequestBranches" : [
9
+ " master"
10
+ ]
8
11
}
Original file line number Diff line number Diff line change 1
- # print "Hello World!" on the console
1
+ # print "Hello World!" on the console
2
+
3
+ print ("Hello World!" )
4
+
Original file line number Diff line number Diff line change 1
1
# ✅ ↓ your code here ↓ ✅
2
+
3
+ name = "Yellow"
4
+
5
+ print (name )
Original file line number Diff line number Diff line change 1
- # ✅ ↓ your code here ↓ ✅
1
+ # ✅ ↓ your code here ↓ ✅
2
+ color = "red"
3
+ item = "marker"
4
+
5
+ print (color , item )
Original file line number Diff line number Diff line change 1
1
# ✅ ↓ your code here ↓ ✅
2
+
3
+ variable_are_cool = 2345 * 7323
4
+
5
+ print (variable_are_cool )
Original file line number Diff line number Diff line change 1
1
# ✅ ↓ Set the values for my_var1 and my_var2 here ↓ ✅
2
-
2
+ my_var1 = "Hello"
3
+ my_var2 = "World"
3
4
4
5
## Don't change anything below this line
5
6
the_new_string = my_var1 + ' ' + my_var2
Original file line number Diff line number Diff line change 11
11
12
12
# ✅ ↓ start coding below here ↓ ✅
13
13
14
+ html_document = str (b + c + a + g + f + d + h + e )
15
+ print (html_document )
Original file line number Diff line number Diff line change 1
1
total = int (input ('How much money do you have in your pocket\n ' ))
2
2
3
3
# ✅ ↓ 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
+
Original file line number Diff line number Diff line change 7
7
price = 4000
8
8
# ✅ ↓ Your code here ↓ ✅
9
9
10
+ elif user_input <= 100 :
11
+ price = 10000
12
+ elif user_input <= 200 :
13
+ price = 15000
14
+ else :
15
+ price = 20000
16
+
10
17
11
18
# ❌ ↓ DON'T CHANGE THE CODE BELOW ↓ ❌
12
19
print ('Your wedding will cost ' + str (price )+ ' dollars' )
Original file line number Diff line number Diff line change 2
2
3
3
def get_randomInt ():
4
4
# ✅ ↓ CHANGE ONLY THIS ONE LINE BELOW ↓ ✅
5
- random_number = random .random ( )
5
+ random_number = random .randint ( 1 , 10 )
6
6
return random_number
7
7
8
- print (get_randomInt ())
8
+ print (get_randomInt ())
9
+
10
+
11
+
Original file line number Diff line number Diff line change @@ -3,4 +3,8 @@ def is_odd(my_number):
3
3
4
4
5
5
def my_main_code ():
6
- # ✅ ↓ Your code here ↓ ✅
6
+ # ✅ ↓ Your code here ↓ ✅
7
+
8
+ print (is_odd (45345 ))
9
+
10
+ my_main_code ()
You can’t perform that action at this time.
0 commit comments