-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path01c-Quiz-Variables-Answers.coffee
91 lines (54 loc) · 1.56 KB
/
01c-Quiz-Variables-Answers.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
###
Quiz-Variables
###
######################################## Q1
# Create a variable named 'box' and assign to it the number 10
# The answer should be one line long
box = 10
######################################## Q2
# Create a 'circle' variable that holds the number 10
# The answer should be one line long
circle = 10
######################################## Q3
# Assign the String "cat" to the variable 'animal'
# The answer should be one line long
animal = "cat"
######################################## Q4
# Assign the value true to the variable 'doingFine'
# The answer should be one line long
doingFine = true
######################################## Q5
# Write code that makes the output match what's described
snakes = 13
print(snakes) # Output: 13
######################################## Q6
# Write code that makes the output match what's described
dos = 2
print(dos + dos) # Output: 4
######################################## Q7
# Q: What does this program print out?
cats = 12
boxes = 12
print(cats+boxes) # A: 24
######################################## Q8
# Q: What does this program print out?
dogs = 12
cats = dogs
print(cats+dogs) # A: 24
######################################## Q9
# Q: What does this program print out?
mine = 10
yours = mine
mine = 1
print(yours) # A: 10
######################################## Q10
# Q: What does this program print out?
x = 10
y = x + 1
x = 2
print(x + y) # A: 13
######################################## Q11
# Q: What does this program print out?
start = 1
one = "1"
print(start + one) # A: "11"