Zolenskify
Zolenskify
Fire Ologist
Zolenskify
Zolenskify
Zolenskify
Fire Ologist
An issue here is with the arbitrariness of what a rock consists of. — Vaskane
Zolenskify
I can't change your mind. I think it's too late. — Fire Ologist
punos
Fire Ologist
punos
rocks = 0 # beginning at 0
while rocks < 2:
rocks += 1
print(rocks)
rocks = 1 # beginning at 1
while rocks < 2:
rocks += 1
print(rocks)
Fire Ologist
"Counting" may start at 1. Numbers, however, do not "start" — 180 Proof
Only started counting rocks when I picked up the first one. So, numbers start at one. — Zolenskify
punos
There is nothing correct or incorrect about the output, it is just the way you programmed it and how Python works. — Lionino
Fooloso4
... are we strictly talking about igneous rocks, or do you prefer another type? — Zolenskify
Pantagruel
punos
rocks = 0 # beginning at 0
while rocks < 2:
rocks += 1
print(rocks)
punos
punos
And the fact that one piece of code counts "correctly" and the other "incorrectly" (like ChatGPT says) begs the question as to why one is right and the other wrong, which is the thread's topic. — Lionino
Zolenskify
Fooloso4
...my legs are like works of art. — Zolenskify
Dawnstorm
The relevance lies in the logic, not the programming language. There is a right and a wrong way to count. When counting rocks, it is essential to establish whether there are already rocks present. If i have 2 rocks and then pick up and count another rock, i will have 3 rocks (the count begins at 2). Conversely, if i don't have any rocks and then pick up and count 1 rock, i will have just 1 rock (the count begins at 0). — punos
Get involved in philosophical discussions about knowledge, truth, language, consciousness, science, politics, religion, logic and mathematics, art, history, and lots more. No ads, no clutter, and very little agreement — just fascinating conversations.