πŸ“Š Python
Q. What will be the output of given Python code?
Code:
str1="hello"
c=0
for x in str1:
   if(x!="l"):
       c=c+1
   else:
       pass
print(c)
  • (A) 0
  • (B) 2
  • (C) 3
  • (D) 4
πŸ’¬ Discuss
βœ… Correct Answer: (C) 3

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
188
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
94%
Success Rate