diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/build-your-own-functions.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/build-your-own-functions.english.md index f782ffb87d..3e4f91f2f3 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/build-your-own-functions.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/build-your-own-functions.english.md @@ -18,19 +18,53 @@ More resources: ```yml question: - text: 'What will the following Python program print out?: -
def fred():
print("Zap")

def jane():
print("ABC")
-
-jane()
-fred()
-jane()
-
' + text: | + What will the following Python program print out?: + ```python + def fred(): + print("Zap") + def jane(): + print("ABC") + + jane() + fred() + jane() + ``` answers: - - 'Zap ABC jane fred jane' - - 'Zap ABC Zap' - - 'ABC Zap jane' - - 'ABC Zap ABC' - - 'Zap Zap Zap' + - | + Zap + + ABC + + jane + + fred + + jane + - | + Zap + + ABC + + Zap + - | + ABC + + Zap + + jane + - | + ABC + + Zap + + ABC + - | + Zap + + Zap + + Zap solution: 4 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/comparing-and-sorting-tuples.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/comparing-and-sorting-tuples.english.md index 6d90ceeaaf..691b223ee6 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/comparing-and-sorting-tuples.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/comparing-and-sorting-tuples.english.md @@ -18,13 +18,33 @@ More resources: ```yml question: - text: 'Which does the same thing as the following code?: -
lst = []
for key, val in counts.items():
newtup = (val, key)
lst.append(newtup)

lst = sorted(lst, reverse=True)
print(lst)
'
+  text: |
+    Which does the same thing as the following code?:
+    ```python
+    lst = []
+    for key, val in counts.items():
+        newtup = (val, key)
+        lst.append(newtup)
+    lst = sorted(lst, reverse=True)
+    print(lst)
+    ```
   answers:
-    - 'print( sorted( [ (k,v) for k,v in counts.items() ] ) )'
-    - 'print( [ (k,v) for k,v in counts.items().sorted() ] )'
-    - 'print( sorted( [ (k,v) for k,v in counts.keys() ] ) )'
-    - 'print( [ (k,v) for k,v in counts.values().sort() ] )'
+    - |
+        ```python
+        print( sorted( [ (v,k) for k,v in counts.items() ] ) )
+        ```
+    - |
+        ```python
+        print( [ (k,v) for k,v in counts.items().sorted() ] )
+        ```
+    - |
+        ```python
+        print( sorted( [ (v,k) for k,v in counts.keys() ] ) )
+        ```
+    - |
+        ```python
+        print( [ (k,v) for k,v in counts.values().sort() ] )
+        ```
   solution: 1
 ```
 
diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/conditional-execution.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/conditional-execution.english.md
index cb2e7d5256..8e1c03c34b 100644
--- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/conditional-execution.english.md
+++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/conditional-execution.english.md
@@ -17,12 +17,34 @@ videoId: gz_IfIsZQtc
 
 ```yml
 question:
-  text: 'Which code is indented correctly to print "Yes" if x = 0 and y = 10?'
+  text: |
+    Which code is indented correctly to print "Yes" if x = 0 and y = 10?
+
   answers:
