From 3567813c51216a4c8efd59540ffe0fed48582da2 Mon Sep 17 00:00:00 2001 From: Kristofer Koishigawa Date: Thu, 28 May 2020 22:40:36 +0900 Subject: [PATCH] feat(curriculum): add python multiple choice questions (#38890) --- .../python-for-penetration-testing/meta.json | 2 +- .../build-your-own-functions.english.md | 2 +- .../comparing-and-sorting-tuples.english.md | 2 +- .../dictionaries-and-loops.english.md | 2 +- .../files-as-a-sequence.english.md | 10 ++-- .../iterations-definite-loops.english.md | 2 +- .../iterations-loop-idioms.english.md | 4 +- .../loops-and-iterations.english.md | 2 +- .../networking-using-urllib-in-python.md | 6 +-- ...orking-web-scraping-with-python.english.md | 2 +- .../networking-write-a-web-browser.english.md | 36 +++++++++----- .../object-lifecycle.english.md | 2 +- .../objects-a-sample-class.english.md | 2 +- .../python-dictionaries.english.md | 2 +- .../python-functions.english.md | 10 ++-- .../python-objects.english.md | 8 +-- ...ns-matching-and-extracting-data.english.md | 2 +- .../relational-database-design.english.md | 2 +- ...relational-databases-and-sqlite.english.md | 2 +- .../strings-in-python.english.md | 2 +- .../the-tuples-collection.english.md | 2 +- .../web-services-apis.english.md | 2 +- .../web-services-json.english.md | 2 +- ...vices-service-oriented-approach.english.md | 2 +- .../web-services-xml.english.md | 2 +- ...ata-cleaning-and-visualizations.english.md | 3 +- .../data-cleaning-duplicates.english.md | 3 +- .../data-cleaning-introduction.english.md | 37 ++++++++++++-- .../data-cleaning-with-dataframes.english.md | 46 +++++++++++++++-- ...-to-use-jupyter-notebooks-intro.english.md | 8 +-- .../introduction-to-data-analysis.english.md | 11 +++-- ...ks-importing-and-exporting-data.english.md | 12 +++-- .../numpy-arrays.english.md | 30 ++++++++++-- .../numpy-boolean-arrays.english.md | 18 +++++-- .../numpy-introduction-a.english.md | 10 ++-- .../numpy-introduction-b.english.md | 12 +++-- .../numpy-operations.english.md | 17 +++++-- ...ection-and-modifying-dataframes.english.md | 49 +++++++++++++++++-- .../pandas-creating-columns.english.md | 34 +++++++++++-- .../pandas-dataframes.english.md | 40 +++++++++++++-- ...exing-and-conditional-selection.english.md | 39 +++++++++++++-- .../pandas-introduction.english.md | 44 +++++++++++++++-- ...ython-functions-and-collections.english.md | 10 ++-- .../reading-data-from-databases.english.md | 6 +-- .../reading-data-introduction.english.md | 33 +++++++++++-- ...hanging-elements,-rows,-columns.english.md | 22 +++++++-- .../numpy/basics-of-numpy.english.md | 2 +- .../numpy/copying-arrays-warning.english.md | 23 +++++++-- .../numpy/initialize-array-problem.english.md | 44 +++++++++++++++-- .../initializing-different-arrays.english.md | 28 +++++++++-- ...ding-data-and-advanced-indexing.english.md | 39 +++++++++++++-- .../numpy/mathematics.english.md | 20 ++++++-- .../numpy/reorganizing-arrays.english.md | 33 +++++++++++-- .../numpy/what-is-numpy.english.md | 11 +++-- .../creating-a-tcp-client.english.md | 15 ++++-- .../developing-a-banner-grabber.english.md | 20 ++++++-- .../developing-a-port-scanner.english.md | 12 +++-- ...veloping-an-nmap-scanner-part-1.english.md | 13 +++-- ...veloping-an-nmap-scanner-part-2.english.md | 32 ++++++++++++ ...eloping-and-nmap-scanner-part-2.english.md | 27 ---------- .../introduction-and-setup.english.md | 12 +++-- ...ckets-and-creating-a-tcp-server.english.md | 13 +++-- .../deep-learning-demystified.english.md | 12 +++-- ...volutional-neural-networks-work.english.md | 11 +++-- .../how-deep-neural-networks-work.english.md | 11 +++-- ...and-long-short-term-memory-lstm.english.md | 10 ++-- .../tensorflow/conclusion.english.md | 11 +++-- ...l-networks-evaluating-the-model.english.md | 8 +-- ...orks-picking-a-pretrained-model.english.md | 34 +++++++++++-- ...etworks-the-convolutional-layer.english.md | 10 ++-- .../convolutional-neural-networks.english.md | 9 ++-- ...g-algorithms-building-the-model.english.md | 13 +++-- ...rning-algorithms-classification.english.md | 10 ++-- ...-learning-algorithms-clustering.english.md | 12 +++-- ...algorithms-hidden-markov-models.english.md | 10 ++-- ...algorithms-the-training-process.english.md | 10 ++-- ...ithms-training-and-testing-data.english.md | 10 ++-- ...obabilities-to-make-predictions.english.md | 11 +++-- ...ng-algorithms-working-with-data.english.md | 9 ++-- .../core-learning-algorithms.english.md | 14 ++++-- ...-a-convolutional-neural-network.english.md | 35 +++++++++++-- ...n-machine-learning-fundamentals.english.md | 11 +++-- .../introduction-to-tensorflow.english.md | 12 +++-- ...ng-with-rnns-building-the-model.english.md | 45 +++++++++++++++-- ...th-rnns-create-a-play-generator.english.md | 26 ++++++++-- ...ng-with-rnns-making-predictions.english.md | 11 +++-- ...age-processing-with-rnns-part-2.english.md | 9 ++-- ...-rnns-recurring-neural-networks.english.md | 15 ++++-- ...-with-rnns-sentimental-analysis.english.md | 33 +++++++++++-- ...ng-with-rnns-training-the-model.english.md | 39 +++++++++++++-- ...l-language-processing-with-rnns.english.md | 11 +++-- ...l-networks-activation-functions.english.md | 10 ++-- ...eural-networks-creating-a-model.english.md | 35 +++++++++++-- .../neural-networks-optimizers.english.md | 10 ++-- ...neural-networks-with-tensorflow.english.md | 9 ++-- ...earning-with-q-learning-example.english.md | 31 ++++++++++-- ...learning-with-q-learning-part-2.english.md | 9 ++-- ...cement-learning-with-q-learning.english.md | 10 ++-- 98 files changed, 1118 insertions(+), 398 deletions(-) create mode 100644 curriculum/challenges/english/09-information-security/python-for-penetration-testing/developing-an-nmap-scanner-part-2.english.md delete mode 100644 curriculum/challenges/english/09-information-security/python-for-penetration-testing/developing-and-nmap-scanner-part-2.english.md diff --git a/curriculum/challenges/_meta/python-for-penetration-testing/meta.json b/curriculum/challenges/_meta/python-for-penetration-testing/meta.json index 89eecdc9b3..b303790da1 100644 --- a/curriculum/challenges/_meta/python-for-penetration-testing/meta.json +++ b/curriculum/challenges/_meta/python-for-penetration-testing/meta.json @@ -26,7 +26,7 @@ ], [ "5ea9997bbec2e9bc47e94db2", - "Developing and Nmap Scanner part 2" + "Developing an Nmap Scanner part 2" ], [ "5ea9997bbec2e9bc47e94db3", 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 b32cc4550b..f782ffb87d 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,7 +18,7 @@ More resources: ```yml question: - text: 'What will the following Python program print out? + text: 'What will the following Python program print out?:
def fred():
print("Zap")

def jane():
print("ABC")

jane()
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 ce1e67d573..6d90ceeaaf 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,7 +18,7 @@ More resources: ```yml question: - text: 'Which does the same thing as the following code: + 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)
'
   answers:
     - 'print( sorted( [ (k,v) for k,v in counts.items() ] ) )'
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 acb7d8ad33..d1f8e31d9c 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,7 +18,7 @@ More resources:
 
 ```yml
 question:
-  text: "What will the following code print?
+  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])
" answers: 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 26f24e68ff..1feabd9f12 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,12 @@ 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/iterations-definite-loops.english.md b/curriculum/challenges/english/07-scientific-computing-with-python/python-for-everybody/iterations-definite-loops.english.md index b9b241098a..06f24946d0 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,7 +17,7 @@ videoId: hiRTRAqNlpE ```yml question: - text: 'How many lines will the following code print? + text: 'How many lines will the following code print?:
for i in [2,1,5]:
print(i)
' answers: - '1' 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 85c7f575b3..be4e36aac0 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,12 +17,12 @@ 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? + 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:
+4| if smallest is None or itervar < smallest:
5| smallest = itervar
6| break
7| print("Loop:", itervar, smallest)
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 222b42832f..5cb732a5f8 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,7 +17,7 @@ videoId: dLA-szNRnUY ```yml question: - text: 'What will the following code print out: + text: 'What will the following code print out?:
 n = 0
while True:
if n == 3:
break
print(n)
n = n + 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 d18fd914bc..f6bea376da 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,15 @@ videoId: 7lFM1T_CxBs ```yml question: - text: "What will the output of the following code be like: + 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())
" answers: - 'Just contents of "romeo.txt".' - - 'A header and the contents of "romeo.txt"' - - 'A header, a footer, and the 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 0bb9f9fec6..9193ea16e3 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,7 +20,7 @@ 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' 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 afe21683e3..7fa901c264 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 @@ -17,20 +17,30 @@ videoId: zjyT9DaAjx4 ```yml question: - text: "What does the following code create? -
-import socket
-
-mysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-mysock.connect(('data.pr4e.org', 80))
-cmd = 'GET http://data.pr4e.org/romeo.txt HTTP/1.0\r\n\r\n'.encode()
-mysock.send(cmd)
-
while True:
data = mysock.recv(512)
if len(data) < 1:
break
print(data.decode(),end='')

