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. $UNI 1,707 posts
- 2. Rempe 1,046 posts
- 3. Vesia N/A
- 4. Bannon 13.3K posts
- 5. Chuck 92.4K posts
- 6. Logan Wilson 1,381 posts
- 7. #LightningStrikes N/A
- 8. Dragon 90.8K posts
- 9. Jim Marshall N/A
- 10. Aaron Jones 2,630 posts
- 11. #USWNT N/A
- 12. Emil Heineman N/A
- 13. Lilleberg N/A
- 14. #LOVERGIRL 5,945 posts
- 15. Pacers 10K posts
- 16. Chargers -3 27.1K posts
- 17. Candace 41.4K posts
- 18. #PlayersOverProfits 3,636 posts
- 19. Roger Craig N/A
- 20. Chauncey Billups 118K posts
Loading...
Something went wrong.
Something went wrong.