Python Question / Quiz; What is the output of the following Python code, and why? Comment your answers below! #python #programming #developer #programmer #coding #coder #softwaredeveloper #computerscience #webdev #webdeveloper #webdevelopment #pythonprogramming #pythonquiz #ai…
bye a = "hello"+"world" = helloworld, there is no space between hello and world.
The output is bye and the reason is that a produces 'helloworld' no white spaces between hello and world which is different from 'hello world' so since both are different it prints the else condition
B is the answer: a != "hello world" a == "helloworld" It's a tricky question. I had to critically look into it.
B because there isn’t a space in the quotes. A would equal helloworld.
Bye. Reason because there's no space when hello and world are concatenated together
You are right, i make a lot of mistakes in spaces... B is correct answer
There is no space in the first line of code, but your program is looking for two words with a space between them. So the answer is Bye.
B) Bye "hello" + "world" == "helloworld" not "hello world", so else is triggered.
Bye, As the string a is equals to "helloworld" which is not same as "hello world" hence it will execute the else part which is bye.
United States Trends
- 1. Ukraine 444K posts
- 2. #FanCashDropPromotion 3,076 posts
- 3. Le Cowboy N/A
- 4. #FursuitFriday 12.1K posts
- 5. #FridayVibes 6,266 posts
- 6. Putin 145K posts
- 7. Dave Aranda N/A
- 8. #pilotstwtselfieday N/A
- 9. Good Friday 68.8K posts
- 10. #สิงสาลาตายEP4 147K posts
- 11. SINGSA LATAI EP4 149K posts
- 12. Kenyon 1,575 posts
- 13. Sam LaPorta N/A
- 14. October CPI 1,207 posts
- 15. ON SALE NOW 12.8K posts
- 16. Ja Rule 1,730 posts
- 17. Bush 89.8K posts
- 18. Eric Swalwell 5,466 posts
- 19. Fang Fang 13.2K posts
- 20. woozi 63.4K posts
Something went wrong.
Something went wrong.