-    - '
if 0 == x:
if y == 10:
print("Yes")
' - - '
if 0 == x:
if y == 10:
print("Yes")
' - - '
if 0 == x:
if y == 10:
print("Yes")
' - - '
if 0 == x:
if y == 10:
print("Yes")
' + - | + ```python + if 0 == x: + if y == 10: + print("Yes") + ``` + - | + ```python + if 0 == x: + if y == 10: + print("Yes") + ``` + - | + ```python + if 0 == x: + if y == 10: + print("Yes") + ``` + - | + ```python + if 0 == x: + if y == 10: + print("Yes") + ``` solution: 4 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/data-visualization-mailing-lists.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/data-visualization-mailing-lists.english.md index 6749395353..1e203580f0 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/data-visualization-mailing-lists.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/data-visualization-mailing-lists.english.md @@ -24,12 +24,18 @@ More resources: ```yml question: - text: 'Which is a common JavaScript visualization library?' + text: | + Which is a common JavaScript visualization library? + answers: - - 'DataViz.js' - - 'D3' - - 'Lowcharts' - - 'DATA6' + - | + DataViz.js + - | + D3 + - | + Lowcharts + - | + DATA6 solution: 2 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/data-visualization-page-rank.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/data-visualization-page-rank.english.md index 969c556074..b207a4ce9f 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/data-visualization-page-rank.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/data-visualization-page-rank.english.md @@ -17,11 +17,16 @@ videoId: 6-w_qIUwaxU ```yml question: - text: 'How does the page rank algorithm work?' + text: | + How does the PageRank algorithm work? + answers: - - 'It determines which pages are most highly connected.' - - 'It ranks pages based on view counts.' - - 'It figures out which pages contain the most important content.' + - | + It determines which pages are most highly connected. + - | + It ranks pages based on view counts. + - | + It figures out which pages contain the most important content. solution: 1 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/dictionaries-and-loops.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/dictionaries-and-loops.english.md index d1f8e31d9c..97748847d3 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/dictionaries-and-loops.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/dictionaries-and-loops.english.md @@ -18,14 +18,29 @@ More resources: ```yml question: - text: "What will the following code print?: -
counts = { 'chuck' : 1 , 'annie' : 42, 'jan': 100}
-for key in counts:
if counts[key] > 10 :
print(key, counts[key])
" + text: | + What will the following code print?: + ```python + counts = { 'chuck' : 1 , 'annie' : 42, 'jan': 100} + for key in counts: + if counts[key] > 10: + print(key, counts[key]) + ``` answers: - - 'annie 42
jan 100
' - - 'chuck 1
annie 42
jan 100' - - 'chuck 1' - - '[Error]' + - | + annie 42 + + jan 100 + - | + chuck 1 + + annie 42 + + jan 100 + - | + chuck 1 + - | + [Error] solution: 1 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/dictionaries-common-applications.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/dictionaries-common-applications.english.md index c099d1b0b0..10d9fbe101 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/dictionaries-common-applications.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/dictionaries-common-applications.english.md @@ -17,15 +17,23 @@ videoId: f17xPfIXct0 ```yml question: - text: "What will the following code print? -
counts = { 'quincy' : 1 , 'mrugesh' : 42, 'beau': 100, '0': 10}
-print(counts.get('kris', 0))
" + text: | + What will the following code print? + ```python + counts = { 'quincy' : 1 , 'mrugesh' : 42, 'beau': 100, '0': 10} + print(counts.get('kris', 0)) + ``` answers: - - '1' - - 'quincy' - - '0' - - '10' - - '[will return error]' + - | + 2 + - | + quincy + - | + 0 + - | + 10 + - | + [will return error] solution: 3 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/files-as-a-sequence.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/files-as-a-sequence.english.md index 1feabd9f12..2af093ff05 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/files-as-a-sequence.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/files-as-a-sequence.english.md @@ -18,12 +18,18 @@ More resources: ```yml question: - text: "What does the word 'continue' do in the middle of a loop?" + text: | + What does the word 'continue' do in the middle of a loop? + answers: - - 'Skips to the code directly after the loop.' - - 'Skips to the next line in the code.' - - 'Skips to the next iteration of the loop.' - - 'Skips the next block of code.' + - | + Skips to the code directly after the loop. + - | + Skips to the next line in the code. + - | + Skips to the next iteration of the loop. + - | + Skips the next block of code. solution: 3 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/intermediate-expressions.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/intermediate-expressions.english.md index 0b8f700a96..e673f5e1ac 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/intermediate-expressions.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/intermediate-expressions.english.md @@ -19,13 +19,24 @@ More resources: ```yml question: - text: 'What will print out after running this code:
width = 15
height = 12.0
print(height/3)
' + text: | + What will print out after running this code: + ```python + width = 15 + height = 12.0 + print(height/3) + ``` answers: - - '39' - - '4' - - '4.0' - - '5.0' - - '5' + - | + 39 + - | + 4 + - | + 4.0 + - | + 5.0 + - | + 5 solution: 3 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/intermediate-strings.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/intermediate-strings.english.md index d6b0504761..fec1aed169 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/intermediate-strings.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/intermediate-strings.english.md @@ -18,15 +18,23 @@ More resources: ```yml question: - text: 'What is the value of i in the following code? -
word = "bananana"
-i = word.find("na")
' + text: | + What is the value of i in the following code? + ```python + word = "bananana" + i = word.find("na") + ``` answers: - - 'nanana' - - '2' - - '3' - - 'True' - - 'na' + - | + nanana + - | + 2 + - | + 3 + - | + True + - | + na solution: 2 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/introduction-elements-of-python.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/introduction-elements-of-python.md index 4a3a92c93d..8bf9232d0a 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/introduction-elements-of-python.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/introduction-elements-of-python.md @@ -17,14 +17,20 @@ videoId: aRY_xjL35v0 ```yml question: - text: 'What will the following program print out: -
x = 43
-x = x + 1
-print(x)
' + text: | + What will the following program print out: + ```python + x = 43 + x = x + 1 + print(x) + ``` answers: - - 'x' - - 'x + 1' - - '44' + - | + x + - | + x + 1 + - | + 44 solution: 3 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/introduction-hardware-achitecture.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/introduction-hardware-achitecture.english.md index c52de0a336..0e28239fba 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/introduction-hardware-achitecture.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/introduction-hardware-achitecture.english.md @@ -21,11 +21,16 @@ videoId: H6qtjRTfSog ```yml question: - text: 'Where are your programs stored when they are running?' + text: | + Where are your programs stored when they are running? + answers: - - 'Hard Drive.' - - 'Memory.' - - 'Central Processing Unit.' + - | + Hard Drive. + - | + Memory. + - | + Central Processing Unit. solution: 2 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/introduction-python-as-a-language.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/introduction-python-as-a-language.english.md index f8c2780960..d2f9bca619 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/introduction-python-as-a-language.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/introduction-python-as-a-language.english.md @@ -21,13 +21,21 @@ videoId: 0QeGbZNS_bY ```yml question: - text: 'What will print out after running these two lines of code: -
x = 6
print(x)
' + text: | + What will print out after running these two lines of code: + ```python + x = 6 + print(x) + ``` answers: - - 'x' - - '6' - - 'x = 6' - - '(x)' + - | + x + - | + 6 + - | + x = 6 + - | + (x) solution: 2 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/introduction-why-program.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/introduction-why-program.english.md index 143b866e10..7bb9509ac3 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/introduction-why-program.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/introduction-why-program.english.md @@ -19,11 +19,16 @@ More resources: ```yml question: - text: 'Who should learn to program?' + text: | + Who should learn to program? + answers: - - 'College students.' - - 'People who want to become software developers.' - - 'Everyone.' + - | + College students. + - | + People who want to become software developers. + - | + Everyone. solution: 3 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/iterations-definite-loops.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/iterations-definite-loops.english.md index 06f24946d0..0f77171fb9 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/iterations-definite-loops.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/iterations-definite-loops.english.md @@ -17,13 +17,21 @@ videoId: hiRTRAqNlpE ```yml question: - text: 'How many lines will the following code print?: -
for i in [2,1,5]:
print(i)
' + text: | + How many lines will the following code print?: + ```python + for i in [2,1,5]: + print(i) + ``` answers: - - '1' - - '2' - - '3' - - '5' + - | + 1 + - | + 2 + - | + 3 + - | + 5 solution: 3 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/iterations-loop-idioms.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/iterations-loop-idioms.english.md index be4e36aac0..292d385910 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/iterations-loop-idioms.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/iterations-loop-idioms.english.md @@ -17,22 +17,27 @@ videoId: AelGAcoMXbI ```yml question: - text: 'Below is code to find the smallest value from a list of values. One line has an error that will cause the code to not work as expected. Which line is it?: -
-1|smallest = None
-2|print("Before:", smallest)
-3|for itervar in [3, 41, 12, 9, 74, 15]:
-4| if smallest is None or itervar < smallest:
-5| smallest = itervar
-6| break
-7| print("Loop:", itervar, smallest)
-8|print("Smallest:", smallest)
-
' + text: | + Below is code to find the smallest value from a list of values. One line has an error that will cause the code to not work as expected. Which line is it?: + ```python + smallest = None + print("Before:", smallest) + for itervar in [3, 41, 12, 9, 74, 15]: + if smallest is None or itervar < smallest: + smallest = itervar + break + print("Loop:", itervar, smallest) + print("Smallest:", smallest) + ``` answers: - - '3' - - '4' - - '6' - - '7' + - | + 3 + - | + 4 + - | + 6 + - | + 7 solution: 3 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/iterations-more-patterns.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/iterations-more-patterns.english.md index 545fd20b2d..f1eb148eb5 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/iterations-more-patterns.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/iterations-more-patterns.english.md @@ -18,12 +18,26 @@ More resources: ```yml question: - text: 'Which of these evaluates to False?' + text: | + Which of these evaluates to False? + answers: - - '0 == 0.0' - - '0 is 0.0' - - '0 is not 0.0' - - '0 = 0.0' + - | + ```python + 0 == 0.0 + ``` + - | + ```python + 0 is 0.0 + ``` + - | + ```python + 0 is not 0.0 + ``` + - | + ```python + 0 = 0.0 + ``` solution: 2 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/loops-and-iterations.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/loops-and-iterations.english.md index 5cb732a5f8..a5941ae9c4 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/loops-and-iterations.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/loops-and-iterations.english.md @@ -17,15 +17,41 @@ videoId: dLA-szNRnUY ```yml question: - text: 'What will the following code print out?: -
-n = 0
-while True:
if n == 3:
break
print(n)
n = n + 1
' + text: | + What will the following code print out?: + ```python + n = 0 + while True: + if n == 3: + break + print(n) + n = n + 1 + ``` answers: - - '0
1
2' - - '0
1
2
3' - - '1
2' - - '1
2
3' + - | + 0 + + 1 + + 2 + - | + 0 + + 1 + + 2 + + 3 + - | + 1 + + 2 + - | + 1 + + 2 + + 3 solution: 1 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/make-a-relational-database.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/make-a-relational-database.english.md index fe434b9947..aa53e3aae4 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/make-a-relational-database.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/make-a-relational-database.english.md @@ -17,13 +17,30 @@ videoId: MQ5z4bdF92U ```yml question: - text: 'What SQL command would you use to retrieve all users that have the email address quincy@freecodecamp.org?' + text: | + What SQL command would you use to retrieve all users that have the email address quincy@freecodecamp.org? + answers: - - 'SELECT Users WHERE email="quincy@freecodecamp.org"' - - 'SELECT Users WHERE email IS "quincy@freecodecamp.org"' - - 'SELECT ALL Users WHERE email="quincy@freecodecamp.org"' - - 'SELECT * FROM Users WHERE email IS "quincy@freecodecamp.org"' - - 'SELECT * FROM Users WHERE email="quincy@freecodecamp.org"' + - | + ``` + SELECT Users WHERE email="quincy@freecodecamp.org" + ``` + - | + ``` + SELECT Users WHERE email IS "quincy@freecodecamp.org" + ``` + - | + ``` + SELECT ALL Users WHERE email="quincy@freecodecamp.org" + ``` + - | + ``` + SELECT * FROM Users WHERE email IS "quincy@freecodecamp.org" + ``` + - | + ``` + SELECT * FROM Users WHERE email="quincy@freecodecamp.org" + ``` solution: 5 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/more-conditional-structures.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/more-conditional-structures.english.md index a4065815d7..4af3f04e1c 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/more-conditional-structures.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/more-conditional-structures.english.md @@ -19,23 +19,31 @@ More resources: ```yml question: - text: 'Given the following code:
-1 |temp = "5 degrees"
-2 |cel = 0
-3 |try:
-4 | fahr = float(temp)
-5 | cel = (fahr - 32.0) * 5.0 / 9.0
-6 |except:
-7 | print("temp should be a number")
-8 |print(cel)
-
-Which line would cause the script to immediately stop because of an error?' + text: | + Given the following code: + ```python + temp = "5 degrees" + cel = 0 + try: + fahr = float(temp) + cel = (fahr - 32.0) * 5.0 / 9.0 + except: + print("temp should be a number") + print(cel) + ``` + Which line would cause the script to immediately stop because of an error? + answers: - - '1' - - '4' - - '6' - - '7' - - 'None' + - | + 1 + - | + 4 + - | + 6 + - | + 7 + - | + None solution: 2 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-protocol.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-protocol.english.md index ff0b734463..737768a20f 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-protocol.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-protocol.english.md @@ -17,12 +17,18 @@ videoId: c6vZGescaSc ```yml question: - text: 'What type of HTTP request is usually used to access a website?' + text: | + What type of HTTP request is usually used to access a website? + answers: - - 'POST' - - 'GET' - - 'WEB' - - 'ACCESS' + - | + POST + - | + GET + - | + WEB + - | + ACCESS solution: 2 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-text-processing.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-text-processing.english.md index da55f4405c..8e123c87b4 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-text-processing.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-text-processing.english.md @@ -17,11 +17,16 @@ videoId: Pv_pJgVu8WI ```yml question: - text: 'Which type of encoding do most websites use?' + text: | + Which type of encoding do most websites use? + answers: - - 'UTF-8' - - 'UTF-16' - - 'UTF-32' + - | + UTF-8 + - | + UTF-16 + - | + UTF-32 solution: 1 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-using-urllib-in-python.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-using-urllib-in-python.md index f6bea376da..57702e3136 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-using-urllib-in-python.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-using-urllib-in-python.md @@ -17,15 +17,21 @@ videoId: 7lFM1T_CxBs ```yml question: - text: "What will the output of the following code be like?: -
import urllib.request
-
-fhand = urllib.request.urlopen('http://data.pr4e.org/romeo.txt')
-for line in fhand:
print(line.decode().strip())
" + text: | + What will the output of the following code be like?: + ```python + import urllib.request + fhand = urllib.request.urlopen('http://data.pr4e.org/romeo.txt') + for line in fhand: + print(line.decode().strip()) + ``` answers: - - 'Just contents of "romeo.txt".' - - 'A header and the contents of "romeo.txt".' - - 'A header, a footer, and the contents of "romeo.txt".' + - | + Just contents of "romeo.txt". + - | + A header and the contents of "romeo.txt". + - | + A header, a footer, and the contents of "romeo.txt". solution: 1 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-web-scraping-with-python.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-web-scraping-with-python.english.md index 9193ea16e3..73745be63b 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-web-scraping-with-python.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-web-scraping-with-python.english.md @@ -20,15 +20,24 @@ More resources: ```yml question: - text: 'What Python library is used for parsing HTML documents and extracting data from HTML documents?' + text: | + What Python library is used for parsing HTML documents and extracting data from HTML documents? + answers: - - 'socket' - - 'http' - - 'BeautifulSoup' - - 'PrettyBiscuit' - - 'WonderfulSalad' - - 'HttpParser' - - 'GrunkleStan' + - | + socket + - | + http + - | + BeautifulSoup + - | + PrettyBiscuit + - | + WonderfulSalad + - | + HttpParser + - | + GrunkleStan solution: 3 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-with-python.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-with-python.english.md index a9070163db..f21d627999 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-with-python.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-with-python.english.md @@ -17,12 +17,18 @@ videoId: _kJvneKVdNM ```yml question: - text: 'What Python library gives access to TCP Sockets?' + text: | + What Python library gives access to TCP Sockets? + answers: - - 'tcp' - - 'socket' - - 'http' - - 'port' + - | + tcp + - | + socket + - | + http + - | + port solution: 2 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-write-a-web-browser.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-write-a-web-browser.english.md index 7fa901c264..636436bfc8 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-write-a-web-browser.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/networking-write-a-web-browser.english.md @@ -30,17 +30,21 @@ question: while True: data = mysock.recv(512) - if len(data) < 1: - break - print(data.decode(),end='') + if len(data) < 1: + break + print(data.decode(),end='') mysock.close() ``` answers: - - 'A simple web server.' - - 'A simple email client.' - - 'A simple todo list.' - - 'A simple web browser.' + - | + A simple web server. + - | + A simple email client. + - | + A simple todo list. + - | + A simple web browser. solution: 4 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/object-lifecycle.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/object-lifecycle.english.md index 38b3a13142..4ccf906e3e 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/object-lifecycle.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/object-lifecycle.english.md @@ -17,20 +17,57 @@ videoId: p1r3h_AMMIM ```yml question: - text: "What will the following program print?: -
-class PartyAnimal:
x = 0
name = ''
def __init__(self, nam):
self.name = nam
print(self.name,'constructed')

