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. Luka 97.2K posts
- 2. Dodgers 122K posts
- 3. Blue Jays 82.3K posts
- 4. #WorldSeries 103K posts
- 5. #LakeShow 3,563 posts
- 6. #TheLastDriveIn 4,560 posts
- 7. Snell 14.4K posts
- 8. Halo 162K posts
- 9. Mavs 13.4K posts
- 10. Toronto 67.6K posts
- 11. Marcus Smart 3,600 posts
- 12. #SmackDown 34.4K posts
- 13. Nico Harrison 2,488 posts
- 14. Vando 2,664 posts
- 15. Kyshawn George 4,271 posts
- 16. Blazers 10.6K posts
- 17. Addison Barger 18.3K posts
- 18. Naz Reid N/A
- 19. #WANTITALL 45K posts
- 20. Sac State N/A
Loading...
Something went wrong.
Something went wrong.