Crecimiento Celular / cell growth | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Crecimiento Celular / cell growth

No puedo hacer que el programa me tire un salto de linea al terminar cada while, cuando lo tiro en cualquier IDE me lo hace pero en la pagina no. # tomar la población celular inicial como entrada cells = int(input()) # tomar el número de días como entrada days = int(input()) # inicializar el contador de días counter = 1 # completar el bucle while while counter <= days: cells = cells * 2 # Mensaje diario print("Day " + str(counter) + ":" +str(cells)) counter += 1

14th Feb 2024, 6:15 PM
Martin Gonzalo
Martin Gonzalo - avatar
7 Answers
+ 2
You are missing a blank space after ": " Don't get confused by the shown output. I don't know why it looks wrong, but the code is correct when you add the blank space.
15th Feb 2024, 9:23 PM
Lisa
Lisa - avatar
+ 1
link your code give a complete task description tag the relevant programming language
14th Feb 2024, 6:30 PM
Lisa
Lisa - avatar
0
Martin Gonzalo , I see a new line with every print in both the Sololearn Playground and Pydroid 3 IDE. Input: 1 8 Output: Day 1:2 Day 2:4 Day 3:8 Day 4:16 Day 5:32 Day 6:64 Day 7:128 Day 8:256
15th Feb 2024, 9:51 AM
Rain
Rain - avatar
0
Lo ejecuto desde la pagina y me lanza de esta forma el output Day 1:6Day 2:12
15th Feb 2024, 6:17 PM
Martin Gonzalo
Martin Gonzalo - avatar
0
Martin Gonzalo , I use the Android app to access Sololearn. What do you use?
15th Feb 2024, 9:17 PM
Rain
Rain - avatar
0
Lo e intentado hacer con la aplicación android y desde el pc, pero el error sigue, en un ejercicio anterior supe tener el mismo problema que esta todo el código bien escrito pero el salto de linea en los while no lo realizaba, no se si sera un bug.
16th Feb 2024, 12:38 AM
Martin Gonzalo
Martin Gonzalo - avatar
0
Martin Gonzalo , Interesting. I think you should ask support info@sololearn.com since you get different behavior on the Android app than I get on the Android app. It's something weird or strange.
16th Feb 2024, 2:06 AM
Rain
Rain - avatar