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
923
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
72
United States トレンド
- 1. Good Monday 34.4K posts
- 2. #MondayMotivation 28.9K posts
- 3. $IREN 8,861 posts
- 4. #RomanEmpireByBangChan 20.9K posts
- 5. ROMAN EMPIRE OUT NOW 17.8K posts
- 6. Victory Monday 1,232 posts
- 7. Howie 2,415 posts
- 8. #MondayVibes 2,022 posts
- 9. 60 Minutes 90.2K posts
- 10. Jayden 44K posts
- 11. Talus 23.5K posts
- 12. Coppertone N/A
- 13. $KITE 5,355 posts
- 14. #STARDOM 5,877 posts
- 15. Snopes 3,678 posts
- 16. jungkook 574K posts
- 17. Dan Quinn 7,509 posts
- 18. Jaelan Phillips 1,274 posts
- 19. Commanders 52.1K posts
- 20. Godzilla 51.2K posts
Loading...
Something went wrong.
Something went wrong.