Post

Kamal Gurjar
Kamal Gurjar@KamalGurjar8·
@PythonPr Top one runs ✅ Bottom one fails ❌ because Python is case-sensitive: while is a keyword, While is treated as a name → SyntaxError.
English
1
0
27
3.3K
Jenny
Jenny@JennyTheDev·
@PythonPr One capital letter. That's it. That's the bug you'll spend 3 hours debugging. Python is case-sensitive and has no mercy.
English
0
0
12
2.3K
Sixtus Agbakwuru
Sixtus Agbakwuru@SixtusAgbakwuru·
@PythonPr The first one used lowercase letter 'w', while the second one use uppercase letter 'W'. Python is case-sensitive, so using While or WHILE will cause a SyntaxError. All Python keywords are lowercase, with the exceptions of True, False, and None.
English
0
0
9
3.2K
Python Tech
Python Tech@PythonTech43716·
@PythonPr Top code will run But second code will not work because python is case sensitive language and While is written in capital letter.
English
0
0
3
344
Radio
Radio@MrRex_official·
@PythonPr While is not a key word, while is.
English
0
0
2
961
The root of infinity
The root of infinity@parth_hirpara05·
Ans---- The second code block is incorrect because Python is case-sensitive, and the While keyword is not recognized. The first code block uses the lowercase while keyword, which is the correct syntax for a while loop in Python. It will successfully print the numbers 1 through 7. The second code block uses While, which causes a syntax error because Python treats While and while as different identifiers.
English
0
0
1
231
Himal
Himal@himalbhattaraix·
@PythonPr "while" is a valid keyword, but "While" is not
English
0
0
1
190
Earnest Codes
Earnest Codes@Earnesto037·
@PythonPr The difference is the capitalization of the "while" keyword. In Python, keywords are case-sensitive. The correct syntax for a while loop requires the keyword to be in lowercase. The first example uses while i <= 7, which is valid Python syntax and will execute the loop.
English
1
0
1
474
Droid | Code
Droid | Code@DriodXL·
@PythonPr Python is letter sensitive. "W" upper case, gets Python confused. It will display a SyntaxError, which mean I don't understand the Language "While" pointing at "W" to tell the user, the error is from this place.
English
0
0
1
163
Ranjan
Ranjan@Ranjanrgdev·
@PythonPr In second part W is in capital letter we can't start while with capital W
English
0
0
1
1.2K
ExamAdda
ExamAdda@examaddaorg·
@PythonPr In 2nd block of code W is capital letters
English
0
0
0
7
Sean T. Rassleagh
Sean T. Rassleagh@rassleagh·
@PythonPr 'Claude fix the syntax errors, run the unit test and resolve any bugs then check it in with an appropriate comment.'
English
0
0
0
16
Mariana Dias
Mariana Dias@Mariana13591573·
@PythonPr W with a capital letter
Mogi das Cruzes, Brasil 🇧🇷 English
0
0
0
5
Jimmy Apollo
Jimmy Apollo@JimmyApolloArg·
@PythonPr While instead of while. Python si cap sensitive.
English
0
0
0
35
KellyDukesjr
KellyDukesjr@KDukesjr·
@PythonPr "W" in while is capitalized and python is case sensitive.
English
0
0
0
27
I-share