2020-04-06 14:49:56 -04:00
|
|
|
---
|
|
|
|
id: 5e7b9f060b6c005b0e76f059
|
2020-04-21 23:37:02 -05:00
|
|
|
title: More Conditional Structures
|
2020-04-06 14:49:56 -04:00
|
|
|
challengeType: 11
|
|
|
|
videoId: HdL82tAZR20
|
|
|
|
---
|
|
|
|
|
|
|
|
## Description
|
2020-06-06 15:20:30 +05:30
|
|
|
|
2020-04-06 14:49:56 -04:00
|
|
|
<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
|
2020-06-06 15:20:30 +05:30
|
|
|
|
2020-04-06 14:49:56 -04:00
|
|
|
<section id='tests'>
|
|
|
|
|
2020-06-06 15:20:30 +05:30
|
|
|
````yml
|
2020-04-06 14:49:56 -04:00
|
|
|
question:
|
2020-05-31 13:57:09 +01:00
|
|
|
text: |
|
|
|
|
Given the following code:
|
|
|
|
```python
|
|
|
|
temp = "5 degrees"
|
|
|
|
cel = 0
|
2020-06-06 15:20:30 +05:30
|
|
|
fahr = float(temp)
|
|
|
|
cel = (fahr - 32.0) * 5.0 / 9.0
|
2020-05-31 13:57:09 +01:00
|
|
|
print(cel)
|
|
|
|
```
|
2020-06-06 15:20:30 +05:30
|
|
|
Which line/lines should be surrounded by `try` block?
|
2020-05-31 13:57:09 +01:00
|
|
|
|
2020-04-06 14:49:56 -04:00
|
|
|
answers:
|
2020-05-31 13:57:09 +01:00
|
|
|
- |
|
2020-08-04 20:56:41 +01:00
|
|
|
1
|
2020-05-31 13:57:09 +01:00
|
|
|
- |
|
2020-08-04 20:56:41 +01:00
|
|
|
3
|
2020-05-31 13:57:09 +01:00
|
|
|
- |
|
2020-08-04 20:56:41 +01:00
|
|
|
3,4
|
2020-05-31 13:57:09 +01:00
|
|
|
- |
|
2020-08-04 20:56:41 +01:00
|
|
|
4
|
2020-05-31 13:57:09 +01:00
|
|
|
- |
|
2020-06-06 15:20:30 +05:30
|
|
|
None
|
|
|
|
solution: 3
|
|
|
|
````
|
2020-04-06 14:49:56 -04:00
|
|
|
|
|
|
|
</section>
|