Select the correct answerWhat will be the output of the following Python code?def ct(): global x print(x) x = "hii" print(x) x = "welcome" ct()print(x)Optionshiiwelcomewelcomewelcomehiihiihiihiiwelcomewelcomehiiwelcome
Question
Select the correct answerWhat will be the output of the following Python code?def ct(): global x print(x) x = "hii" print(x) x = "welcome" ct()print(x)Optionshiiwelcomewelcomewelcomehiihiihiihiiwelcomewelcomehiiwelcome
Solution
The correct answer is:
hii hii welcome
Similar Questions
Select the correct answerWhat will be the output of the following Python code?def ct(y): global y y+=2 print(y)ct(5)print("hi")Options7hierror7hi
Select the correct answerWhat will be the output of the following Python code?>>>ct1="codetantra">>>ct1[:3]>>>Optionsdecododetacodetantra
Select the correct answerWhat will be the output of the following Python code?def ct(): global y y+=3 print(y)y=8print("y")OptionsError11yy11
Select the correct answerWhat will be the output of the following Python code?def ct(): y=9 print(y)y=7ct()Options97Error97
Select the correct answerWhat will be the output of the following Python code snippet?ct = 'code'for i in range(len(ct)): i.upper()print (ct)Optionsc o d eerror0 1 2 3none of the mentioned
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.