def party(self):
self.x = self.x + 1
print(self.name,'party count',self.x)
-
-q = PartyAnimal('Quincy')
-m = PartyAnimal('Miya')
-
-q.party()
-m.party()
-q.party()" + text: | + What will the following program print?: + ```python + class PartyAnimal: + x = 0 + name = '' + def __init__(self, nam): + self.name = nam + print(self.name,'constructed') + def party(self): + self.x = self.x + 1 + print(self.name,'party count',self.x) + + q = PartyAnimal('Quincy') + m = PartyAnimal('Miya') + + q.party() + m.party() + q.party() + ``` answers: - - 'Quincy constructed
Miya constructed
Quincy party count 1
Miya party count 2
Quincy party count 3' - - 'Quincy constructed
Miya constructed
Quincy party count 1
Miya party count 1
Quincy party count 2' - - 'Quincy constructed
Quincy party count 1
Quincy party count 2
Miya constructed
Miya party count 1' + - | + Quincy constructed + + Miya constructed + + Quincy party count 1 + + Miya party count 2 + + Quincy party count 3 + - | + Quincy constructed + + Miya constructed + + Quincy party count 1 + + Miya party count 1 + + Quincy party count 2 + - | + Quincy constructed + + Quincy party count 1 + + Quincy party count 2 + + Miya constructed + + Miya party count 1 solution: 2 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/objects-a-sample-class.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/objects-a-sample-class.english.md index cf6da8fb01..fa59bf89b3 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/objects-a-sample-class.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/objects-a-sample-class.english.md @@ -17,17 +17,36 @@ videoId: FiABKEuaSJ8 ```yml question: - text: 'What will the following program print?: -
class PartyAnimal:
x = 0

