Post

RESISTANCE OUNGA
RESISTANCE OUNGA@Resistanceounga·
@PythonPr 1. The function func_x(x) is called with "python" as an argument. 2. Inside the function: x = x + '2' → "python" + "2" results in "python2". x = x * 2 → "python2" * 2 results in "python2python2". 3. The function returns "python2python2". Correct answer: C. python2python2
English
0
0
0
963
Abhishek Yadav
Abhishek Yadav@abhishek__AI·
@PythonPr Ans is python2python2 Within the function x is a local variable. First, python concatenated with 2, resulting in python2. Then, "python2" is multiplied by 2 which repeats the string, giving python2python2.
English
0
0
0
1.4K
🃏
🃏@x_tLn_·
@PythonPr Easily C. First like concatenates x with ‘2’ Second line duplicates the concatenation
English
0
0
0
677
Prem Prakash
Prem Prakash@4EverPrem·
@PythonPr C python is a string and same is 2 in line 2. Therefore, line 2 concatenates python & 2. Line 3 multiplies it two times, thus output is python2python2
English
0
0
0
583
Oliver Quynh
Oliver Quynh@oliverquynh·
@PythonPr I first guessed it was A. Error. But, after trying, I know it's C. python2python2. I'm new to Python. It's weird because a number plus (+) a string will raise an Error but multiplication is accepted.
English
0
0
0
84
Aniruddha Athavale
Aniruddha Athavale@athava1·
@PythonPr Option C: python2ython2 Since for 1st time concatenating 2 strings i.e. python and 2 and then in the next line multiplying string
English
0
0
0
88
Paylaş