mysock.close()
" + text: | + What does the following code create?: + + ```py + import socket + + mysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + mysock.connect(('data.pr4e.org', 80)) + cmd = 'GET http://data.pr4e.org/romeo.txt HTTP/1.0\r\n\r\n'.encode() + mysock.send(cmd) + + while True: + data = mysock.recv(512) + if len(data) < 1: + break + print(data.decode(),end='') + mysock.close() + ``` + answers: - - 'simple web server' - - 'simple email client' - - 'simple todo list' - - '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 8f4e6befca..38b3a13142 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,7 +17,7 @@ videoId: p1r3h_AMMIM ```yml question: - text: "What will the following program print: + 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)

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 51b2e0e5a5..cf6da8fb01 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,7 +17,7 @@ videoId: FiABKEuaSJ8 ```yml question: - text: 'What will the following program print: + text: 'What will the following program print?:
class PartyAnimal:
x = 0

def party(self) :
self.x = self.x + 2
print(self.x)

an = PartyAnimal()
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 eddf06fa84..3ddcde2c78 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,7 +17,7 @@ videoId: dnzvfimrRMg ```yml question: - text: 'What does dict equal after running this code? + text: 'What does dict equal after running this code?:
dict = {"Fri": 20, "Thu": 6, "Sat": 1}
dict["Thu"] = 13
dict["Sat"] = 2
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 9b1a573413..cbedee2052 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 @@ -19,11 +19,11 @@ videoId: 3JGF-n3tDPU question: 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.' + - 'b and c are both true.' + - 'None of the above.' solution: 4 ``` 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 ea6b6349b6..c799702eba 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 @@ -19,10 +19,10 @@ videoId: uJxGeTYy0us question: 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/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 eadd4a0ec3..3c6b807e80 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,7 +17,7 @@ videoId: LaCZnTbQGkE ```yml question: - text: "What will the following program print: + text: "What will the following program print?:
 import re
