πŸ“Š Python
Q. What will be the result of following Python code snippet after execution?
Code:
str1=""

i=0

var2=1

while(i<3):

    var1=1

    if str1:

        var2=var1*var2+5

    else:

        var2=var1*var2+1

    i=i+1

print(var2)
  • (A) 4
  • (B) 11
  • (C) 12
  • (D) 16
πŸ’¬ Discuss
βœ… Correct Answer: (A) 4

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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