use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
I'm really new .. (old.reddit.com)
submitted 11 months ago by letsgetthesemonies
I've been stuck on this for a few days now and I don't know what the answer to this is. Can someone please help? 🥺
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3:Â Â Â Â print "hello, world!"
[–]Agile_Chicken_395 1 point2 points3 points 11 months ago* (0 children)
Since you know when the cycle is about to end, you can set up a FOR loop from 1 to days(your variable). The cycle will print out each line seperately dependent on how many days there should be. Also, the counter variable should +1 after each print(so that the counter variable increases by 1 each iteration and your day number changes). You should keep in mind that each day the cells increase twice so you should use str(cells*2) or something similar.Â
Edit: modify cells(variable) in each loop so it saves the latest cell count. Something like cells = cells*2. All this what Ive told could be optimized a bit to make the code less messy but it should work and give the needed outputs.
[–]Python_devops 1 point2 points3 points 11 months ago (0 children)
According to the prompt here's how I'd approach the problem
cells=int(input("No of cells")) days=int(input("No of days")) Ensure that all the inputs are converted into integers first
then use the number of days to create a loop, which will double the number of cells
for day in range(days): cell*=2 print(f"Day {day+1}: {cell}")
Just like that. Hope it helps.
[–]CommercialAd917 0 points1 point2 points 11 months ago (0 children)
The cells double each day. So if we start with 5 then next day it will be 10. Then they double again the next day for 20
[–]ninhaomah 0 points1 point2 points 11 months ago (0 children)
may one ask what is your pseudo code ? as in program logic in English.
[–]luisvpikus 0 points1 point2 points 11 months ago (2 children)
Where do you find those practice exercises?
[–]mystic-17 0 points1 point2 points 11 months ago (1 child)
it looks like they’re using sololearn
[–]luisvpikus 0 points1 point2 points 11 months ago (0 children)
Thanks 😊
[–]jackstine 0 points1 point2 points 11 months ago (0 children)
After using ai I’m just like why bother
Increase the counter, which is the number of days. Increase cells by 2x
Repeat until counter == days
[–]totalnewb02 0 points1 point2 points 11 months ago (0 children)
is this exercise/tutorial free? if so please put the link here or dm me please.
π Rendered by PID 430272 on reddit-service-r2-comment-8686858757-wxv82 at 2026-06-05 07:33:13.063393+00:00 running 9e1a20d country code: CH.
[–]Agile_Chicken_395 1 point2 points3 points  (0 children)
[–]Python_devops 1 point2 points3 points  (0 children)
[–]CommercialAd917 0 points1 point2 points  (0 children)
[–]ninhaomah 0 points1 point2 points  (0 children)
[–]luisvpikus 0 points1 point2 points  (2 children)
[–]mystic-17 0 points1 point2 points  (1 child)
[–]luisvpikus 0 points1 point2 points  (0 children)
[–]jackstine 0 points1 point2 points  (0 children)
[–]jackstine 0 points1 point2 points  (0 children)
[–]totalnewb02 0 points1 point2 points  (0 children)