s = 'A message from csev@umich.edu to cwen@iupui.edu about meeting @2PM'
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 5f10de1a2d..a0a1884ec9 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,7 +17,7 @@ videoId: AqdfbrpkbHk ```yml question: - text: 'What is the best practice for how many times a peice 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' 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 710c3d6480..f3caf2e5c8 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,7 +17,7 @@ videoId: QlNod5-kFpA ```yml question: - text: 'Which is NOT a primary data structures in a database?' + text: 'Which is NOT a primary data structure in a database?' answers: - 'index' - 'table' 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 1f1fbb4387..cbba92c594 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,7 +17,7 @@ videoId: LYZj207fKpQ ```yml question: - text: 'What will the following code print? + text: 'What will the following code print?:
for n in "banana":
print(n)
' answers: - 'n
n' 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 3d832ecc6c..d70d45b0b3 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,7 +17,7 @@ videoId: 3Lxpladfh2k ```yml question: - text: "What will the following code print? + 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)
" answers: - 'k i
k i
k i' 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 5c27ec6061..c207da90f0 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 @@ -20,7 +20,7 @@ question: text: 'What does API stand for?' answers: - 'Application Portable Intelligence' - - 'Accociate Programming International' + - '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 ee1d2fd071..d9a19a7b4e 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,7 +17,7 @@ videoId: ZJE-U56BppM ```yml question: - text: "What will the following code print? + text: "What will the following code print?:
import json

data = '''
[
{ 'id' : '001',
'x' : '2',
'name' : 'Quincy'
} ,
{ 'id' : '009',
'x' : '7',
'name' : 'Mrugesh'
}
]'''
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 ee07d0bc2c..5d676f58d1 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,7 +17,7 @@ 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.' 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 7368b22568..573f321639 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,7 +17,7 @@ videoId: _pZ0srbg7So ```yml question: - text: 'What is wrong with the following XML? + text: 'What is wrong with the following XML?:
<person>
<name>Chuck</name>
<phone type="intl">
+1 734 303 4456
diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-and-visualizations.english.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-and-visualizations.english.md index f7002e4582..9063dc4e48 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-and-visualizations.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-and-visualizations.english.md @@ -15,7 +15,8 @@ videoId: mHjxzFS5_Z0 ```yml question: - text: 'When using Matplotlib''s global API, what does the order of numbers mean here
plt.subplot(1, 2, 1)
' + text: | + When using Matplotlib's global API, what does the order of numbers mean here?: `plt.subplot(1, 2, 1)` answers: - 'My figure will have one column, two rows, and I am going to start drawing in the first (left) plot.' - 'I am going to start drawing in the first (left) plot, my figure will have two rows, and my figure will have one column.' diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-duplicates.english.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-duplicates.english.md index 14e2c2bb41..6bb293d3a2 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-duplicates.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-duplicates.english.md @@ -15,7 +15,8 @@ videoId: kj7QqjXhH6A ```yml question: - text: 'The Python method .duplicated() returns a boolean Series for your DataFrame. True is the return value for rows that:' + text: | + The Python method `.duplicated()` returns a boolean Series for your DataFrame. `True` is the return value for rows that: answers: - contain a duplicate, where the value for the row contains the first occurrence of that value. - contain a duplicate, where the value for the row is at least the second occurrence of that value. diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-introduction.english.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-introduction.english.md index 8b30bd555a..9d3c70b651 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-introduction.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-introduction.english.md @@ -15,12 +15,39 @@ videoId: ovYNhnltVxY ```yml question: - text: Question + text: | + What will the following code print out?: + + ```py + import pandas as pd + import numpy as np + + s = pd.Series(['a', 3, np.nan, 1, np.nan]) + + print(s.notnull().sum()) + ``` + answers: - - one - - two - - three - solution: 3 + - '3' + - | + ``` + 0 True + 1 True + 2 False + 3 True + 4 False + dtype: bool + ``` + - | + ``` + 0 False + 1 False + 2 True + 3 False + 4 True + dtype: bool + ``` + solution: 1 ``` diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-with-dataframes.english.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-with-dataframes.english.md index 851e5d32d1..4be3b3f83f 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-with-dataframes.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-with-dataframes.english.md @@ -15,12 +15,48 @@ videoId: sTMN_pdI6S0 ```yml question: - text: Question + text: | + What will the following code print out?: + + ```py + import pandas as pd + import numpy as np + + s = pd.Series([np.nan, 1, 2, np.nan, 3]) + s = s.fillna(method='ffill') + + print(s) + ``` + answers: - - one - - two - - three - solution: 3 + - | + ``` + 0 1.0 + 1 1.0 + 2 2.0 + 3 3.0 + 4 3.0 + dtype: float64 + ``` + - | + ``` + 0 NaN + 1 1.0 + 2 2.0 + 3 2.0 + 4 3.0 + dtype: float64 + ``` + - | + ``` + 0 NaN + 1 1.0 + 2 2.0 + 3 NaN + 4 3.0 + dtype: float64 + ``` + solution: 2 ``` diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/how-to-use-jupyter-notebooks-intro.english.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/how-to-use-jupyter-notebooks-intro.english.md index da23029454..2bd89d90be 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/how-to-use-jupyter-notebooks-intro.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/how-to-use-jupyter-notebooks-intro.english.md @@ -15,11 +15,11 @@ videoId: h8caJq2Bb9w ```yml question: - text: Question + text: What is *not* allowed in a Jupyter Notebook's cell? answers: - - one - - two - - three + - "Markdown" + - "Python code" + - "An Excel sheet" solution: 3 ``` diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/introduction-to-data-analysis.english.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/introduction-to-data-analysis.english.md index 869a163dc4..fd486822a1 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/introduction-to-data-analysis.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/introduction-to-data-analysis.english.md @@ -15,12 +15,13 @@ videoId: VJrP2FUzKP0 ```yml question: - text: Question + text: "Why should you choose R over Python for data analysis?" answers: - - one - - two - - three - solution: 3 + - "It's simple to learn." + - "It's better at dealing with advanced statistical methods." + - "There are many powerful libraries that support R." + - "It's free and open source." + solution: 2 ``` diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/jupyter-notebooks-importing-and-exporting-data.english.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/jupyter-notebooks-importing-and-exporting-data.english.md index 22e566be07..38b0a340dc 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/jupyter-notebooks-importing-and-exporting-data.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/jupyter-notebooks-importing-and-exporting-data.english.md @@ -15,12 +15,14 @@ videoId: k1msxD3JIxE ```yml question: - text: Question + text: "What kind of data can you import and work with in a Jupyter Notebook?" answers: - - one - - two - - three - solution: 3 + - "Excel files." + - "CSV files." + - "XML files." + - "Data from an API." + - "All of the above." + solution: 5 ``` diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/numpy-arrays.english.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/numpy-arrays.english.md index 18aef81115..546de8101e 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/numpy-arrays.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/numpy-arrays.english.md @@ -15,11 +15,33 @@ videoId: VDYVFHBL1AM ```yml question: - text: Question + text: | + What will the following code print out?: + + ```py + A = np.array([ + ['a', 'b', 'c'], + ['d', 'e', 'f'], + ['g', 'h', 'i'] + ]) + + print(A[:, :2]) + ``` + answers: - - one - - two - - three + - "[['a' 'b']]" + - | + ``` + [['b' 'c'] + ['e' 'f'] + ['h' 'i']] + ``` + - | + ``` + [['a' 'b'] + ['d' 'e'] + ['g' 'h']] + ``` solution: 3 ``` diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/numpy-boolean-arrays.english.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/numpy-boolean-arrays.english.md index 2a05a9d8f2..c4044109ba 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/numpy-boolean-arrays.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/numpy-boolean-arrays.english.md @@ -15,12 +15,20 @@ videoId: N1ttsMmcVMM ```yml question: - text: Question + text: | + What will the following code print out?: + + ```py + a = np.arange(5) + + print(a <= 3) + ``` answers: - - one - - two - - three - solution: 3 + - "[False, False, False, False, True]" + - "[5]" + - "[0, 1, 2, 3]" + - "[True, True, True, True, False]" + solution: 4 ``` diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/numpy-introduction-a.english.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/numpy-introduction-a.english.md index dc07ea469e..b4c320cb13 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/numpy-introduction-a.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/numpy-introduction-a.english.md @@ -15,12 +15,12 @@ videoId: P-JjV6GBCmk ```yml question: - text: Question + text: "Why is Numpy an important, but unpopular Python library?" answers: - - one - - two - - three - solution: 3 + - "Often you won't work directly with Numpy." + - "It's is extremely slow." + - "Working with Numpy is difficult." + solution: 1 ``` diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/numpy-introduction-b.english.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/numpy-introduction-b.english.md index 0b3b533652..e958bca3b1 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/numpy-introduction-b.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/numpy-introduction-b.english.md @@ -15,12 +15,14 @@ videoId: YIqgrNLAZkA ```yml question: - text: Question + text: | + About how much memory does the integer `5` consume in plain Python? answers: - - one - - two - - three - solution: 3 + - 32 bits + - 20 bytes + - 16 bytes + - 8 bits + solution: 2 ``` diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/numpy-operations.english.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/numpy-operations.english.md index 5ec07436ee..a3946316a5 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/numpy-operations.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/numpy-operations.english.md @@ -15,12 +15,19 @@ videoId: eqSVcJbaPdk ```yml question: - text: Question + text: | + What is the value of `a` after you run the following code?: + + ```py + a = np.arange(5) + a + 20 + ``` + answers: - - one - - two - - three - solution: 3 + - "[20, 21, 22, 24, 24]" + - "[0, 1, 2, 3, 4, 5]" + - "[25, 26, 27, 28, 29]" + solution: 2 ``` diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-condtitional-selection-and-modifying-dataframes.english.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-condtitional-selection-and-modifying-dataframes.english.md index 21512f5545..59093356bc 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-condtitional-selection-and-modifying-dataframes.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-condtitional-selection-and-modifying-dataframes.english.md @@ -15,12 +15,51 @@ videoId: BFlH0fN5xRQ ```yml question: - text: Question + text: | + What will the following code print out?: + + ```py + import pandas as pd + + certificates_earned = pd.DataFrame({ + 'Certificates': [8, 2, 5, 6], + 'Time (in months)': [16, 5, 9, 12] + }) + names = ['Tom', 'Kris', 'Ahmad', 'Beau'] + + certificates_earned.index = names + longest_streak = pd.Series([13, 11, 9, 7], index=names) + certificates_earned['Longest streak'] = longest_streak + + print(certificates_earned) + ``` + answers: - - one - - two - - three - solution: 3 + - | + ``` + Tom 13 + Kris 11 + Ahmad 9 + Beau 7 + Name: Longest streak, dtype: int64 + ``` + - | + ``` + Certificates Time (in months) Longest streak + Tom 8 16 13 + Kris 2 5 11 + Ahmad 5 9 9 + Beau 6 12 7 + ``` + - | + ``` + Certificates Longest streak + Tom 8 13 + Kris 2 11 + Ahmad 5 9 + Beau 6 7 + ``` + solution: 2 ``` diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-creating-columns.english.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-creating-columns.english.md index a9c13a18eb..d9f10c8fa2 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-creating-columns.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-creating-columns.english.md @@ -15,11 +15,37 @@ videoId: _sSo2XZoB3E ```yml question: - text: Question + text: | + What code would add a "Certificates per month" column to the `certificates_earned` DataFrame like the one below?: + + ``` + Certificates Time (in months) Certificates per month + Tom 8 16 0.50 + Kris 2 5 0.40 + Ahmad 5 9 0.56 + Beau 6 12 0.50 + ``` + answers: - - one - - two - - three + - | + ```py + certificates_earned['Certificates'] / + certificates_earned['Time (in months)'] + ``` + - | + ```py + certificates_earned['Certificates per month'] = round( + certificates_earned['Certificates'] / + certificates_earned['Time (in months)'] + ) + ``` + - | + ```py + certificates_earned['Certificates per month'] = round( + certificates_earned['Certificates'] / + certificates_earned['Time (in months)'], 2 + ) + ``` solution: 3 ``` diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-dataframes.english.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-dataframes.english.md index 0ea1a04ff7..c8ac7dc4c7 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-dataframes.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-dataframes.english.md @@ -15,11 +15,43 @@ videoId: 7SgFBYXaiH0 ```yml question: - text: Question + text: | + What will the following code print out?: + + ```py + import pandas as pd + + certificates_earned = pd.DataFrame({ + 'Certificates': [8, 2, 5, 6], + 'Time (in months)': [16, 5, 9, 12] + }) + + certificates_earned.index = ['Tom', 'Kris', 'Ahmad', 'Beau'] + + print(certificates_earned.iloc[2]) + ``` + answers: - - one - - two - - three + - | + ``` + Tom 16 + Kris 5 + Ahmad 9 + Beau 12 + Name: Time (in months), dtype: int64 + ``` + - | + ``` + Certificates 6 + Time (in months) 12 + Name: Beau, dtype: int64 + ``` + - | + ``` + Certificates 5 + Time (in months) 9 + Name: Ahmad, dtype: int64 + ``` solution: 3 ``` diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-indexing-and-conditional-selection.english.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-indexing-and-conditional-selection.english.md index 2a42bb094d..f7c6a62018 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-indexing-and-conditional-selection.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-indexing-and-conditional-selection.english.md @@ -15,11 +15,42 @@ videoId: -ZOrgV_aA9A ```yml question: - text: Question + text: | + What will the following code print out?: + + ```py + import pandas as pd + + certificates_earned = pd.Series( + [8, 2, 5, 6], + index=['Tom', 'Kris', 'Ahmad', 'Beau'] + ) + + print(certificates_earned[certificates_earned > 5]) + ``` + answers: - - one - - two - - three + - | + ``` + Tom True + Kris False + Ahmad False + Beau True + dtype: int64 + ``` + - | + ``` + Tom 8 + Ahmad 5 + Beau 6 + dtype: int64 + ``` + - | + ``` + Tom 8 + Beau 6 + dtype: int64 + ``` solution: 3 ``` diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-introduction.english.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-introduction.english.md index eeaa34dc16..7ac1f1522b 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-introduction.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/pandas-introduction.english.md @@ -15,12 +15,46 @@ videoId: 0xACW-8cZU0 ```yml question: - text: Question + text: | + What will the following code print out?: + + ```py + import pandas as pd + + certificates_earned = pd.Series( + [8, 2, 5, 6], + index=['Tom', 'Kris', 'Ahmad', 'Beau'] + ) + + print(certificates_earned) + ``` + answers: - - one - - two - - three - solution: 3 + - | + ``` + Tom 8 + Kris 2 + Ahmad 5 + Beau 6 + dtype: int64 + ``` + - | + ``` + Kris 2 + Ahmad 5 + Beau 6 + Tom 8 + dtype: int64 + ``` + - | + ``` + Tom 8 + Kris 2 + Ahmad 5 + Beau 6 + Name: certificates_earned dtype: int64 + ``` + solution: 1 ``` diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/python-functions-and-collections.english.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/python-functions-and-collections.english.md index ce65cc39af..e569a07225 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/python-functions-and-collections.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/python-functions-and-collections.english.md @@ -15,12 +15,12 @@ videoId: NzpU17ZVlUw ```yml question: - text: Question + text: What is the main difference between lists and tuples in Python? answers: - - one - - two - - three - solution: 3 + - Tuples are immutable. + - Lists are ordered. + - Tuples are unordered. + solution: 1 ``` diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/reading-data-from-databases.english.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/reading-data-from-databases.english.md index 1e316c2bd8..7ee8c6e9d4 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/reading-data-from-databases.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/reading-data-from-databases.english.md @@ -17,9 +17,9 @@ videoId: MtgXS1MofRw question: text: What method does a Cursor instance have and what does it allow? answers: - - The Cursor instance has a .Run() method which allows you to run SQL queries. - - The Cursor instance has a .Select() method which allows you to select records. - - The Cursor instance has a .Execute() method which will receive SQL parameters to run against the database. + - The Cursor instance has a .run() method which allows you to run SQL queries. + - The Cursor instance has a .select() method which allows you to select records. + - The Cursor instance has an .execute() method which will receive SQL parameters to run against the database. solution: 3 ``` diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/reading-data-introduction.english.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/reading-data-introduction.english.md index 714b8ea0e2..2dd98b7b84 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/reading-data-introduction.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-course/reading-data-introduction.english.md @@ -15,12 +15,35 @@ videoId: cDnt02BcHng ```yml question: - text: Question + text: | + Given a file named `certificates.csv` with these contents: + + ``` + Name$Certificates$Time (in months) + Tom$8$16 + Kris$2$5 + Ahmad$5$9 + Beau$6$12 + ``` + + Fill in the blanks for the missing arguments below: + + ```py + import csv + + with open(___, 'r') as fp: + reader = csv.reader(fp, delimiter=___) + next(reader) + for index, values in enumerate(reader): + name, certs_num, months_num = values + print(f"{name} earned {___} certificates in {months_num} months") + ``` + answers: - - one - - two - - three - solution: 3 + - 'certificates.csv', '-', values + - 'certificates.csv', '$', certs_num + - 'certificates', '$', certs_num + solution: 2 ``` diff --git a/curriculum/challenges/english/08-data-analysis-with-python/numpy/accessing-and-changing-elements,-rows,-columns.english.md b/curriculum/challenges/english/08-data-analysis-with-python/numpy/accessing-and-changing-elements,-rows,-columns.english.md index ec2eb258e4..7b56b65e13 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/numpy/accessing-and-changing-elements,-rows,-columns.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/numpy/accessing-and-changing-elements,-rows,-columns.english.md @@ -15,11 +15,25 @@ videoId: v-7Y7koJ_N0 ```yml question: - text: Question + text: | + What code would change the values in the 3rd column of both of the following Numpy arrays to 20?: + + ```py + a = np.array([[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]]) + + # Output: + # [[ 1 2 3 4 5] + # [ 6 7 20 9 10]] + ``` answers: - - one - - two - - three + - | + `a[:, 3] = 20` + - | + `a[2, :] = 20` + - | + `a[:, 2] = 20` + - | + `a[1, 2] = 20` solution: 3 ``` diff --git a/curriculum/challenges/english/08-data-analysis-with-python/numpy/basics-of-numpy.english.md b/curriculum/challenges/english/08-data-analysis-with-python/numpy/basics-of-numpy.english.md index 84026916e3..b6dfb3247c 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/numpy/basics-of-numpy.english.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/numpy/basics-of-numpy.english.md @@ -15,7 +15,7 @@ videoId: f9QrZrKQMLI ```yml question: - text: 'What will the following code print:
b = np.array([[1.0,2.0,3.0],[3.0,4.0,5.0]])
print(b)
' + text: 'What will the following code print?:
b = np.array([[1.0,2.0,3.0],[3.0,4.0,5.0]])
print(b)
' answers: - '
[[1.0 2.0 3.0]
[3.0 4.0 5.0]]
'
     - '
