Sanjin1

Quiz Prompt

Apr 10th, 2023 (edited)
769
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.06 KB | Software | 0 0
  1. Analyse the micropython code below:
  2.  
  3.  
  4. signal_strengths = [-35, -30, -33, -40, -29, -31, -34, -32]
  5. sum_signal_strengths = sum(signal_strengths)
  6.  
  7. print('Sum:',str(sum_signal_strengths)
  8.  
  9.  
  10. 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
  11.  
  12.  
  13. <grok-step>
  14.   <grok-condition type="element-condition-completed" selector="#mc1"></grok-condition>
  15.  
  16. what gets printed when this code runs?<br>
  17. `signal_strengths = [5, 5, 8, 9, 11]<br>
  18. sum_signal_strengths = sum(signal_strengths)<br>
  19. print(sum_signal_strengths)
  20. `
  21.  
  22.  <grok-option-group id="mc1">
  23.    
  24.    <grok-option tip="Incorrect try again!">
  25.  
  26. 5
  27.    
  28.   </grok-option>
  29.  
  30.    
  31.   <grok-option correct tip="Correct!">
  32.  
  33. 38
  34.  
  35.   </grok-option>
  36.    
  37.    <grok-option tip="Incorrect try again!">
  38.  
  39. 11
  40.    
  41.   </grok-option>
  42.    
  43.   <grok-option tip="Incorrect try again!">
  44.  
  45. 35
  46.    
  47.   </grok-option>
  48.    
  49.  
  50.   </grok-option-group>
  51.  
  52. </grok-step>
  53.  
  54.  
  55.  
  56. <grok-step>
  57.   <grok-condition type="element-condition-completed" selector="#mc2"></grok-condition>
  58.  
  59. what gets printed when this code runs?<br>
  60. `signal_strengths = [5, 15, 8, 9, 11]<br>
  61. sum_signal_strengths = sum(signal_strengths)<br>
  62. print(sum_signal_strengths)`
  63.  
  64.  <grok-option-group id="mc2">
  65.    
  66.    <grok-option tip="Incorrect try again!">
  67.  
  68. 38
  69.    
  70.   </grok-option>
  71.    
  72.    
  73.    <grok-option tip="Incorrect try again!">
  74.  
  75. 29
  76.    
  77.   </grok-option>
  78.    
  79.   <grok-option tip="Incorrect try again!">
  80.  
  81. 33
  82.    
  83.   </grok-option>
  84.  
  85.  
  86.    <grok-option correct tip="Correct!">
  87.  
  88. 48
  89.  
  90.   </grok-option>
  91.    
  92.    
  93.   </grok-option-group>
  94.  
  95. </grok-step>
  96.  
  97.  
  98. <grok-if show>
  99. <grok-condition type="element-condition-completed" selector="#mc7"></grok-condition>
  100.  
  101. **Congratulations!**
  102.  
  103. </grok-if>
  104.  
  105.  
  106. Can you generate a quiz for this code:
  107.  
  108.  
  109.  
  110. 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
  111.  
Tags: Prompt
Advertisement
Add Comment
Please, Sign In to add comment