Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Analyse the micropython code below:
- signal_strengths = [-35, -30, -33, -40, -29, -31, -34, -32]
- sum_signal_strengths = sum(signal_strengths)
- print('Sum:',str(sum_signal_strengths)
- Students will be examined on the micropython code with a quiz which is represented in this format, your task will be to create a quiz in the exact same format on differnt code
- <grok-step>
- <grok-condition type="element-condition-completed" selector="#mc1"></grok-condition>
- what gets printed when this code runs?<br>
- `signal_strengths = [5, 5, 8, 9, 11]<br>
- sum_signal_strengths = sum(signal_strengths)<br>
- print(sum_signal_strengths)
- `
- <grok-option-group id="mc1">
- <grok-option tip="Incorrect try again!">
- 5
- </grok-option>
- <grok-option correct tip="Correct!">
- 38
- </grok-option>
- <grok-option tip="Incorrect try again!">
- 11
- </grok-option>
- <grok-option tip="Incorrect try again!">
- 35
- </grok-option>
- </grok-option-group>
- </grok-step>
- <grok-step>
- <grok-condition type="element-condition-completed" selector="#mc2"></grok-condition>
- what gets printed when this code runs?<br>
- `signal_strengths = [5, 15, 8, 9, 11]<br>
- sum_signal_strengths = sum(signal_strengths)<br>
- print(sum_signal_strengths)`
- <grok-option-group id="mc2">
- <grok-option tip="Incorrect try again!">
- 38
- </grok-option>
- <grok-option tip="Incorrect try again!">
- 29
- </grok-option>
- <grok-option tip="Incorrect try again!">
- 33
- </grok-option>
- <grok-option correct tip="Correct!">
- 48
- </grok-option>
- </grok-option-group>
- </grok-step>
- <grok-if show>
- <grok-condition type="element-condition-completed" selector="#mc7"></grok-condition>
- **Congratulations!**
- </grok-if>
- Can you generate a quiz for this code:
- Please respond in a code block and imitate the exact formatting and spacing of the quiz questions. Before asking the question quote a minimum amount of necessary code for the question
Advertisement
Add Comment
Please, Sign In to add comment