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 Xu hướng
- 1. #WorldSeries 216K posts
- 2. Freddie Freeman 74.6K posts
- 3. Dodgers 271K posts
- 4. Klein 215K posts
- 5. Good Tuesday 24.4K posts
- 6. Grokipedia 92.6K posts
- 7. Ohtani 142K posts
- 8. Wikipedia 67.6K posts
- 9. #tuesdayvibe 1,518 posts
- 10. $PYPL 30.7K posts
- 11. #Worlds2025 13K posts
- 12. USS George Washington 21.6K posts
- 13. Kershaw 20.4K posts
- 14. Wordle 1,592 X N/A
- 15. Lauer 5,298 posts
- 16. Mookie 15.7K posts
- 17. Joe Davis 2,349 posts
- 18. Yamamoto 30.5K posts
- 19. 18 INNINGS 16.4K posts
- 20. Fuentes 50.3K posts
Loading...
Something went wrong.
Something went wrong.