Python Question / Quiz; What is the output of the following Python code, and why? Comment your answers below!
46
11
114
19
11ألف
هذه التغريدة لم تعد متوفرة.
0
0
0
0
0
"python"[2:5] creates a substring of "python", starting at index 2, and stopping before 5. The indices are: 0 p 1 y 2 t <-- start 3 h 4 o 5 n <-- stop (excluded) Thus, the result is "tho" Hence, the print will output tho and that's the answer
1
0
0
0
61
My bad, thanks for pointing that out. It has to be B.
1
0
1
0
7
United States الاتجاهات
- 1. Eagles 58.5K posts
- 2. Tulane 21.4K posts
- 3. Josh Johnson 3,351 posts
- 4. Jake Elliot 3,618 posts
- 5. $ENX 2,423 posts
- 6. Saquon 7,213 posts
- 7. Ole Miss 16.2K posts
- 8. NFC East 6,324 posts
- 9. Steen 3,550 posts
- 10. Ringo 15.8K posts
- 11. Jordan Davis 1,060 posts
- 12. Dan Quinn N/A
- 13. Mariota 3,087 posts
- 14. Shipley 1,773 posts
- 15. Oregon 19.9K posts
- 16. Miami 113K posts
- 17. #RaiseHail 2,172 posts
- 18. #PHIvsWAS 1,535 posts
- 19. Tank Bigsby N/A
- 20. Top G 123K posts
Loading...
Something went wrong.
Something went wrong.