Post

Python Programming
Python Programming@PythonPr·
Python Question / Quiz; What is the output of the following Python code, and why? Comment your answers below!
Python Programming tweet media
English
35
13
151
14.9K
Kamal Gurjar
Kamal Gurjar@KamalGurjar8·
@PythonPr Output: A) 3 2 1 The loop starts with count = 3 and runs while count > 0. Each iteration prints the current value and then decrements it by 1. Using end=" " keeps everything on the same line.
English
0
0
9
1.1K
Sergei Kotov
Sergei Kotov@kotov_dev·
A) 3 2 1 Step by step: › Loop 1: count=3, prints "3 ", count becomes 2 › Loop 2: count=2, prints "2 ", count becomes 1 › Loop 3: count=1, prints "1 ", count becomes 0 › Loop ends (0 > 0 is False) For beginners: end=" " prints a space instead of a newline, so the 3 numbers appear on one line.
English
0
0
8
560
Python Tech
Python Tech@PythonTech43716·
@PythonPr A) 3 2 1 is the right answer Beacuse for each iteration the value of count keeps decrease from 3,2,1.
English
0
0
1
563
follow follow
follow follow@SegunAdebiyi12·
@PythonPr If na like this python take simple, I for happy😊
English
0
0
1
44
Ihechukwu Ngumezi
Ihechukwu Ngumezi@devihechukwu·
@PythonPr Output is A. The loop starts with count= 3 and decreases by 1 Then end parameter is passed a space as argument so the space is placed in between various results of count
English
0
0
1
381
Medvěd Handpanier
Medvěd Handpanier@handpanier·
@PythonPr pane boze proc? vy jste spali 30 let a nevite, ze do VS Code, patri GPT 5.2 MAX, kterej dela milionkrat slozitejsi veci a tyto veci, akorat zasiraji hlavu? kdyby jste videl co jsem v pythonu naprogramoval bez znalosti takovych kokotin, tak si uvedomite, ze tohle je knicemu...
Čeština
0
0
0
1
Paylaş