no output when i call the function
def count(numbers):
total = 0
for x in numbers:
while x < 20:
total += 1
return total
count(nums)
why there is no output
1 answers ( 0 marked as helpful)
Hi Abdelrahman!
Thanks for reaching out.
Please, use the following code:
def count(numbers):
total = 0
for x in numbers:
if x < 20:
total += 1
return total
Hope this helps.
Best,
Tsvetelin