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
44
9
130
13.6K
Himanshu Kumar
Himanshu Kumar@codewithimanshu·
@PythonPr Alright, Python, that's a fun quiz! The output depends on how the code's written, but curious to see what everyone else thinks, yaar.
English
0
0
1
155
Earnest Codes
Earnest Codes@Earnesto037·
@PythonPr Answer: B) Y The code snippet initializes two variables, X and Y, with values 8 and 2 respectively. It then reassigns new values to both variables by adding 6 to their current values. The final line print("y") is a function call that prints the literal string "y" to the .
English
1
0
9
823
geoff
geoff@badv0k·
@PythonPr None of the above .. small y is the output
English
0
0
2
82
SpacePenguin
SpacePenguin@TheLazyCompiler·
@PythonPr Lower case y. It's a string ... And isn't a variable... Don't know if I'm even saying it right.
English
0
0
2
226
Harmony Patel
Harmony Patel@harmonypatel27·
@PythonPr None of these, because the output will be y, not Y.
English
0
0
1
86
Free
Free@Freemanpoor·
@PythonPr these answers are not standard
English
0
0
1
64
Smol
Smol@SmolPyDev·
@PythonPr the lowercase letter "y" because the letter is in quotes
English
0
0
0
2
Paylaş