Skip to content

Tag: for-loop

For loop to get prime numbers [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 1 y…

iterate through a tuple to form a string

I am trying to create a function named make_string, that uses * correctly with a parameter: strings The function should return a string of all the values supplied joined, and separated by a space. Outside the make_string function, I declare a variable named my_string, and assign the value returned from the ma…

Nested FOR loops – coding challenge

I am learning python using STEPIK and I am facing this: I want on every iteration of the inside for loop sum the values of predicted_growth list with the value of cases list, save it in some temporary variable and print it. Click on the link for the full challenge. This is my code so far: This is the output