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 Tendenze
- 1. #warmertogether N/A
- 2. $BARRON 1,797 posts
- 3. #NXXT 2,481 posts
- 4. Harvey Weinstein 1,934 posts
- 5. Ben Shapiro 22.9K posts
- 6. Diane Ladd 1,567 posts
- 7. #maddiekowalski 3,075 posts
- 8. #BestStockToBuy 1,099 posts
- 9. #CAVoteYesProp50 3,362 posts
- 10. Gold's Gym 42.9K posts
- 11. University of Virginia 1,609 posts
- 12. Laura Dern N/A
- 13. Shannon Library 1,614 posts
- 14. $PLTR 13.3K posts
- 15. Ndiaye 7,476 posts
- 16. Murray State 1,197 posts
- 17. Clemens 1,558 posts
- 18. Mumdumi 9,147 posts
- 19. Blueface 4,429 posts
- 20. Standout 7,476 posts
Loading...
Something went wrong.
Something went wrong.