def add(x, y): x += y return x a = 5 b = 3 c = add(a, b) print(a) ————————————— A- 8 B- 5 C- 3 D- Error #Python #برمجة
2
0
1
2
920
Hi .. py beginner. Pydroid3 gives answer 5. Is that correct, pls advise or reference. I thought it wld add x(5) to y(3) giving 8 and put 8 back in x returning 8 as answer. Wheres the flaw in my thinking please. If answer is 5 then why hasn't x been incremented. thanks. G
0
0
0
0
71
United States 趨勢
- 1. $ZOOZ N/A
- 2. #IDontWantToOverreactBUT 1,849 posts
- 3. SNAP 619K posts
- 4. Jamaica 82.5K posts
- 5. #MondayMotivation 37.2K posts
- 6. Victory Monday 3,341 posts
- 7. #HardRockBet 1,926 posts
- 8. $QCOM 13.1K posts
- 9. Good Monday 52.5K posts
- 10. jungkook 344K posts
- 11. MRIs 1,779 posts
- 12. #MondayVibes 3,713 posts
- 13. WINWIN 23.1K posts
- 14. #ElCaribeBajoAmenaza 2,837 posts
- 15. Milei 695K posts
- 16. Melissa 117K posts
- 17. Happy Sports Equinox N/A
- 18. Walter Reed 5,247 posts
- 19. Jack DeJohnette 1,974 posts
- 20. Brock 9,491 posts
Loading...
Something went wrong.
Something went wrong.