Python Quizs Question and Answers – While and For Loops – 2

Q 1. What will be the output of the following Python code? x = “abcdef” while i in x: print(i, end=” “) A. a b c d e fB. abcdefC. i i i i i i …D. error Show Answer Answer:-D. error Explanation NameError, i is not defined. Q 2. What will be the output … Continue reading Python Quizs Question and Answers – While and For Loops – 2