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
924
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 Trends
- 1. Cheney 146K posts
- 2. Election Day 135K posts
- 3. Jakobi Meyers 5,334 posts
- 4. Mamdani 584K posts
- 5. #csm219 4,081 posts
- 6. Logan Wilson 8,770 posts
- 7. Cuomo 286K posts
- 8. Iraq 57.9K posts
- 9. New Jersey 212K posts
- 10. Shota 17.8K posts
- 11. GO VOTE 104K posts
- 12. Waddle 6,325 posts
- 13. #TheView N/A
- 14. New York City 176K posts
- 15. #Election2025 3,192 posts
- 16. New Yorkers 85.4K posts
- 17. #いい推しの日 748K posts
- 18. #tuesdayvibe 2,733 posts
- 19. Rolex 18.1K posts
- 20. Jags 3,467 posts
Loading...
Something went wrong.
Something went wrong.