[[1. 2. 3.]
[3. 4. 5.]]
'
diff --git a/curriculum/challenges/english/08-data-analysis-with-python/numpy/copying-arrays-warning.english.md b/curriculum/challenges/english/08-data-analysis-with-python/numpy/copying-arrays-warning.english.md
index 33946d1b50..2486a9b51b 100644
--- a/curriculum/challenges/english/08-data-analysis-with-python/numpy/copying-arrays-warning.english.md
+++ b/curriculum/challenges/english/08-data-analysis-with-python/numpy/copying-arrays-warning.english.md
@@ -15,12 +15,25 @@ videoId: iIoQ0_L0GvA
 
 ```yml
 question:
-  text: Question
+  text: |
+    What is the value of `a` after running the following code?:
+
+    ```py
+    import numpy as np
+
+    a = np.array([1, 2, 3, 4, 5])
+    b = a
+    b[2] = 20
+    ```
+
   answers:
-    - one
-    - two
-    - three
-  solution: 3
+    - |
+      `[1, 2, 3, 4, 5]`
+    - |
+      `[1, 2, 20, 4, 5]`
+    - |
+      `[1, 20, 3, 4, 5]`
+  solution: 2
 ```
 
 
diff --git a/curriculum/challenges/english/08-data-analysis-with-python/numpy/initialize-array-problem.english.md b/curriculum/challenges/english/08-data-analysis-with-python/numpy/initialize-array-problem.english.md
index 00e900954e..5046acd512 100644
--- a/curriculum/challenges/english/08-data-analysis-with-python/numpy/initialize-array-problem.english.md
+++ b/curriculum/challenges/english/08-data-analysis-with-python/numpy/initialize-array-problem.english.md
@@ -15,12 +15,46 @@ videoId: 0jGfH8BPfOk
 
 ```yml
 question:
-  text: Question
+  text: |
+    What is another way to produce the following array?:
+
+    ```
+    [[1. 1. 1. 1. 1.]
+    [1. 0. 0. 0. 1.]
+    [1. 0. 9. 0. 1.]
+    [1. 0. 0. 0. 1.]
+    [1. 1. 1. 1. 1.]]
+    ```
+
   answers:
-    - one
-    - two
-    - three
-  solution: 3
+    - |
+      ```py
+      output = np.ones((5, 5))
+
+      z = np.zeros((3, 3))
+      z[1, 1] = 9
+
+      output[1:-1, 1:-1] = z
+      ```
+    - |
+      ```py
+      output = np.ones((5, 5))
+
+      z = np.zeros((3, 3))
+      z[1, 1] = 9
+
+      output[1:3, 1:3] = z
+      ```
+    - |
+      ```py
+      output = np.ones((5, 5))
+
+      z = np.zeros((3, 3))
+      z[1, 1] = 9
+
+      output[4:1, 4:1] = z
+      ```
+  solution: 1
 ```
 
 
diff --git a/curriculum/challenges/english/08-data-analysis-with-python/numpy/initializing-different-arrays.english.md b/curriculum/challenges/english/08-data-analysis-with-python/numpy/initializing-different-arrays.english.md
index 7d2143baa8..964ac0e163 100644
--- a/curriculum/challenges/english/08-data-analysis-with-python/numpy/initializing-different-arrays.english.md
+++ b/curriculum/challenges/english/08-data-analysis-with-python/numpy/initializing-different-arrays.english.md
@@ -15,12 +15,30 @@ videoId: CEykdsKT4U4
 
 ```yml
 question:
-  text: Question
+  text: |
+    What will the following code print?:
+    
+    ```py
+    a = np.array([[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]])
+
+    print(np.full_like(a, 100))
+    ```
   answers:
-    - one
-    - two
-    - three
-  solution: 3
+    - |
+      ```
+      [[100 100 100 100 100]]
+      ```
+    - |
+      ```
+      [[100 100 100 100 100]
+      [100 100 100 100 100]]
+      ```
+    - |
+      ```
+      [[ 1  2  3  4  5]
+      [ 6  7 20  9 10]]
+      ```
+  solution: 2
 ```
 
 
