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
937
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
73
United States Trendy
- 1. Philip Rivers 12.3K posts
- 2. Colts 28.4K posts
- 3. #WWERaw 17.7K posts
- 4. Alec Pierce 3,121 posts
- 5. Purdy 10.5K posts
- 6. Niners 5,636 posts
- 7. #FTTB 4,176 posts
- 8. #ForTheShoe 1,774 posts
- 9. #SFvsIND 1,368 posts
- 10. #WLRDeluxe 24K posts
- 11. Kittle 5,893 posts
- 12. Adam the Woo N/A
- 13. Kansas 31.1K posts
- 14. Uncle Phil N/A
- 15. Missouri 14.3K posts
- 16. CJ West N/A
- 17. Luter 1,188 posts
- 18. Saleh 8,108 posts
- 19. Arrowhead 10.8K posts
- 20. Greenland 63.9K posts
Loading...
Something went wrong.
Something went wrong.