def party(self) :
self.x = self.x + 2
print(self.x)
-
-an = PartyAnimal()
-an.party()
-an.party()
' + text: | + What will the following program print?: + ```python + class PartyAnimal: + x = 0 + def party(self): + self.x = self.x + 2 + print(self.x) + + an = PartyAnimal() + an.party() + an.party() + ``` answers: - - 'So far 1
So far 2' - - '0
0' - - '2
2' - - '1
2' + - | + So far 1 + + So far 2 + - | + 0 + + 0 + - | + 2 + + 2 + - | + 2 + + 4 solution: 4 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/objects-inheritance.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/objects-inheritance.english.md index 4bb4362c5f..0c99256bb1 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/objects-inheritance.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/objects-inheritance.english.md @@ -17,12 +17,18 @@ videoId: FBL3alYrxRM ```yml question: - text: 'What is inheritance in object-oriented programming?' + text: | + What is inheritance in object-oriented programming? + answers: - - 'A new class created when a parent class is extended.' - - 'A constructed instance of a class.' - - 'The ability to create a new class by extending an existing class.' - - 'A method that is called at the moment when a class is being used to construct an object. ' + - | + A new class created when a parent class is extended. + - | + A constructed instance of a class. + - | + The ability to create a new class by extending an existing class. + - | + A method that is called at the moment when a class is being used to construct an object. solution: 3 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/python-dictionaries.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/python-dictionaries.english.md index 3ddcde2c78..bec43aec23 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/python-dictionaries.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/python-dictionaries.english.md @@ -17,17 +17,35 @@ videoId: dnzvfimrRMg ```yml question: - text: 'What does dict equal after running this code?: -
dict = {"Fri": 20, "Thu": 6, "Sat": 1}
-dict["Thu"] = 13
-dict["Sat"] = 2
-dict["Sun"] = 9
' + text: | + What does dict equal after running this code?: + ```python + dict = {"Fri": 20, "Thu": 6, "Sat": 1} + dict["Thu"] = 13 + dict["Sat"] = 2 + dict["Sun"] = 9 + ``` answers: - - "{'Fri': 20, 'Thu': 6, 'Sat': 1}" - - "{'Fri': 20, 'Thu': 6, 'Sat': 1, 'Thu': 13, 'Sat': 2, 'Sun': 9}" - - "{'Sun': 9}" - - "{'Thu': 13, 'Sat': 2, 'Sun': 9}" - - "{'Fri': 20, 'Thu': 13, 'Sat': 2, 'Sun': 9}" + - | + ```python + {'Fri': 20, 'Thu': 6, 'Sat': 1} + ``` + - | + ```python + {'Fri': 20, 'Thu': 6, 'Sat': 1, 'Thu': 13, 'Sat': 2, 'Sun': 9} + ``` + - | + ```python + {'Sun': 9} + ``` + - | + ```python + {'Thu': 13, 'Sat': 2, 'Sun': 9} + ``` + - | + ```python + {'Fri': 20, 'Thu': 13, 'Sat': 2, 'Sun': 9} + ``` solution: 5 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/python-functions.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/python-functions.english.md index cbedee2052..4772398dc1 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/python-functions.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/python-functions.english.md @@ -17,13 +17,20 @@ videoId: 3JGF-n3tDPU ```yml question: - text: 'What is the purpose of the "def" keyword in Python?' + text: | + What is the purpose of the "def" keyword in Python? + answers: - - 'It is slang that means "The following code is really cool."' - - 'It indicates the start of a function.' - - 'It indicates that the following indented section of code is to be stored for later.' - - 'b and c are both true.' - - 'None of the above.' + - | + It is slang that means "The following code is really cool." + - | + It indicates the start of a function. + - | + It indicates that the following indented section of code is to be stored for later. + - | + It indicates the start of a function, and the following indented section of code is to be stored for later. + - | + None of the above. solution: 4 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/python-lists.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/python-lists.english.md index e1d5347944..a22db1c034 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/python-lists.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/python-lists.english.md @@ -17,14 +17,21 @@ videoId: Y0cvfDpYC_c ```yml question: - text: 'What is the value of x after running this code: -
fruit = "banana"
-x = fruit[1]
' + text: | + What is the value of x after running this code: + ```python + fruit = "banana" + x = fruit[1] + ``` answers: - - 'banana' - - 'a' - - 'b' - - 'True' + - | + banana + - | + a + - | + b + - | + True solution: 2 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/python-objects.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/python-objects.english.md index c799702eba..10deb7fc73 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/python-objects.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/python-objects.english.md @@ -17,12 +17,18 @@ videoId: uJxGeTYy0us ```yml question: - text: 'Which is NOT true about objects in Python?' + text: | + Which is NOT true about objects in Python? + answers: - - 'Objects get created and used.' - - 'Objects are bits of code and data.' - - 'Objects hide detail.' - - 'Objects are one of the five standard data types.' + - | + Objects get created and used. + - | + Objects are bits of code and data. + - | + Objects hide detail. + - | + Objects are one of the five standard data types. solution: 4 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/reading-files.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/reading-files.english.md index fe46072c97..40d2016624 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/reading-files.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/reading-files.english.md @@ -17,13 +17,20 @@ videoId: Fo1tW09KIwo ```yml question: - text: 'What is used to indicate a new line in a string?' + text: | + What is used to indicate a new line in a string? + answers: - - '\n' - - '{new_line}' - - '{n}' - - '/n' - - '/new' + - | + \n + - | + {new_line} + - | + {n} + - | + /n + - | + /new solution: 1 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/regular-expressions-matching-and-extracting-data.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/regular-expressions-matching-and-extracting-data.english.md index 3c6b807e80..de581d19e8 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/regular-expressions-matching-and-extracting-data.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/regular-expressions-matching-and-extracting-data.english.md @@ -17,17 +17,23 @@ videoId: LaCZnTbQGkE ```yml question: - text: "What will the following program print?: -
-import re
-s = 'A message from csev@umich.edu to cwen@iupui.edu about meeting @2PM'
-lst = re.findall('\\S+@\\S+', s)
-print(lst)
" + text: | + What will the following program print?: + ```python + import re + s = 'A message from csev@umich.edu to cwen@iupui.edu about meeting @2PM' + lst = re.findall('\\S+@\\S+', s) + print(lst) + ``` answers: - - "['csev@umich.edu', 'cwen@iupui.edu']" - - "['csev@umich.edu']" - - "['umich.edu', 'iupui.edu']" - - "['csev@', 'cwen@']" + - | + ['csev@umich.edu', 'cwen@iupui.edu'] + - | + ['csev@umich.edu'] + - | + ['umich.edu', 'iupui.edu'] + - | + ['csev@', 'cwen@'] solution: 1 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/regular-expressions-practical-applications.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/regular-expressions-practical-applications.english.md index 28ca38f88b..bf64f41a2d 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/regular-expressions-practical-applications.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/regular-expressions-practical-applications.english.md @@ -17,12 +17,18 @@ videoId: xCjFU9G6x48 ```yml question: - text: 'What will search for a "$" in a regular expression?' + text: | + What will search for a "$" in a regular expression? + answers: - - '$' - - '\dollar\' - - '\$' - - '!$' + - | + $ + - | + \dollar\ + - | + \$ + - | + !$ solution: 3 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/regular-expressions.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/regular-expressions.english.md index c78e2d5429..26ec69e373 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/regular-expressions.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/regular-expressions.english.md @@ -17,13 +17,20 @@ videoId: Yud_COr6pZo ```yml question: - text: 'Which regex matches a white space character?' + text: | + Which regex only matches a white space character? + answers: - - '\S' - - '\s' - - '.' - - '\_' - - '\.' + - | + \S + - | + \s + - | + . + - | + \_ + - | + \\. solution: 2 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/relational-database-design.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/relational-database-design.english.md index a0a1884ec9..ec556f55c5 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/relational-database-design.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/relational-database-design.english.md @@ -17,12 +17,18 @@ videoId: AqdfbrpkbHk ```yml question: - text: 'What is the best practice for how many times a piece of string data should be stored in a database?' + text: | + What is the best practice for how many times a piece of string data should be stored in a database? + answers: - - '0' - - '1' - - '2' - - '3' + - | + 0 + - | + 1 + - | + 2 + - | + 3 solution: 2 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/relational-databases-and-sqlite.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/relational-databases-and-sqlite.english.md index f3caf2e5c8..b942772da8 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/relational-databases-and-sqlite.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/relational-databases-and-sqlite.english.md @@ -17,12 +17,18 @@ videoId: QlNod5-kFpA ```yml question: - text: 'Which is NOT a primary data structure in a database?' + text: | + Which is NOT a primary data structure in a database? + answers: - - 'index' - - 'table' - - 'row' - - 'column' + - | + index + - | + table + - | + row + - | + column solution: 1 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/relational-databases-join-operation.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/relational-databases-join-operation.english.md index 1b49fe7869..b1c93d8c20 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/relational-databases-join-operation.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/relational-databases-join-operation.english.md @@ -17,11 +17,16 @@ videoId: jvDw3D9GKac ```yml question: - text: 'When using a JOIN clause in an SQL statement, what does ON do?' + text: | + When using a JOIN clause in an SQL statement, what does ON do? + answers: - - 'It indicates what tables to perform the JOIN on.' - - 'It specifies the fields to use for the JOIN.' - - 'It indicates how the two tables are to be joined.' + - | + It indicates what tables to perform the JOIN on. + - | + It specifies the fields to use for the JOIN. + - | + It indicates how the two tables are to be joined. solution: 3 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/relational-databases-many-to-many-relationships.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/relational-databases-many-to-many-relationships.english.md index 8de9048f00..4540179476 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/relational-databases-many-to-many-relationships.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/relational-databases-many-to-many-relationships.english.md @@ -22,12 +22,17 @@ More resources: ```yml question: - text: 'Which is an example of a many-to-many relationship?' + text: | + Which is an example of a many-to-many relationship? answers: - - 'teacher to student' - - 'customer to order' - - 'book to pages' - - 'city to country' + - | + teacher to student + - | + customer to order + - | + book to pages + - | + city to country solution: 1 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/relational-databases-relationship-building.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/relational-databases-relationship-building.english.md index 81a3e5dc87..1f3d3a3700 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/relational-databases-relationship-building.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/relational-databases-relationship-building.english.md @@ -17,11 +17,16 @@ videoId: A-t18zKJvmo ```yml question: - text: 'What does the INSERT command do in SQL?' + text: | + What does the INSERT command do in SQL? + answers: - - 'It defines a new row by listing the fields we want to include followed by the values we want placed in the new row.' - - 'It defines a new column by listing the rows we want to include followed by the values we want placed in the new column.' - - 'It defines a new table by listing the rows and fields we want to include followed by the values that we want placed in the table.' + - | + It defines a new row by listing the fields we want to include followed by the values we want placed in the new row. + - | + It defines a new column by listing the rows we want to include followed by the values we want placed in the new column. + - | + It defines a new table by listing the rows and fields we want to include followed by the values that we want placed in the table. solution: 1 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/representing-relationships-in-a-relational-database.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/representing-relationships-in-a-relational-database.english.md index e6664bb70d..5b3ee4aa3e 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/representing-relationships-in-a-relational-database.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/representing-relationships-in-a-relational-database.english.md @@ -17,12 +17,18 @@ videoId: -orenCNdC2Q ```yml question: - text: 'What is a foreign key?' + text: | + What is a foreign key? + answers: - - 'A key that is not supposed to be there.' - - 'A key that uses non-latin characters.' - - 'A number that points to the primary key of an associated row in a different table.' - - 'A key that the "real world" might use to look up a row.' + - | + A key that is not supposed to be there. + - | + A key that uses non-latin characters. + - | + A number that points to the primary key of an associated row in a different table. + - | + A key that the "real world" might use to look up a row. solution: 3 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/strings-and-lists.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/strings-and-lists.english.md index e85f648153..88eda5d680 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/strings-and-lists.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/strings-and-lists.english.md @@ -18,16 +18,23 @@ More resources: ```yml question: - text: "What does n equal in this code? -
words = 'His e-mail is q-lar@freecodecamp.org'
-pieces = words.split()
-parts = pieces[3].split('-')
-n = parts[1]
" + text: | + What does n equal in this code? + ```python + words = 'His e-mail is q-lar@freecodecamp.org' + pieces = words.split() + parts = pieces[3].split('-') + n = parts[1] + ``` answers: - - 'mail' - - 'q' - - 'lar' - - 'lar@freecodecamp.org' + - | + mail + - | + q + - | + lar + - | + lar@freecodecamp.org solution: 4 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/strings-in-python.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/strings-in-python.english.md index cbba92c594..c6e7e3718a 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/strings-in-python.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/strings-in-python.english.md @@ -17,13 +17,45 @@ videoId: LYZj207fKpQ ```yml question: - text: 'What will the following code print?: -
for n in "banana":
print(n)
' + text: | + What will the following code print?: + ```python + for n in "banana": + print(n) + ``` answers: - - 'n
n' - - '0
1' - - '0
1
2
3
4
5' - - 'b
a
n
a
n
a' + - | + n + + n + - | + 0 + + 1 + - | + 0 + + 1 + + 2 + + 3 + + 4 + + 5 + - | + b + + a + + n + + a + + n + + a solution: 4 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/the-tuples-collection.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/the-tuples-collection.english.md index d70d45b0b3..9a9fb76567 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/the-tuples-collection.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/the-tuples-collection.english.md @@ -17,13 +17,41 @@ videoId: 3Lxpladfh2k ```yml question: - text: "What will the following code print?: -
d = dict()
d['quincy'] = 1
d['beau'] = 5
d['kris'] = 9
for (k,i) in d.items():
print(k, i)
" + text: | + What will the following code print?: + ```python + d = dict() + d['quincy'] = 1 + d['beau'] = 5 + d['kris'] = 9 + for (k,i) in d.items(): + print(k, i) + ``` answers: - - 'k i
k i
k i' - - 'quincy 0
beau 1
kris 2' - - 'quincy 1
beau 5
kris 9' - - '1 quincy
5 beau
9 kris' + - | + k i + + k i + + k i + - | + quincy 0 + + beau 1 + + kris 2 + - | + quincy 1 + + beau 5 + + kris 9 + - | + 1 quincy + + 5 beau + + 9 kris solution: 3 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/using-web-services.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/using-web-services.english.md index 1ed8f9ae1a..0aa9f4edca 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/using-web-services.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/using-web-services.english.md @@ -17,13 +17,20 @@ videoId: oNl1OVDPGKE ```yml question: - text: 'What are the two most common ways to send data over the internet?' + text: | + What are the two most common ways to send data over the internet? + answers: - - 'JSON and TXT' - - 'JSON and XML' - - 'XML and TXT' - - 'XML and PHP' - - 'PHP and TXT' + - | + JSON and TXT + - | + JSON and XML + - | + XML and TXT + - | + XML and PHP + - | + PHP and TXT solution: 2 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/variables-expressions-and-statements.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/variables-expressions-and-statements.english.md index 7ad652d8aa..3963231d6c 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/variables-expressions-and-statements.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/variables-expressions-and-statements.english.md @@ -17,12 +17,18 @@ videoId: nELR-uyyrok ```yml question: - text: 'What is the symbol is used in an assignment statement?' + text: | + What is the symbol used in an assignment statement? + answers: - - '~' - - '&' - - '=' - - '|' + - | + ~ + - | + & + - | + = + - | + | solution: 3 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/visualizing-data-with-python.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/visualizing-data-with-python.english.md index 930b92f159..5ba8be5b63 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/visualizing-data-with-python.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/visualizing-data-with-python.english.md @@ -17,13 +17,20 @@ videoId: e3lydkH0prw ```yml question: - text: 'Most data needs to be ______ before using it.' + text: | + Most data needs to be ______ before using it. + answers: - - 'converted to JSON format' - - 'graphed' - - 'cleaned' - - 'memorized' - - 'turned into song' + - | + converted to JSON format + - | + graphed + - | + cleaned + - | + memorized + - | + turned into song solution: 3 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-api-rate-limiting-and-security.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-api-rate-limiting-and-security.english.md index a5f97cd0c5..1c26da1bc4 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-api-rate-limiting-and-security.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-api-rate-limiting-and-security.english.md @@ -21,12 +21,18 @@ More resources: ```yml question: - text: 'When making a request from the Twitter API, what information must always be sent with the request?' + text: | + When making a request from the Twitter API, what information must always be sent with the request? + answers: - - 'Twitter username' - - 'date range' - - 'search term' - - 'key' + - | + Twitter username + - | + date range + - | + search term + - | + key solution: 4 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-apis.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-apis.english.md index c207da90f0..b63081b666 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-apis.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-apis.english.md @@ -17,12 +17,18 @@ videoId: oUNn1psfBJg ```yml question: - text: 'What does API stand for?' + text: | + What does API stand for? + answers: - - 'Application Portable Intelligence' - - 'Associate Programming International' - - 'Application Program Interface' - - 'Action Portable Interface' + - | + Application Portable Intelligence + - | + Associate Programming International + - | + Application Program Interface + - | + Action Portable Interface solution: 3 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-json.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-json.english.md index d9a19a7b4e..2dc0372136 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-json.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-json.english.md @@ -17,19 +17,36 @@ videoId: ZJE-U56BppM ```yml question: - text: "What will the following code print?: -
import json
-
-data = '''
[
{ 'id' : '001',
'x' : '2',
'name' : 'Quincy'
} ,
{ 'id' : '009',
'x' : '7',
'name' : 'Mrugesh'
}
]'''
-
-info = json.loads(data)
-print(info[1]['name'])
" + text: | + What will the following code print?: + ```python + import json + data = ''' + [ + { 'id' : '001', + 'x' : '2', + 'name' : 'Quincy' + } , + { 'id' : '009', + 'x' : '7', + 'name' : 'Mrugesh' + } + ] + ''' + info = json.loads(data) + print(info[1]['name']) + ``` answers: - - 'Quincy' - - 'Mrugesh' - - '001' - - '009' - - '[Error]' + - | + Quincy + - | + Mrugesh + - | + 001 + - | + 009 + - | + [Error] solution: 2 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-service-oriented-approach.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-service-oriented-approach.english.md index 5d676f58d1..6b851863ea 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-service-oriented-approach.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-service-oriented-approach.english.md @@ -17,11 +17,16 @@ videoId: muerlsCHExI ```yml question: - text: 'With a services oriented approach to developing web apps, where is the data located?' + text: | + With a services oriented approach to developing web apps, where is the data located? + answers: - - 'Spread across many computer systems connected via the internet or internal network.' - - 'Within different services on the main web server.' - - 'On a separate database server.' + - | + Spread across many computer systems connected via the internet or internal network. + - | + Within different services on the main web server. + - | + On a separate database server. solution: 1 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-xml-schema.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-xml-schema.english.md index a69556a640..8e3eb9400d 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-xml-schema.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-xml-schema.english.md @@ -17,11 +17,16 @@ videoId: yWU9kTxW-nc ```yml question: - text: 'What is XSD?' + text: | + What is XSD? + answers: - - 'The W3C Schema specification for XML.' - - 'The standard JSON schema from MOZ.' - - 'Extensible Situational Driver' + - | + The W3C Schema specification for XML. + - | + The standard JSON schema from MOZ. + - | + Extensible Situational Driver solution: 1 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-xml.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-xml.english.md index 573f321639..fa0e824ab3 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-xml.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/web-services-xml.english.md @@ -17,17 +17,25 @@ videoId: _pZ0srbg7So ```yml question: - text: 'What is wrong with the following XML?: -
<person>
-<name>Chuck</name>
-<phone type="intl">
+1 734 303 4456
-<email hide="yes" />
-</person>
' + text: | + What is wrong with the following XML?: + ```xml + + Chuck + + +1 734 303 4456 + + + ``` answers: - - 'Email tag is missing closing tag.' - - 'Spacing will cause XML to be invalid.' - - 'Phone tag is missing closing tag.' - - 'Plain text should be encoded using UTF-8.' + - | + Email tag is missing closing tag. + - | + Spacing will cause XML to be invalid. + - | + Phone tag is missing closing tag. + - | + Plain text should be encoded using UTF-8. solution: 3 ``` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/working-with-lists.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/working-with-lists.english.md index 1bedc26dbf..8c30d5b12e 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/working-with-lists.english.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/working-with-lists.english.md @@ -17,12 +17,18 @@ videoId: lCnHfTHkhbE ```yml question: - text: 'Which method is used to add an item at the end of a list?' + text: | + Which method is used to add an item at the end of a list? + answers: - - 'insert' - - 'push' - - 'append' - - 'new' + - | + insert + - | + push + - | + append + - | + new solution: 3 ```