diff --git a/curriculum/challenges/english/08-data-analysis-with-python/numpy/loading-data-and-advanced-indexing.english.md b/curriculum/challenges/english/08-data-analysis-with-python/numpy/loading-data-and-advanced-indexing.english.md
index d5d39da704..f23e588917 100644
--- a/curriculum/challenges/english/08-data-analysis-with-python/numpy/loading-data-and-advanced-indexing.english.md
+++ b/curriculum/challenges/english/08-data-analysis-with-python/numpy/loading-data-and-advanced-indexing.english.md
@@ -15,11 +15,42 @@ videoId: tUdBZ7pF8Jg
 
 ```yml
 question:
-  text: Question
+  text: |
+    Given a file named `data.txt` with these contents:
+
+    ```
+    29,97,32,100,45
+    15,88,5,75,22
+    ```
+
+    What code would produce the following array?:
+
+    ```py
+    [29. 32. 45. 15.  5. 22.]
+    ```
+  
   answers:
-    - one
-    - two
-    - three
+    - |
+      ```
+      filedata = np.genfromtxt('data.txt', delimiter=',')
+      output = np.any(filedata < 50)
+
+      print(output)
+      ```
+    - |
+      ```
+      filedata = np.genfromtxt('data.txt', delimiter=',')
+      output = np.all(filedata < 50, axis=1)
+
+      print(output)
+      ```
+    - |
+      ```
+      filedata = np.genfromtxt('data.txt', delimiter=',')
+      output = filedata[filedata < 50]
+
+      print(output)
+      ```
   solution: 3
 ```
 
diff --git a/curriculum/challenges/english/08-data-analysis-with-python/numpy/mathematics.english.md b/curriculum/challenges/english/08-data-analysis-with-python/numpy/mathematics.english.md
index f6b854f886..d17e02de1c 100644
--- a/curriculum/challenges/english/08-data-analysis-with-python/numpy/mathematics.english.md
+++ b/curriculum/challenges/english/08-data-analysis-with-python/numpy/mathematics.english.md
@@ -15,12 +15,22 @@ videoId: 7txegvyhtVk
 
 ```yml
 question:
-  text: Question
+  text: |
+    What is the value of `b` after running the following code?:
+
+    ```py
+    import numpy as np
+
+    a = np.array(([1, 2, 3, 4, 5], [6, 7, 8, 9, 10]))
+    b = np.max(a, axis=1).sum()
+    ```
+
   answers:
-    - one
-    - two
-    - three
-  solution: 3
+    - '10'
+    - '7'
+    - '5'
+    - '15'
+  solution: 4
 ```
 
 
diff --git a/curriculum/challenges/english/08-data-analysis-with-python/numpy/reorganizing-arrays.english.md b/curriculum/challenges/english/08-data-analysis-with-python/numpy/reorganizing-arrays.english.md
index ded4870f1a..35e0b038c1 100644
--- a/curriculum/challenges/english/08-data-analysis-with-python/numpy/reorganizing-arrays.english.md
+++ b/curriculum/challenges/english/08-data-analysis-with-python/numpy/reorganizing-arrays.english.md
@@ -15,12 +15,35 @@ videoId: VNWAQbEM-C8
 
 ```yml
 question:
-  text: Question
+  text: |
+    What code would produce the following array?:
+
+    ```
+    [[1. 1.]
+    [1. 1.]
+    [1. 1.]
+    [1. 1.]]
+    ```
   answers:
-    - one
-    - two
-    - three
-  solution: 3
+    - |
+      ```py
+      a = np.ones((2, 4))
+      b = a.reshape((4, 2))
+      print(b)
+      ```
+    - |
+      ```py
+      a = np.ones((2, 4))
+      b = a.reshape((2, 4))
+      print(b)
+      ```
+    - |
+      ```py
+      a = np.ones((2, 4))
+      b = a.reshape((8, 1))
+      print(b)
+      ```
+  solution: 1
 ```
 
 
diff --git a/curriculum/challenges/english/08-data-analysis-with-python/numpy/what-is-numpy.english.md b/curriculum/challenges/english/08-data-analysis-with-python/numpy/what-is-numpy.english.md
index 2251a732a5..805c55f55b 100644
--- a/curriculum/challenges/english/08-data-analysis-with-python/numpy/what-is-numpy.english.md
+++ b/curriculum/challenges/english/08-data-analysis-with-python/numpy/what-is-numpy.english.md
@@ -15,12 +15,13 @@ videoId: 5Nwfs5Ej85Q
 
 ```yml
 question:
-  text: Question
+  text: 'Why are Numpy arrays faster than regular Python lists?:'
   answers:
-    - one
-    - two
-    - three
-  solution: 3
+    - Numpy does not perform type checking while iterating through objects.
+    - Numpy uses fixed types.
+    - Numpy uses contiguous memory.
+    - All of the above.
+  solution: 4
 ```
 
 
diff --git a/curriculum/challenges/english/09-information-security/python-for-penetration-testing/creating-a-tcp-client.english.md b/curriculum/challenges/english/09-information-security/python-for-penetration-testing/creating-a-tcp-client.english.md
index c619399be8..db433c81b2 100644
--- a/curriculum/challenges/english/09-information-security/python-for-penetration-testing/creating-a-tcp-client.english.md
+++ b/curriculum/challenges/english/09-information-security/python-for-penetration-testing/creating-a-tcp-client.english.md
@@ -15,12 +15,17 @@ videoId: ugYfJNTawks
 
 ```yml
 question:
-  text: Question
+  text: |
+    Which socket object method lets you set the maximum amount of data your client accepts at once?
+
   answers:
-    - one
-    - two
-    - three
-  solution: 3
+    - |
+      `.recv(1024)`
+    - |
+      `.decode('ascii')`
+    - |
+      `.connect(host, port)`
+  solution: 1
 ```
 
 
diff --git a/curriculum/challenges/english/09-information-security/python-for-penetration-testing/developing-a-banner-grabber.english.md b/curriculum/challenges/english/09-information-security/python-for-penetration-testing/developing-a-banner-grabber.english.md
index 0c366a6695..c79cb5491c 100644
--- a/curriculum/challenges/english/09-information-security/python-for-penetration-testing/developing-a-banner-grabber.english.md
+++ b/curriculum/challenges/english/09-information-security/python-for-penetration-testing/developing-a-banner-grabber.english.md
@@ -15,11 +15,23 @@ videoId: CeGW761BIsA
 
 ```yml
 question:
-  text: Question
+  text: |
+    Fill in the blanks to complete the `banner` function below:
+
+    ```py
+    def banner(ip, port):
+        s = socket.socket()
+        s.____((ip, ____))
+        print(s.recv(1024))
+    ```
+
   answers:
-    - one
-    - two
-    - three
+    - |
+      `connect`, `port`
+    - |
+      `getsockname`, `'1-1024'`
+    - |
+      `connect`, `int(port)`
   solution: 3
 ```
 
diff --git a/curriculum/challenges/english/09-information-security/python-for-penetration-testing/developing-a-port-scanner.english.md b/curriculum/challenges/english/09-information-security/python-for-penetration-testing/developing-a-port-scanner.english.md
index ea25b0f665..f720fade99 100644
--- a/curriculum/challenges/english/09-information-security/python-for-penetration-testing/developing-a-port-scanner.english.md
+++ b/curriculum/challenges/english/09-information-security/python-for-penetration-testing/developing-a-port-scanner.english.md
@@ -15,11 +15,15 @@ videoId: z_qkqZS7KZ4
 
 ```yml
 question:
-  text: Question
+  text: |
+    What is the main difference between the `.connect()` and `.connect_ex()` methods?
+
   answers:
-    - one
-    - two
-    - three
+    - There is no difference between the two methods.
+    - |
+      If there is an error or if no host is found, `.connect()` returns an error code while `.connect_ex()` raises an exception.
+    - |
+      If there is an error or if no host is found, `.connect()` raises an exception while `.connect_ex()` returns an error code.
   solution: 3
 ```
 
diff --git a/curriculum/challenges/english/09-information-security/python-for-penetration-testing/developing-an-nmap-scanner-part-1.english.md b/curriculum/challenges/english/09-information-security/python-for-penetration-testing/developing-an-nmap-scanner-part-1.english.md
index 5ccf1e0025..4698a90fd2 100644
--- a/curriculum/challenges/english/09-information-security/python-for-penetration-testing/developing-an-nmap-scanner-part-1.english.md
+++ b/curriculum/challenges/english/09-information-security/python-for-penetration-testing/developing-an-nmap-scanner-part-1.english.md
@@ -15,11 +15,16 @@ videoId: jYk9XaGoAnk
 
 ```yml
 question:
-  text: Question
+  text: |
+    What is the correct command to install the Python 3 version of the `python-nmap` library?
+
   answers:
-    - one
-    - two
-    - three
+    - |
+      `sudo apt install python-nmap`
+    - |
+      `pip install python-nmap`
+    - |
+      `pip3 install python-nmap`
   solution: 3
 ```
 
