fix: misaligned titles (#38613)
This commit is contained in:
@ -0,0 +1,36 @@
|
||||
---
|
||||
id: 5e7b9f060b6c005b0e76f05b
|
||||
title: Build your own Functions
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: nLDychdBwUg
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
More resources:
|
||||
- <a href="https://www.youtube.com/watch?v=ksvGhDsjtpw" target='_blank'>Exercise</a>
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What will the following Python program print out?
|
||||
<pre>def fred():<br> print("Zap")<br><br>def jane():<br> print("ABC")<br>
|
||||
<br>
|
||||
jane()<br>
|
||||
fred()<br>
|
||||
jane()<br>
|
||||
</pre>'
|
||||
answers:
|
||||
- 'Zap ABC jane fred jane'
|
||||
- 'Zap ABC Zap'
|
||||
- 'ABC Zap jane'
|
||||
- 'ABC Zap ABC'
|
||||
- 'Zap Zap Zap'
|
||||
solution: 4
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,30 @@
|
||||
---
|
||||
id: 5e7b9f0b0b6c005b0e76f06d
|
||||
title: Comparing and Sorting Tuples
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: dZXzBXUxxCs
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
More resources:
|
||||
- <a href="https://www.youtube.com/watch?v=EhQxwzyT16E" target='_blank'>Exercise</a>
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'Which does the same thing as the following code:
|
||||
<pre>lst = []<br>for key, val in counts.items():<br> newtup = (val, key)<br> lst.append(newtup)<br><br>lst = sorted(lst, reverse=True)<br>print(lst)<pre>'
|
||||
answers:
|
||||
- 'print( sorted( [ (k,v) for k,v in counts.items() ] ) )'
|
||||
- 'print( [ (k,v) for k,v in counts.items().sorted() ] )'
|
||||
- 'print( sorted( [ (k,v) for k,v in counts.keys() ] ) )'
|
||||
- 'print( [ (k,v) for k,v in counts.values().sort() ] )'
|
||||
solution: 1
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,28 @@
|
||||
---
|
||||
id: 5e7b9f050b6c005b0e76f058
|
||||
title: Conditional Execution
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: gz_IfIsZQtc
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'Which code is indented correctly to print "Yes" if x = 0 and y = 10?'
|
||||
answers:
|
||||
- '<pre>if 0 == x:<br>if y == 10:<br>print("Yes")</pre>'
|
||||
- '<pre>if 0 == x:<br> if y == 10:<br> print("Yes")</pre>'
|
||||
- '<pre>if 0 == x:<br>if y == 10:<br> print("Yes")</pre>'
|
||||
- '<pre>if 0 == x:<br> if y == 10:<br> print("Yes")</pre>'
|
||||
solution: 4
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,35 @@
|
||||
---
|
||||
id: 5e7b9f6a0b6c005b0e76f097
|
||||
title: 'Data Visualization: Mailing Lists'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: RYdW660KkaQ
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
More resources:
|
||||
- <a href="https://www.youtube.com/watch?v=KfhslNzopxo" target='_blank'>Exercise: Geodata</a>
|
||||
- <a href="https://www.youtube.com/watch?v=wSpl1-7afAk" target='_blank'>Exercise: Gmane Model</a>
|
||||
- <a href="https://www.youtube.com/watch?v=H3w4lOFBUOI" target='_blank'>Exercise: Gmane Spider</a>
|
||||
- <a href="https://www.youtube.com/watch?v=LRqVPMEXByw" target='_blank'>Exercise: Gmane Viz</a>
|
||||
- <a href="https://www.youtube.com/watch?v=yFRAZBkBDBs" target='_blank'>Exercise: Page Rank</a>
|
||||
- <a href="https://www.youtube.com/watch?v=sXedPQ_AnWA" target='_blank'>Exercise: Page Spider</a>
|
||||
- <a href="https://www.youtube.com/watch?v=Fm0hpkxsZoo" target='_blank'>Exercise: Page Viz</a>
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'Which is a common JavaScript visualization library?'
|
||||
answers:
|
||||
- 'DataViz.js'
|
||||
- 'D3'
|
||||
- 'Lowcharts'
|
||||
- 'DATA6'
|
||||
solution: 2
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,27 @@
|
||||
---
|
||||
id: 5e7b9f6a0b6c005b0e76f096
|
||||
title: 'Data Visualization: Page Rank'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: 6-w_qIUwaxU
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'How does the page rank algorithm work?'
|
||||
answers:
|
||||
- 'It determines which pages are most highly connected.'
|
||||
- 'It ranks pages based on view counts.'
|
||||
- 'It figures out which pages contain the most important content.'
|
||||
solution: 1
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,31 @@
|
||||
---
|
||||
id: 5e7b9f0a0b6c005b0e76f069
|
||||
title: Dictionaries and Loops
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: EEmekKiKG70
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
More resources:
|
||||
- <a href="https://www.youtube.com/watch?v=PrhZ9qwBDD8" target='_blank'>Exercise</a>
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: "What will the following code print?
|
||||
<pre>counts = { 'chuck' : 1 , 'annie' : 42, 'jan': 100}<br>
|
||||
for key in counts:<br> if counts[key] > 10 :<br> print(key, counts[key])</pre>"
|
||||
answers:
|
||||
- 'annie 42<br>jan 100<br>'
|
||||
- 'chuck 1<br>annie 42<br>jan 100'
|
||||
- 'chuck 1'
|
||||
- '[Error]'
|
||||
solution: 1
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,31 @@
|
||||
---
|
||||
id: 5e7b9f090b6c005b0e76f068
|
||||
title: "Dictionaries: Common Applications"
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: f17xPfIXct0
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: "What will the following code print?
|
||||
<pre>counts = { 'quincy' : 1 , 'mrugesh' : 42, 'beau': 100, '0': 10}<br>
|
||||
print(counts.get('kris', 0))</pre>"
|
||||
answers:
|
||||
- '1'
|
||||
- 'quincy'
|
||||
- '0'
|
||||
- '10'
|
||||
- '[will return error]'
|
||||
solution: 3
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,29 @@
|
||||
---
|
||||
id: 5e7b9f080b6c005b0e76f063
|
||||
title: Files as a Sequence
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: cIA0EokbaHE
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
More resources:
|
||||
- <a href="https://www.youtube.com/watch?v=il1j4wkte2E" target='_blank'>Exercise</a>
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
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'
|
||||
solution: 3
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,31 @@
|
||||
---
|
||||
id: 5e7b9f050b6c005b0e76f057
|
||||
title: Intermediate Expressions
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: dKgUaIa5ATg
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
More resources:
|
||||
- <a href="https://youtu.be/t_4DPwsaGDY" target='_blank'>Exercise 1</a>
|
||||
- <a href="https://youtu.be/wgkC8SxraAQ" target='_blank'>Exercise 2</a>
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What will print out after running this code:<pre>width = 15<br>height = 12.0<br>print(height/3)</pre>'
|
||||
answers:
|
||||
- '39'
|
||||
- '4'
|
||||
- '4.0'
|
||||
- '5.0'
|
||||
- '5'
|
||||
solution: 3
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,32 @@
|
||||
---
|
||||
id: 5e7b9f070b6c005b0e76f061
|
||||
title: Intermediate Strings
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: KgT_fYLXnyk
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
More resources:
|
||||
- <a href="https://www.youtube.com/watch?v=1bSqHot-KwE" target='_blank'>Exercise</a>
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What is the value of i in the following code?
|
||||
<pre>word = "bananana"<br>
|
||||
i = word.find("na")</pre>'
|
||||
answers:
|
||||
- 'nanana'
|
||||
- '2'
|
||||
- '3'
|
||||
- 'True'
|
||||
- 'na'
|
||||
solution: 2
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,30 @@
|
||||
---
|
||||
id: 5e6a54c358d3af90110a60a3
|
||||
title: 'Introduction: Elements of Python'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: aRY_xjL35v0
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What will the following program print out:
|
||||
<pre>x = 43<br>
|
||||
x = x + 1<br>
|
||||
print(x)</pre>'
|
||||
answers:
|
||||
- 'x'
|
||||
- 'x + 1'
|
||||
- '44'
|
||||
solution: 3
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,32 @@
|
||||
---
|
||||
id: 5e6a54af58d3af90110a60a1
|
||||
title: 'Introduction: Hardware Architecture'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: H6qtjRTfSog
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
</section>
|
||||
|
||||
## Instructions
|
||||
<section id='instructions'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'Where are your programs stored when they are running?'
|
||||
answers:
|
||||
- 'Hard Drive.'
|
||||
- 'Memory.'
|
||||
- 'Central Processing Unit.'
|
||||
solution: 2
|
||||
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,33 @@
|
||||
---
|
||||
id: 5e6a54ba58d3af90110a60a2
|
||||
title: 'Introduction: Python as a Language'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: 0QeGbZNS_bY
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
</section>
|
||||
|
||||
## Instructions
|
||||
<section id='instructions'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What will print out after running these two lines of code:
|
||||
<pre>x = 6<br>print(x)</pre>'
|
||||
answers:
|
||||
- 'x'
|
||||
- '6'
|
||||
- 'x = 6'
|
||||
- '(x)'
|
||||
solution: 2
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,29 @@
|
||||
---
|
||||
id: 5e6a54a558d3af90110a60a0
|
||||
title: 'Introduction: Why Program?'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: 3muQV-Im3Z0
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
More resources:
|
||||
- <a href="https://youtu.be/F7mtLrYzZP8" target='_blank'>Install Python on Windows</a>
|
||||
- <a href="https://youtu.be/wfLnZP-4sZw" target='_blank'>Install Python on MacOS</a>
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'Who should learn to program?'
|
||||
answers:
|
||||
- 'College students.'
|
||||
- 'People who want to become software developers.'
|
||||
- 'Everyone.'
|
||||
solution: 3
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,29 @@
|
||||
---
|
||||
id: 5e7b9f070b6c005b0e76f05d
|
||||
title: 'Iterations: Definite Loops'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: hiRTRAqNlpE
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'How many lines will the following code print?
|
||||
<pre>for i in [2,1,5]:<br> print(i)</pre>'
|
||||
answers:
|
||||
- '1'
|
||||
- '2'
|
||||
- '3'
|
||||
- '5'
|
||||
solution: 3
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,38 @@
|
||||
---
|
||||
id: 5e7b9f070b6c005b0e76f05e
|
||||
title: 'Iterations: Loop Idioms'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: AelGAcoMXbI
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```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?
|
||||
<pre>
|
||||
1|smallest = None<br>
|
||||
2|print("Before:", smallest)<br>
|
||||
3|for itervar in [3, 41, 12, 9, 74, 15]:<br>
|
||||
4| if smallest is None or itervar ⋖ smallest:<br>
|
||||
5| smallest = itervar<br>
|
||||
6| break<br>
|
||||
7| print("Loop:", itervar, smallest)<br>
|
||||
8|print("Smallest:", smallest)<br>
|
||||
</pre>'
|
||||
answers:
|
||||
- '3'
|
||||
- '4'
|
||||
- '6'
|
||||
- '7'
|
||||
solution: 3
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,29 @@
|
||||
---
|
||||
id: 5e7b9f070b6c005b0e76f05f
|
||||
title: 'Iterations: More Patterns'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: 9Wtqo6vha1M
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
More resources:
|
||||
- <a href="https://www.youtube.com/watch?v=kjxXZQw0uPg" target='_blank'>Exercise</a>
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'Which of these evaluates to False?'
|
||||
answers:
|
||||
- '0 == 0.0'
|
||||
- '0 is 0.0'
|
||||
- '0 is not 0.0'
|
||||
- '0 = 0.0'
|
||||
solution: 2
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,31 @@
|
||||
---
|
||||
id: 5e7b9f060b6c005b0e76f05c
|
||||
title: Loops and Iterations
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: dLA-szNRnUY
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What will the following code print out:
|
||||
<pre>
|
||||
n = 0<br>
|
||||
while True:<br> if n == 3:<br> break<br> print(n)<br> n = n + 1</pre>'
|
||||
answers:
|
||||
- '0<br>1<br>2'
|
||||
- '0<br>1<br>2<br>3'
|
||||
- '1<br>2'
|
||||
- '1<br>2<br>3'
|
||||
solution: 1
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,29 @@
|
||||
---
|
||||
id: 5e7b9f170b6c005b0e76f08b
|
||||
title: Make a Relational Database
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: MQ5z4bdF92U
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What SQL command would you use to retrieve all users that have the email address quincy@freecodecamp.org?'
|
||||
answers:
|
||||
- 'SELECT Users WHERE email="quincy@freecodecamp.org"'
|
||||
- 'SELECT Users WHERE email IS "quincy@freecodecamp.org"'
|
||||
- 'SELECT ALL Users WHERE email="quincy@freecodecamp.org"'
|
||||
- 'SELECT * FROM Users WHERE email IS "quincy@freecodecamp.org"'
|
||||
- 'SELECT * FROM Users WHERE email="quincy@freecodecamp.org"'
|
||||
solution: 5
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,41 @@
|
||||
---
|
||||
id: 5e7b9f060b6c005b0e76f059
|
||||
title: More Conditional Structures
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: HdL82tAZR20
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
More resources:
|
||||
- <a href="https://www.youtube.com/watch?v=crLerB4ZxMI" target='_blank'>Exercise 1</a>
|
||||
- <a href="https://www.youtube.com/watch?v=KJN3-7HH6yk" target='_blank'>Exercise 2</a>
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'Given the following code:<pre>
|
||||
1 |temp = "5 degrees"<br>
|
||||
2 |cel = 0<br>
|
||||
3 |try:<br>
|
||||
4 | fahr = float(temp)<br>
|
||||
5 | cel = (fahr - 32.0) * 5.0 / 9.0<br>
|
||||
6 |except:<br>
|
||||
7 | print("temp should be a number")<br>
|
||||
8 |print(cel)<br>
|
||||
</pre>
|
||||
Which line would cause the script to immediately stop because of an error?'
|
||||
answers:
|
||||
- '1'
|
||||
- '4'
|
||||
- '6'
|
||||
- '7'
|
||||
- 'None'
|
||||
solution: 2
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,28 @@
|
||||
---
|
||||
id: 5e7b9f0c0b6c005b0e76f072
|
||||
title: Networking Protocol
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: c6vZGescaSc
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What type of HTTP is request is usually used to access a website?'
|
||||
answers:
|
||||
- 'POST'
|
||||
- 'GET'
|
||||
- 'WEB'
|
||||
- 'ACCESS'
|
||||
solution: 2
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,27 @@
|
||||
---
|
||||
id: 5e7b9f0c0b6c005b0e76f074
|
||||
title: 'Networking: Text Processing'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: Pv_pJgVu8WI
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'Which type of encoding do most websites use?'
|
||||
answers:
|
||||
- 'UTF-8'
|
||||
- 'UTF-16'
|
||||
- 'UTF-32'
|
||||
solution: 1
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,31 @@
|
||||
---
|
||||
id: 5e7b9f0d0b6c005b0e76f075
|
||||
title: 'Networking: Using urllib in Python'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: 7lFM1T_CxBs
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: "What will the output of the following code be like:
|
||||
<pre>import urllib.request<br>
|
||||
<br>
|
||||
fhand = urllib.request.urlopen('http://data.pr4e.org/romeo.txt')<br>
|
||||
for line in fhand:<br> print(line.decode().strip())</pre>"
|
||||
answers:
|
||||
- 'Just contents of "romeo.txt".'
|
||||
- 'A header and the contents of "romeo.txt"'
|
||||
- 'A header, a footer, and the contents of "romeo.txt"'
|
||||
solution: 1
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,34 @@
|
||||
---
|
||||
id: 5e7b9f0d0b6c005b0e76f076
|
||||
title: 'Networking: Web Scraping with Python'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: Uyioq2q4cEg
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
More resources:
|
||||
- <a href="https://www.youtube.com/watch?v=dWLdI143W-g" target='_blank'>Exercise: socket1</a>
|
||||
- <a href="https://www.youtube.com/watch?v=8yis2DvbBkI" target='_blank'>Exercise: urllib</a>
|
||||
- <a href="https://www.youtube.com/watch?v=g9flPDG9nnY" target='_blank'>Exercise: urllinks</a>
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What Python library is used for parsing HTML documents and extracting data from HTML documents.'
|
||||
answers:
|
||||
- 'socket'
|
||||
- 'http'
|
||||
- 'BeautifulSoup'
|
||||
- 'PrettyBiscuit'
|
||||
- 'WonderfulSalad'
|
||||
- 'HttpParser'
|
||||
- 'GrunkleStan'
|
||||
solution: 3
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,28 @@
|
||||
---
|
||||
id: 5e7b9f0c0b6c005b0e76f071
|
||||
title: Networking with Python
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: _kJvneKVdNM
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What Python library gives access to TCP Sockets?'
|
||||
answers:
|
||||
- 'tcp'
|
||||
- 'socket'
|
||||
- 'http'
|
||||
- 'port'
|
||||
solution: 2
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,36 @@
|
||||
---
|
||||
id: 5e7b9f0c0b6c005b0e76f073
|
||||
title: 'Networking: Write a Web Browser'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: zjyT9DaAjx4
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: "What does the following code create?
|
||||
<pre>
|
||||
import socket<br>
|
||||
<br>
|
||||
mysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)<br>
|
||||
mysock.connect(('data.pr4e.org', 80))<br>
|
||||
cmd = 'GET http://data.pr4e.org/romeo.txt HTTP/1.0\r\n\r\n'.encode()<br>
|
||||
mysock.send(cmd)<br>
|
||||
<br>while True:<br> data = mysock.recv(512)<br> if len(data) < 1:<br> break<br> print(data.decode(),end='')<br><br>mysock.close()</pre>"
|
||||
answers:
|
||||
- 'simple web server'
|
||||
- 'simple email client'
|
||||
- 'simple todo list'
|
||||
- 'simple web browser'
|
||||
solution: 4
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,36 @@
|
||||
---
|
||||
id: 5e7b9f170b6c005b0e76f087
|
||||
title: Object Lifecycle
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: p1r3h_AMMIM
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: "What will the following program print:
|
||||
<pre>
|
||||
class PartyAnimal:<br> x = 0<br> name = ''<br> def __init__(self, nam):<br> self.name = nam<br> print(self.name,'constructed')<br><br> def party(self):<br> self.x = self.x + 1<br> print(self.name,'party count',self.x)<br>
|
||||
<br>
|
||||
q = PartyAnimal('Quincy')<br>
|
||||
m = PartyAnimal('Miya')<br>
|
||||
<br>
|
||||
q.party()<br>
|
||||
m.party()<br>
|
||||
q.party()"
|
||||
answers:
|
||||
- 'Quincy constructed<br>Miya constructed<br>Quincy party count 1<br>Miya party count 2<br>Quincy party count 3'
|
||||
- 'Quincy constructed<br>Miya constructed<br>Quincy party count 1<br>Miya party count 1<br>Quincy party count 2'
|
||||
- 'Quincy constructed<br>Quincy party count 1<br>Quincy party count 2<br>Miya constructed<br>Miya party count 1'
|
||||
solution: 2
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,33 @@
|
||||
---
|
||||
id: 5e7b9f160b6c005b0e76f086
|
||||
title: 'Objects: A Sample Class'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: FiABKEuaSJ8
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What will the following program print:
|
||||
<pre>class PartyAnimal:<br> x = 0<br><br> def party(self) :<br> self.x = self.x + 2<br> print(self.x)<br>
|
||||
<br>
|
||||
an = PartyAnimal()<br>
|
||||
an.party()<br>
|
||||
an.party()</pre>'
|
||||
answers:
|
||||
- 'So far 1<br>So far 2'
|
||||
- '0<br>0'
|
||||
- '2<br>2'
|
||||
- '1<br>2'
|
||||
solution: 4
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,28 @@
|
||||
---
|
||||
id: 5e7b9f170b6c005b0e76f088
|
||||
title: 'Objects: Inheritance'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: FBL3alYrxRM
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What is inheritance in object-oriented programming?'
|
||||
answers:
|
||||
- 'A new class created when a parent class is extended.'
|
||||
- 'A constructed instance of a class.'
|
||||
- 'The ability to create a new class by extending an existing class.'
|
||||
- 'A method that is called at the moment when a class is being used to construct an object. '
|
||||
solution: 3
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,33 @@
|
||||
---
|
||||
id: 5e7b9f090b6c005b0e76f067
|
||||
title: Python Dictionaries
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: dnzvfimrRMg
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What does dict equal after running this code?
|
||||
<pre>dict = {"Fri": 20, "Thu": 6, "Sat": 1}<br>
|
||||
dict["Thu"] = 13<br>
|
||||
dict["Sat"] = 2<br>
|
||||
dict["Sun"] = 9</pre>'
|
||||
answers:
|
||||
- "{'Fri': 20, 'Thu': 6, 'Sat': 1}"
|
||||
- "{'Fri': 20, 'Thu': 6, 'Sat': 1, 'Thu': 13, 'Sat': 2, 'Sun': 9}"
|
||||
- "{'Sun': 9}"
|
||||
- "{'Thu': 13, 'Sat': 2, 'Sun': 9}"
|
||||
- "{'Fri': 20, 'Thu': 13, 'Sat': 2, 'Sun': 9}"
|
||||
solution: 5
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,29 @@
|
||||
---
|
||||
id: 5e7b9f060b6c005b0e76f05a
|
||||
title: Python Functions
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: 3JGF-n3tDPU
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
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'
|
||||
solution: 4
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,30 @@
|
||||
---
|
||||
id: 5e7b9f080b6c005b0e76f064
|
||||
title: Python Lists
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: Y0cvfDpYC_c
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What is the value of x after running this code:
|
||||
<pre>fruit = "banana"<br>
|
||||
x = fruit[1]</pre>'
|
||||
answers:
|
||||
- 'banana'
|
||||
- 'a'
|
||||
- 'b'
|
||||
- 'True'
|
||||
solution: 2
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,28 @@
|
||||
---
|
||||
id: 5e7b9f160b6c005b0e76f085
|
||||
title: Python Objects
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: uJxGeTYy0us
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
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'
|
||||
solution: 4
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,29 @@
|
||||
---
|
||||
id: 5e7b9f080b6c005b0e76f062
|
||||
title: Reading Files
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: Fo1tW09KIwo
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What is used to indicate a new line in a string?'
|
||||
answers:
|
||||
- '\n'
|
||||
- '{new_line}'
|
||||
- '{n}'
|
||||
- '/n'
|
||||
- '/new'
|
||||
solution: 1
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,33 @@
|
||||
---
|
||||
id: 5e7b9f0b0b6c005b0e76f06f
|
||||
title: 'Regular Expressions: Matching and Extracting Data'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: LaCZnTbQGkE
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: "What will the following program print:
|
||||
<pre>
|
||||
import re<br>
|
||||
s = 'A message from csev@umich.edu to cwen@iupui.edu about meeting @2PM'<br>
|
||||
lst = re.findall('\\S+@\\S+', s)<br>
|
||||
print(lst)</pre>"
|
||||
answers:
|
||||
- "['csev@umich.edu', 'cwen@iupui.edu']"
|
||||
- "['csev@umich.edu']"
|
||||
- "['umich.edu', 'iupui.edu']"
|
||||
- "['csev@', 'cwen@']"
|
||||
solution: 1
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,28 @@
|
||||
---
|
||||
id: 5e7b9f0b0b6c005b0e76f070
|
||||
title: 'Regular Expressions: Practical Applications'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: xCjFU9G6x48
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What will search for a "$" in a regular expression?'
|
||||
answers:
|
||||
- '$'
|
||||
- '\dollar\'
|
||||
- '\$'
|
||||
- '!$'
|
||||
solution: 3
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,29 @@
|
||||
---
|
||||
id: 5e7b9f0b0b6c005b0e76f06e
|
||||
title: Regular Expressions
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: Yud_COr6pZo
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'Which regex matches a white space character?'
|
||||
answers:
|
||||
- '\S'
|
||||
- '\s'
|
||||
- '.'
|
||||
- '\_'
|
||||
- '\.'
|
||||
solution: 2
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,28 @@
|
||||
---
|
||||
id: 5e7b9f180b6c005b0e76f08c
|
||||
title: Relational Database Design
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: AqdfbrpkbHk
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What is the best practice for how many times a peice of string data should be stored in a database?'
|
||||
answers:
|
||||
- '0'
|
||||
- '1'
|
||||
- '2'
|
||||
- '3'
|
||||
solution: 2
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,28 @@
|
||||
---
|
||||
id: 5e7b9f170b6c005b0e76f08a
|
||||
title: 'Relational Databases and SQLite'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: QlNod5-kFpA
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'Which is NOT a primary data structures in a database?'
|
||||
answers:
|
||||
- 'index'
|
||||
- 'table'
|
||||
- 'row'
|
||||
- 'column'
|
||||
solution: 1
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,27 @@
|
||||
---
|
||||
id: 5e7b9f180b6c005b0e76f08f
|
||||
title: 'Relational Databases: Join Operation'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: jvDw3D9GKac
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'When using a JOIN clause in an SQL statement, what does ON do?'
|
||||
answers:
|
||||
- 'It indicates what tables to perform the JOIN on.'
|
||||
- 'It specifies the fields to use for the JOIN.'
|
||||
- 'It indicates how the two tables are to be joined.'
|
||||
solution: 3
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,33 @@
|
||||
---
|
||||
id: 5e7b9f190b6c005b0e76f090
|
||||
title: 'Relational Databases: Many-to-many Relationships'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: z-SBYcvEQOc
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
More resources:
|
||||
- <a href="https://www.youtube.com/watch?v=uQ3Qv1z_Vao" target='_blank'>Exercise: Email</a>
|
||||
- <a href="https://www.youtube.com/watch?v=qEkUEAz8j3o" target='_blank'>Exercise: Roster</a>
|
||||
- <a href="https://www.youtube.com/watch?v=I-E7avcPeSE" target='_blank'>Exercise: Tracks</a>
|
||||
- <a href="https://www.youtube.com/watch?v=RZRAoBFIH6A" target='_blank'>Exercise: Twfriends</a>
|
||||
- <a href="https://www.youtube.com/watch?v=xBaJddvJL4A" target='_blank'>Exercise: Twspider</a>
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'Which is an example of a many-to-many relationship?'
|
||||
answers:
|
||||
- 'teacher to student'
|
||||
- 'customer to order'
|
||||
- 'book to pages'
|
||||
- 'city to country'
|
||||
solution: 1
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,27 @@
|
||||
---
|
||||
id: 5e7b9f180b6c005b0e76f08e
|
||||
title: 'Relational Databases: Relationship Building'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: A-t18zKJvmo
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What does the INSERT command do in SQL?'
|
||||
answers:
|
||||
- 'It defines a new row by listing the fields we want to include followed by the values we want placed in the new row.'
|
||||
- 'It defines a new column by listing the rows we want to include followed by the values we want placed in the new column.'
|
||||
- 'It defines a new table by listing the rows and fields we want to include followed by the values that we want placed in the table.'
|
||||
solution: 1
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,28 @@
|
||||
---
|
||||
id: 5e7b9f180b6c005b0e76f08d
|
||||
title: Representing Relationships in a Relational Database
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: -orenCNdC2Q
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What is a foreign key?'
|
||||
answers:
|
||||
- 'A key that is not supposed to be there.'
|
||||
- 'A key that uses non-latin characters.'
|
||||
- 'A number that points to the primary key of an associated row in a different table.'
|
||||
- 'A key that the "real world" might use to look up a row.'
|
||||
solution: 3
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,33 @@
|
||||
---
|
||||
id: 5e7b9f090b6c005b0e76f066
|
||||
title: Strings and Lists
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: lxcFa7ldCi0
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
More resources:
|
||||
- <a href="https://www.youtube.com/watch?v=-9TfJF2dwHI" target='_blank'>Exercise</a>
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: "What does n equal in this code?
|
||||
<pre>words = 'His e-mail is q-lar@freecodecamp.org'<br>
|
||||
pieces = words.split()<br>
|
||||
parts = pieces[3].split('-')<br>
|
||||
n = parts[1]</pre>"
|
||||
answers:
|
||||
- 'mail'
|
||||
- 'q'
|
||||
- 'lar'
|
||||
- 'lar@freecodecamp.org'
|
||||
solution: 4
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,29 @@
|
||||
---
|
||||
id: 5e7b9f070b6c005b0e76f060
|
||||
title: Strings in Python
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: LYZj207fKpQ
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What will the following code print?
|
||||
<pre>for n in "banana":<br> print(n)</pre>'
|
||||
answers:
|
||||
- 'n<br>n'
|
||||
- '0<br>1'
|
||||
- '0<br>1<br>2<br>3<br>4<br>5'
|
||||
- 'b<br>a<br>n<br>a<br>n<br>a'
|
||||
solution: 4
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,29 @@
|
||||
---
|
||||
id: 5e7b9f0a0b6c005b0e76f06c
|
||||
title: The Tuples Collection
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: 3Lxpladfh2k
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: "What will the following code print?
|
||||
<pre>d = dict()<br>d['quincy'] = 1<br>d['beau'] = 5<br>d['kris'] = 9<br>for (k,i) in d.items():<br> print(k, i)</pre>"
|
||||
answers:
|
||||
- 'k i<br>k i<br>k i'
|
||||
- 'quincy 0<br>beau 1<br>kris 2'
|
||||
- 'quincy 1<br>beau 5<br>kris 9'
|
||||
- '1 quincy<br>5 beau<br>9 kris'
|
||||
solution: 3
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,29 @@
|
||||
---
|
||||
id: 5e7b9f0e0b6c005b0e76f07a
|
||||
title: Using Web Services
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: oNl1OVDPGKE
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What are the two most common ways to send data over the internet?'
|
||||
answers:
|
||||
- 'JSON and TXT'
|
||||
- 'JSON and XML'
|
||||
- 'XML and TXT'
|
||||
- 'XML and PHP'
|
||||
- 'PHP and TXT'
|
||||
solution: 2
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,28 @@
|
||||
---
|
||||
id: 5e7b9f050b6c005b0e76f056
|
||||
title: Variables, Expressions, and Statements
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: nELR-uyyrok
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What is the symbol is used in an assignment statement?'
|
||||
answers:
|
||||
- '~'
|
||||
- '&'
|
||||
- '='
|
||||
- '|'
|
||||
solution: 3
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,29 @@
|
||||
---
|
||||
id: 5e7b9f690b6c005b0e76f095
|
||||
title: Visualizing Data with Python
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: e3lydkH0prw
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'Most data needs to be ______ before using it.'
|
||||
answers:
|
||||
- 'converted to JSON format'
|
||||
- 'graphed'
|
||||
- 'cleaned'
|
||||
- 'memorized'
|
||||
- 'turned into song'
|
||||
solution: 3
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,32 @@
|
||||
---
|
||||
id: 5e7b9f150b6c005b0e76f080
|
||||
title: 'Web Services: API Rate Limiting and Security'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: pI-g0lI8ngs
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
More resources:
|
||||
- <a href="https://www.youtube.com/watch?v=TJGJN0T8tak" target='_blank'>Exercise: GeoJSON</a>
|
||||
- <a href="https://www.youtube.com/watch?v=vTmw5RtfGMY" target='_blank'>Exercise: JSON</a>
|
||||
- <a href="https://www.youtube.com/watch?v=2c7YwhvpCro" target='_blank'>Exercise: Twitter</a>
|
||||
- <a href="https://www.youtube.com/watch?v=AopYOlDa-vY" target='_blank'>Exercise: XML</a>
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'When making a request from the Twitter API, what information must always be sent with the request?'
|
||||
answers:
|
||||
- 'Twitter username'
|
||||
- 'date range'
|
||||
- 'search term'
|
||||
- 'key'
|
||||
solution: 4
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,28 @@
|
||||
---
|
||||
id: 5e7b9f150b6c005b0e76f07f
|
||||
title: 'Web Services: APIs'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: oUNn1psfBJg
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What does API stand for?'
|
||||
answers:
|
||||
- 'Application Portable Intelligence'
|
||||
- 'Accociate Programming International'
|
||||
- 'Application Program Interface'
|
||||
- 'Action Portable Interface'
|
||||
solution: 3
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,35 @@
|
||||
---
|
||||
id: 5e7b9f140b6c005b0e76f07d
|
||||
title: 'Web Services: JSON'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: ZJE-U56BppM
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: "What will the following code print?
|
||||
<pre>import json<br>
|
||||
<br>
|
||||
data = '''<br>[<br> { 'id' : '001',<br> 'x' : '2',<br> 'name' : 'Quincy'<br> } ,<br> { 'id' : '009',<br> 'x' : '7',<br> 'name' : 'Mrugesh'<br> }<br>]'''<br>
|
||||
<br>
|
||||
info = json.loads(data)<br>
|
||||
print(info[1]['name'])</pre>"
|
||||
answers:
|
||||
- 'Quincy'
|
||||
- 'Mrugesh'
|
||||
- '001'
|
||||
- '009'
|
||||
- '[Error]'
|
||||
solution: 2
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,27 @@
|
||||
---
|
||||
id: 5e7b9f140b6c005b0e76f07e
|
||||
title: 'Web Services: Service Oriented Approach'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: muerlsCHExI
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'With a services oriented approach to developing web apps, where is the data located.'
|
||||
answers:
|
||||
- 'Spread across many computer systems connected via the internet or internal network.'
|
||||
- 'Within different services on the main web server.'
|
||||
- 'On a separate database server.'
|
||||
solution: 1
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,27 @@
|
||||
---
|
||||
id: 5e7b9f0e0b6c005b0e76f07c
|
||||
title: 'Web Services: XML Schema'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: yWU9kTxW-nc
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What is XSD?'
|
||||
answers:
|
||||
- 'The W3C Schema specification for XML.'
|
||||
- 'The standard JSON schema from MOZ.'
|
||||
- 'Extensible Situational Driver'
|
||||
solution: 1
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,33 @@
|
||||
---
|
||||
id: 5e7b9f0e0b6c005b0e76f07b
|
||||
title: 'Web Services: XML'
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: _pZ0srbg7So
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'What is wrong with the following XML?
|
||||
<pre><person><br>
|
||||
<name>Chuck</name><br>
|
||||
<phone type="intl"><br> +1 734 303 4456<br>
|
||||
<email hide="yes" /><br>
|
||||
</person></pre>'
|
||||
answers:
|
||||
- 'Email tag is missing closing tag.'
|
||||
- 'Spacing will cause XML to be invalid.'
|
||||
- 'Phone tag is missing closing tag.'
|
||||
- 'Plain text should be encoded using UTF-8.'
|
||||
solution: 3
|
||||
```
|
||||
|
||||
</section>
|
@ -0,0 +1,28 @@
|
||||
---
|
||||
id: 5e7b9f090b6c005b0e76f065
|
||||
title: Working with Lists
|
||||
challengeType: 11
|
||||
isRequired: true
|
||||
videoId: lCnHfTHkhbE
|
||||
---
|
||||
|
||||
## Description
|
||||
<section id='description'>
|
||||
|
||||
</section>
|
||||
|
||||
## Tests
|
||||
<section id='tests'>
|
||||
|
||||
```yml
|
||||
question:
|
||||
text: 'Which method is used to add an item at the end of a list?'
|
||||
answers:
|
||||
- 'insert'
|
||||
- 'push'
|
||||
- 'append'
|
||||
- 'new'
|
||||
solution: 3
|
||||
```
|
||||
|
||||
</section>
|
Reference in New Issue
Block a user