'I need to keep multiplying found values by two with a list and a value
They gave me the first two lines of code. I thought I knew how to do it but I don't really understand what I'm missing.
class Solution:
def findFinalValue(self, nums: List[int], original: int) -> int:
if original in nums:
for original in nums:
original = original * 2
print(original)
else:
print(original)
yeyo = Solution()
yeyo.findFinalValue()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