diff --git a/curriculum/challenges/english/09-information-security/python-for-penetration-testing/developing-an-nmap-scanner-part-2.english.md b/curriculum/challenges/english/09-information-security/python-for-penetration-testing/developing-an-nmap-scanner-part-2.english.md
new file mode 100644
index 0000000000..58a8357789
--- /dev/null
+++ b/curriculum/challenges/english/09-information-security/python-for-penetration-testing/developing-an-nmap-scanner-part-2.english.md
@@ -0,0 +1,32 @@
+---
+id: 5ea9997bbec2e9bc47e94db2
+title: Developing an Nmap Scanner part 2
+challengeType: 11
+isHidden: true
+videoId: a98PscnUsTg
+---
+
+## Description
+
+
+ +## Tests +
+ +```yml +question: + text: | + Which of the following allows you to scan for UDP ports between 21 to 443? + + answers: + - | + `.scan(ip_addr, '21-443', '-v -sU')` + - | + `.scan(ip_addr, '1-1024', '-v -sS')` + - | + `.scan(ip_addr, '21-443', '-v -sS')` + solution: 1 +``` + +
+ diff --git a/curriculum/challenges/english/09-information-security/python-for-penetration-testing/developing-and-nmap-scanner-part-2.english.md b/curriculum/challenges/english/09-information-security/python-for-penetration-testing/developing-and-nmap-scanner-part-2.english.md deleted file mode 100644 index 346b7070fa..0000000000 --- a/curriculum/challenges/english/09-information-security/python-for-penetration-testing/developing-and-nmap-scanner-part-2.english.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -id: 5ea9997bbec2e9bc47e94db2 -title: Developing and Nmap Scanner part 2 -challengeType: 11 -isHidden: true -videoId: a98PscnUsTg ---- - -## Description -
-
- -## Tests -
- -```yml -question: - text: Question - answers: - - one - - two - - three - solution: 3 -``` - -
- diff --git a/curriculum/challenges/english/09-information-security/python-for-penetration-testing/introduction-and-setup.english.md b/curriculum/challenges/english/09-information-security/python-for-penetration-testing/introduction-and-setup.english.md index c98db87e95..0d64453214 100644 --- a/curriculum/challenges/english/09-information-security/python-for-penetration-testing/introduction-and-setup.english.md +++ b/curriculum/challenges/english/09-information-security/python-for-penetration-testing/introduction-and-setup.english.md @@ -15,12 +15,14 @@ videoId: XeQ7ZKtb998 ```yml question: - text: Question + text: | + What code editor and extension does the instructor recommend for developing penetration testing tools in Python? + answers: - - one - - two - - three - solution: 3 + - Atom and the atom-python-run extension. + - VSCode and Microsoft's Python extension. + - Sublime Text and the Anaconda package. + solution: 2 ``` diff --git a/curriculum/challenges/english/09-information-security/python-for-penetration-testing/understanding-sockets-and-creating-a-tcp-server.english.md b/curriculum/challenges/english/09-information-security/python-for-penetration-testing/understanding-sockets-and-creating-a-tcp-server.english.md index 939b50e4fb..198977057f 100644 --- a/curriculum/challenges/english/09-information-security/python-for-penetration-testing/understanding-sockets-and-creating-a-tcp-server.english.md +++ b/curriculum/challenges/english/09-information-security/python-for-penetration-testing/understanding-sockets-and-creating-a-tcp-server.english.md @@ -15,11 +15,16 @@ videoId: F1QI9tNuDQg ```yml question: - text: Question + text: | + Which of the following functions creates a socket object? + answers: - - one - - two - - three + - | + `socket.bind((host, port))` + - | + `socket.gethostbyname()` + - | + `socket.socket(socket.AF_INET, socket.SOCK_STREAM)` solution: 3 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/how-neural-networks-work/deep-learning-demystified.english.md b/curriculum/challenges/english/11-machine-learning-with-python/how-neural-networks-work/deep-learning-demystified.english.md index d545bc12c7..073cc9d1ed 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/how-neural-networks-work/deep-learning-demystified.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/how-neural-networks-work/deep-learning-demystified.english.md @@ -15,12 +15,14 @@ videoId: bejQ-W9BGJg ```yml question: - text: Question + text: How should you assign weights to input neurons before training your network for the first time? + answers: - - one - - two - - three - solution: 3 + - From smallest to largest. + - Completely randomly. + - Alphabetically. + - None of the above. + solution: 2 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/how-neural-networks-work/how-convolutional-neural-networks-work.english.md b/curriculum/challenges/english/11-machine-learning-with-python/how-neural-networks-work/how-convolutional-neural-networks-work.english.md index 683937bdf4..87cabdf1b5 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/how-neural-networks-work/how-convolutional-neural-networks-work.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/how-neural-networks-work/how-convolutional-neural-networks-work.english.md @@ -15,12 +15,13 @@ videoId: Y5M7KH4A4n4 ```yml question: - text: Question + text: When are Convolutional Neural Networks not useful? + answers: - - one - - two - - three - solution: 3 + - If your data can't be made to look like an image, or if you can rearrange elements of your data and it's still just as useful. + - If your data is made up of different 2D or 3D images. + - If your data is text or sound based. + solution: 1 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/how-neural-networks-work/how-deep-neural-networks-work.english.md b/curriculum/challenges/english/11-machine-learning-with-python/how-neural-networks-work/how-deep-neural-networks-work.english.md index 8dc8fc125d..37c4068f2d 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/how-neural-networks-work/how-deep-neural-networks-work.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/how-neural-networks-work/how-deep-neural-networks-work.english.md @@ -15,12 +15,13 @@ videoId: zvalnHWGtx4 ```yml question: - text: Question + text: Why is it better to calculate the gradient (slope) directly rather than numerically? + answers: - - one - - two - - three - solution: 3 + - It is computationally expensive to go back through the entire neural network and adjust the weights for each layer of the neural network. + - It is more accurate. + - There is no difference between the two methods. + solution: 1 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/how-neural-networks-work/recurrent-neural-networks-rnn-and-long-short-term-memory-lstm.english.md b/curriculum/challenges/english/11-machine-learning-with-python/how-neural-networks-work/recurrent-neural-networks-rnn-and-long-short-term-memory-lstm.english.md index 8fb881ccbc..0676ffa2c8 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/how-neural-networks-work/recurrent-neural-networks-rnn-and-long-short-term-memory-lstm.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/how-neural-networks-work/recurrent-neural-networks-rnn-and-long-short-term-memory-lstm.english.md @@ -15,11 +15,13 @@ videoId: UVimlsy9eW0 ```yml question: - text: Question + text: | + What are the main neural network components that make up a Long Short Term Memory network? + answers: - - one - - two - - three + - New information and prediction. + - Prediction, collected possibilities, and selection. + - Prediction, ignoring, forgetting, and selection. solution: 3 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/conclusion.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/conclusion.english.md index 3daf81052e..48effe2587 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/conclusion.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/conclusion.english.md @@ -15,12 +15,13 @@ videoId: LMNub5frQi4 ```yml question: - text: Question + text: | + Most people that are experts in AI or machine learning usually...: answers: - - one - - two - - three - solution: 3 + - have one specialization. + - have many specializations. + - have a deep understanding of many different frameworks. + solution: 1 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/convolutional-neural-networks-evaluating-the-model.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/convolutional-neural-networks-evaluating-the-model.english.md index 47468d3b52..33e45f268d 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/convolutional-neural-networks-evaluating-the-model.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/convolutional-neural-networks-evaluating-the-model.english.md @@ -15,11 +15,11 @@ videoId: eCATNvwraXg ```yml question: - text: Question + text: What is **not** a good way to increase the accuracy of a convolutional neural network? answers: - - one - - two - - three + - Augmenting the data you already have. + - Using a pre-trained model. + - Using your test data to retrain the model. solution: 3 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/convolutional-neural-networks-picking-a-pretrained-model.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/convolutional-neural-networks-picking-a-pretrained-model.english.md index b6cd144ae1..58c7774390 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/convolutional-neural-networks-picking-a-pretrained-model.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/convolutional-neural-networks-picking-a-pretrained-model.english.md @@ -15,12 +15,36 @@ videoId: h1XUt1AgIOI ```yml question: - text: Question + text: | + Fill in the blanks below to use Google's pre-trained MobileNet V2 model as a base for a convolutional neural network: + + ```py + base_model = tf.__A__.applications.__B__(input_shape=(160, 160, 3), + include_top=__C__, + weights='imagenet' + ) + ``` + answers: - - one - - two - - three - solution: 3 + - | + A: `keras` + + B: `MobileNetV2` + + C: `False` + - | + A: `Keras` + + B: `MobileNetV2` + + C: `True` + - | + A: `keras` + + B: `mobile_net_v2` + + C: `False` + solution: 1 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/convolutional-neural-networks-the-convolutional-layer.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/convolutional-neural-networks-the-convolutional-layer.english.md index 78c6aaf69a..ef545de5c8 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/convolutional-neural-networks-the-convolutional-layer.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/convolutional-neural-networks-the-convolutional-layer.english.md @@ -15,12 +15,12 @@ videoId: LrdmcQpTyLw ```yml question: - text: Question + text: What are the three main properties of each convolutional layer? answers: - - one - - two - - three - solution: 3 + - Input size, the number of filters, and the sample size of the filters. + - Input size, input dimensions, and the color values of the input. + - Input size, input padding, and stride. + solution: 1 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/convolutional-neural-networks.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/convolutional-neural-networks.english.md index e6efd9f37e..f1f868ad97 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/convolutional-neural-networks.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/convolutional-neural-networks.english.md @@ -15,11 +15,12 @@ videoId: _1kTP7uoU9E ```yml question: - text: Question + text: | + Dense neural networks analyze input on a global scale and recognize patterns in specific areas. Convolutional neural networks...: answers: - - one - - two - - three + - also analyze input globally and extract features from specific areas. + - do not work well for image classification or object detection. + - scan through the entire input a little at a time and learn local patterns. solution: 3 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-building-the-model.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-building-the-model.english.md index 44065bf63e..561ced2446 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-building-the-model.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-building-the-model.english.md @@ -15,12 +15,15 @@ videoId: 5wHw8BTd2ZQ ```yml question: - text: Question + text: What kind of estimator/model does TensorFlow recommend using for classification? answers: - - one - - two - - three - solution: 3 + - | + `LinearClassifier` + - | + `DNNClassifier` + - | + `BoostedTreesClassifier` + solution: 2 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-classification.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-classification.english.md index 90156de2be..bc9ea4c08b 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-classification.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-classification.english.md @@ -15,12 +15,12 @@ videoId: qFF7ZQNvK9E ```yml question: - text: Question + text: What is classification? answers: - - one - - two - - three - solution: 3 + - The process of separating data points into different classes. + - Predicting a numeric value or forecast based on independent and dependent variables. + - None of the above. + solution: 1 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-clustering.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-clustering.english.md index bc857ab2df..80bb5be6fd 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-clustering.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-clustering.english.md @@ -15,12 +15,14 @@ videoId: 8sqIaHc9Cz4 ```yml question: - text: Question + text: Which of the following steps is **not** part of the K-Means algorithm? answers: - - one - - two - - three - solution: 3 + - Randomly pick K points to place K centeroids. + - Assign each K point to the closest K centeroid. + - Move each K centeroid into the middle of all of their data points. + - Shuffle the K points so they're redistributed randomly. + - Reassign each K point to the closest K centeroid. + solution: 4 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-hidden-markov-models.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-hidden-markov-models.english.md index 2a2ae7c1f1..5718c9ed9d 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-hidden-markov-models.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-hidden-markov-models.english.md @@ -15,12 +15,12 @@ videoId: IZg24y4wEPY ```yml question: - text: Question + text: What makes a Hidden Markov model different than linear regression or classification? answers: - - one - - two - - three - solution: 3 + - It uses probability distributions to predict future events or states. + - It analyzes the relationship between independent and dependent variables to make predictions. + - It separates data points into separate categories. + solution: 1 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-the-training-process.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-the-training-process.english.md index 0566857f31..e95cc11c9d 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-the-training-process.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-the-training-process.english.md @@ -15,12 +15,12 @@ videoId: _cEwvqVoBhI ```yml question: - text: Question + text: What are epochs? answers: - - one - - two - - three - solution: 3 + - The number of times the model will see the same data. + - A type of graph. + - The number of elements you feed to the model at once. + solution: 1 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-training-and-testing-data.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-training-and-testing-data.english.md index 731b01d926..1fbb38d6bb 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-training-and-testing-data.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-training-and-testing-data.english.md @@ -15,12 +15,12 @@ videoId: wz9J1slsi7I ```yml question: - text: Question + text: What is categorical data? answers: - - one - - two - - three - solution: 3 + - Another term for one-hot encoding. + - Any data that is not numeric. + - Any data that is represented numerically. + solution: 2 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-using-probabilities-to-make-predictions.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-using-probabilities-to-make-predictions.english.md index 61b72f37d6..7094d33681 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-using-probabilities-to-make-predictions.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-using-probabilities-to-make-predictions.english.md @@ -15,11 +15,14 @@ videoId: fYAYvLUawnc ```yml question: - text: Question + text: What TensorFlow module should you import to implement `.HiddenMarkovModel()`? answers: - - one - - two - - three + - | + `tensorflow.keras` + - | + `tensorflow_gpu` + - | + `tensorflow_probability` solution: 3 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-working-with-data.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-working-with-data.english.md index 868476288b..7a7462bb68 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-working-with-data.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms-working-with-data.english.md @@ -15,11 +15,12 @@ videoId: u85IOSsJsPI ```yml question: - text: Question + text: | + What does the pandas `.head()` function do? answers: - - one - - two - - three + - Returns the number of entries in a data frame. + - Returns the number of columns in a data frame. + - By default, shows the first five rows or entries in a data frame. solution: 3 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms.english.md index 86119f93db..ebd01e091e 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/core-learning-algorithms.english.md @@ -15,12 +15,16 @@ videoId: u5lZURgcWnU ```yml question: - text: Question + text: | + Which type of analysis would be best suited for the following problem?: + + You have the average temperature in the month of March for the last 100 years. Using this data, you want to predict the average temperature in the month of March 5 years from now. answers: - - one - - two - - three - solution: 3 + - Multiple regression + - Correlation + - Decision tree + - Linear regression + solution: 4 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/creating-a-convolutional-neural-network.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/creating-a-convolutional-neural-network.english.md index 218851c8f2..811c2c5945 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/creating-a-convolutional-neural-network.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/creating-a-convolutional-neural-network.english.md @@ -15,11 +15,38 @@ videoId: kfv0K8MtkIc ```yml question: - text: Question + text: | + Fill in the blanks below to complete the architechture for a convolutional neural network: + + ```py + model = models.__A__() + model.add(layers.__B__(32, (3, 3), activation='relu', input_shape=(32, 32, 3))) + model.add(layers.__C__(2, 2)) + model.add(layers.__B__(64, (3, 3), activation='relu')) + model.add(layers.__C__(2, 2)) + model.add(layers.__B__(32, (3, 3), activation='relu')) + model.add(layers.__C__(2, 2)) + ``` + answers: - - one - - two - - three + - | + A: `Sequential` + + B: `add` + + C: `Wrapper` + - | + A: `keras` + + B: `Cropping2D` + + C: `AlphaDropout` + - | + A: `Sequential` + + B: `Conv2D` + + C: `MaxPooling2D` solution: 3 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/introduction-machine-learning-fundamentals.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/introduction-machine-learning-fundamentals.english.md index 4dcd1c991e..23e0a45b6b 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/introduction-machine-learning-fundamentals.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/introduction-machine-learning-fundamentals.english.md @@ -15,12 +15,13 @@ videoId: KwL1qTR5MT8 ```yml question: - text: Question + text: | + Which statement below is **false**? answers: - - one - - two - - three - solution: 3 + - Neural networks are modeled after the way the human brain works. + - Computer programs that play tic-tac-toe or chess against human players are examples of simple artificial intelligence. + - Machine learning is a subset of artificial intelligence. + solution: 1 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/introduction-to-tensorflow.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/introduction-to-tensorflow.english.md index 311c0f761d..eb217fb2bf 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/introduction-to-tensorflow.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/introduction-to-tensorflow.english.md @@ -15,12 +15,14 @@ videoId: r9hRyGGjOgQ ```yml question: - text: Question + text: Which of the following is **not** a type of tensor? answers: - - one - - two - - three - solution: 3 + - Variable + - Flowing + - Placeholder + - SparseTensor + - Constant + solution: 2 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-building-the-model.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-building-the-model.english.md index b7bfec9b43..49f9d25cda 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-building-the-model.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-building-the-model.english.md @@ -15,11 +15,48 @@ videoId: 32WBFS7lfsw ```yml question: - text: Question + text: | + Fill in the blanks below to complete the `build_model` function: + + ```py + def build_mode(vocab_size, embedding_dim, rnn_units, batch_size): + model = tf.keras.Sequential([ + tf.keras.layers.Embedding(vocab_size, + embedding_dim, + batch_input_shape=[batch_size, None]), + tf.keras.layers.__A__(rnn_units, + return_sequences=__B__, + recurrent_initializer='glorot_uniform), + tf.keras.layers.Dense(__C__) + ]) + __D__ + ``` + answers: - - one - - two - - three + - | + A: `ELU` + + B: `True` + + C: `vocab_size` + + D: `return model` + - | + A: `LSTM` + + B: `False` + + C: `batch_size` + + D: `return model` + - | + A: `LSTM` + + B: `True` + + C: `vocab_size` + + D: `return model` solution: 3 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-create-a-play-generator.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-create-a-play-generator.english.md index 869db6d215..72a967df84 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-create-a-play-generator.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-create-a-play-generator.english.md @@ -15,12 +15,28 @@ videoId: j5xsxjq_Xk8 ```yml question: - text: Question + text: | + + Fill in the blanks below to create the training examples for the RNN: + + ```py + char_dataset = tf.data.__A__.__B__(text_as_int) + ``` + answers: - - one - - two - - three - solution: 3 + - | + A: `DataSet` + + B: `from_tensor_slices` + - | + A: `data` + + B: `from_tensors` + - | + A: `DataSet` + + B: `from_generator` + solution: 1 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-making-predictions.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-making-predictions.english.md index 7d6cb89e0e..47ac3bdcd1 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-making-predictions.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-making-predictions.english.md @@ -15,12 +15,13 @@ videoId: WO1hINnBj20 ```yml question: - text: Question + text: | + Before you make a prediction with your own review, you should...: answers: - - one - - two - - three - solution: 3 + - decode the training dataset and compare the results to the test data. + - use the encodings from the training dataset to encode your review. + - assign random values between 0 and the maximum number of vocabulary in your dataset to each word in your review. + solution: 2 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-part-2.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-part-2.english.md index c373c01539..9da6acc2ff 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-part-2.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-part-2.english.md @@ -15,11 +15,12 @@ videoId: mUU9YXOFbZg ```yml question: - text: Question + text: | + Word embeddings are...: answers: - - one - - two - - three + - an unordered group of encoded words that describes the frequency of words in a given document. + - a group of encoded words that preserves the original order of the words in a given document. + - a vectorized representation of words in a given document that places words with similar meanings near each other. solution: 3 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-recurring-neural-networks.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-recurring-neural-networks.english.md index b68f516718..03da6300b9 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-recurring-neural-networks.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-recurring-neural-networks.english.md @@ -15,12 +15,17 @@ videoId: bX5681NPOcA ```yml question: - text: Question + text: What is true about Recurrent Neural Networks? answers: - - one - - two - - three - solution: 3 + - | + 1: They are a type of feed-forward neural network. + - | + 2: They maintain an internal memory/state of the input that was already processed. + - | + 3: RNN's contain a loop and process one piece of input at a time. + - | + 4: Both 2 and 3. + solution: 4 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-sentimental-analysis.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-sentimental-analysis.english.md index 99c9128df0..5ea6490d0c 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-sentimental-analysis.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-sentimental-analysis.english.md @@ -15,11 +15,36 @@ videoId: lYeLtu8Nq7c ```yml question: - text: Question + text: | + Fill in the blanks below to create the model for the RNN: + + ```py + model = __A__.keras.Sequential([ + __A__.keras.layers.__B__(88584, 32), + __A__.keras.layers.__C__(32), + __A__.keras.layers.DENSE(1, activation='sigmoid') + ]) + ``` + answers: - - one - - two - - three + - | + A: `tensor_flow` + + B: `embedding` + + C: `LSTM` + - | + A: `tf` + + B: `Embedding` + + C: `AlphaDropout` + - | + A: `tf` + + B: `Embedding` + + C: `LSTM` solution: 3 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-training-the-model.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-training-the-model.english.md index ad35ea8d8d..ddf08af829 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-training-the-model.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns-training-the-model.english.md @@ -15,12 +15,41 @@ videoId: hEUiK7j9UI8 ```yml question: - text: Question + text: | + Fill in the blanks below to save your model's checkpoints in the `./checkpoints` directory and call the latest checkpoint for training: + + ```py + checkpoint_dir = __A__ + checkpoint_prefix = os.path.join(checkpoint_dir, 'ckpt_{epoch}') + + checkpoint_callback = tf.keras.callbacks.__B__( + filepath=checkpoint_prefix, + save_weights_only=True + ) + + history = model.fit(data, epochs=2, callbacks=[__C__]) + ``` + answers: - - one - - two - - three - solution: 3 + - | + A: `'./training_checkpoints'` + + B: `ModelCheckpoint` + + C: `checkpoint_prefix` + - | + A: `'./checkpoints'` + + B: `ModelCheckpoint` + + C: `checkpoint_callback` + - | + A: `'./checkpoints'` + + B: `BaseLogger` + + C: `checkpoint_callback` + solution: 2 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns.english.md index e44b05c8fb..0239da2822 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/natural-language-processing-with-rnns.english.md @@ -15,12 +15,13 @@ videoId: ZyCaF5S-lKg ```yml question: - text: Question + text: | + Natural Language Processing is a branch of artifitial intelligence that...: answers: - - one - - two - - three - solution: 3 + - deals with how computers understand and process natural/human languages. + - translates image data into natural/human languages. + - is focused on translating computer languages into natural/human languages. + solution: 1 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/neural-networks-activation-functions.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/neural-networks-activation-functions.english.md index 20756fe9b8..9639147a8c 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/neural-networks-activation-functions.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/neural-networks-activation-functions.english.md @@ -15,12 +15,12 @@ videoId: S45tqW6BqRs ```yml question: - text: Question + text: Which activation function switches values between -1 and 1? answers: - - one - - two - - three - solution: 3 + - Relu (Rectified Linear Unit) + - Tanh (Hyperbolic Tangent) + - Sigmoid + solution: 2 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/neural-networks-creating-a-model.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/neural-networks-creating-a-model.english.md index cc3aaf5df8..85223466d6 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/neural-networks-creating-a-model.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/neural-networks-creating-a-model.english.md @@ -15,12 +15,37 @@ videoId: K8bz1bmOCTw ```yml question: - text: Question + text: | + Fill in the blanks below to build a sequential model of dense layers: + + ```py + model = __A__.__B__([ + __A__.layers.Flatten(input_shape=(28, 28)), + __A__.layers.__C__(128, activation='relu'), + __A__.layers.__C__(10, activation='softmax') + ]) + ``` + answers: - - one - - two - - three - solution: 3 + - | + A: `keras` + + B: `Sequential` + + C: `Dense` + - | + A: `tf` + + B: `Sequential` + + C: `Categorical` + - | + A: `keras` + + B: `sequential` + + C: `dense` + solution: 1 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/neural-networks-optimizers.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/neural-networks-optimizers.english.md index bc8bb0d82d..e50360cf2e 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/neural-networks-optimizers.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/neural-networks-optimizers.english.md @@ -15,12 +15,12 @@ videoId: hdOtRPQe1o4 ```yml question: - text: Question + text: What is an optimizer function? answers: - - one - - two - - three - solution: 3 + - A function that increases the accuracy of a model's predictions. + - A function that implements the gradient descent and backpropogation algorithms for you. + - A function that reduces the time a model needs to train. + solution: 2 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/neural-networks-with-tensorflow.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/neural-networks-with-tensorflow.english.md index 75fbfb57b9..a865427f80 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/neural-networks-with-tensorflow.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/neural-networks-with-tensorflow.english.md @@ -15,11 +15,12 @@ videoId: uisdfrNrZW4 ```yml question: - text: Question + text: | + A densely connected neural network is one in which...: answers: - - one - - two - - three + - all the neurons in the current layer are connected to one neuron in the previous layer. + - all the neurons in each layer are connected randomly. + - all the neurons in the current layer are connected to every neuron in the previous layer. solution: 3 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/reinforcement-learning-with-q-learning-example.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/reinforcement-learning-with-q-learning-example.english.md index 7c8676de37..3208bee952 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/reinforcement-learning-with-q-learning-example.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/reinforcement-learning-with-q-learning-example.english.md @@ -15,12 +15,33 @@ videoId: RBBSNta234s ```yml question: - text: Question + text: | + Fill in the blanks to complete the following Q-Learning equation: + + ```py + Q[__A__, __B__] = Q[__A__, __B__] + LEARNING_RATE * (reward + GAMMA * np.max(Q[__C__, :]) - Q[__A__, __B__]) + ``` + answers: - - one - - two - - three - solution: 3 + - | + A: `state` + + B: `action` + + C: `next_state` + - | + A: `state` + + B: `action` + + C: `prev_state` + - | + A: `state` + + B: `reaction` + + C: `next_state` + solution: 1 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/reinforcement-learning-with-q-learning-part-2.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/reinforcement-learning-with-q-learning-part-2.english.md index 853df699a8..c31f36d134 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/reinforcement-learning-with-q-learning-part-2.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/reinforcement-learning-with-q-learning-part-2.english.md @@ -15,12 +15,11 @@ videoId: DX7hJuaUZ7o ```yml question: - text: Question + text: What can happen if the agent does not have a good balance of taking random actions and using learned actions? answers: - - one - - two - - three - solution: 3 + - The agent will always try to minimize its reward for the current state/action, leading to local minima. + - The agent will always try to maximize its reward for the current state/action, leading to local maxima. + solution: 2 ``` diff --git a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/reinforcement-learning-with-q-learning.english.md b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/reinforcement-learning-with-q-learning.english.md index ba75961f81..5b4bac3d2b 100644 --- a/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/reinforcement-learning-with-q-learning.english.md +++ b/curriculum/challenges/english/11-machine-learning-with-python/tensorflow/reinforcement-learning-with-q-learning.english.md @@ -15,12 +15,12 @@ videoId: Cf7DSU0gVb4 ```yml question: - text: Question + text: The key components of reinforcement learning are... answers: - - one - - two - - three - solution: 3 + - environment, representative, state, reaction, and reward. + - environment, agent, state, action, and reward. + - habitat, agent, state, action, and punishment. + solution: 2 ```