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. Game 7 64.5K posts
- 2. Halloween 2.29M posts
- 3. Kawhi 3,829 posts
- 4. Glasnow 5,564 posts
- 5. Ja Morant 3,946 posts
- 6. Barger 5,389 posts
- 7. Bulls 29.8K posts
- 8. #LetsGoDodgers 10.7K posts
- 9. Sasaki 10.9K posts
- 10. Grizzlies 6,591 posts
- 11. Yamamoto 31.8K posts
- 12. #RipCity N/A
- 13. #BostonBlue 4,510 posts
- 14. Clement 5,037 posts
- 15. Rojas 10.5K posts
- 16. GAME SEVEN 6,586 posts
- 17. #SmackDown 25.7K posts
- 18. Mookie 14.2K posts
- 19. #DodgersWin 5,074 posts
- 20. Joe Carter 1,312 posts
Loading...
Something went wrong.
Something went wrong.