Implement the following code: profit = 90 good quarter = 0 while profit > 0: profit profit - 10 good quarter = good quar
-
- Posts: 43759
- Joined: Sat Aug 07, 2021 7:38 am
Implement the following code: profit = 90 good quarter = 0 while profit > 0: profit profit - 10 good quarter = good quar
Implement the following code: profit = 90 good quarter = 0 while profit > 0: profit profit - 10 good quarter = good quarter + 1 What is the final value of the variable good quarter ? type your answer here Submit Sum up all the integers from 2 to 67 with a for loop by filling in the blank in the code snippet below: sum = 0 for i in range(______): sum sum + i type your answer here Submit Modify your code from the above problem. Instead of using a for loop, use a list comprehension. Use the variable i as the indexer in the list comprehension and apply the function sum() to the list. Provide your code as the answer. type your answer here Submit Modify your code from the above problem. Sum up the squares of the integers instead of just the integers. What is the result? ranewer here Submit