From 3527a7c376d5e750740b791fee9ad8f2b51faa9a Mon Sep 17 00:00:00 2001 From: sample2001 <71898994+sample2001@users.noreply.github.com> Date: Sat, 26 Sep 2020 00:52:28 +0530 Subject: [PATCH] Create MCQ's while loop.md --- Week 2/MCQ's while loop.md | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Week 2/MCQ's while loop.md diff --git a/Week 2/MCQ's while loop.md b/Week 2/MCQ's while loop.md new file mode 100644 index 0000000..60c549e --- /dev/null +++ b/Week 2/MCQ's while loop.md @@ -0,0 +1,44 @@ +### Python Tutorial +#### Topic: Python while Loop(https://codemistic.in/python/while-loop-python.html) + + +
+ +*Q1. Which of these loops will not finish?* + +
1) i = 1 
+  while i <= 10:
+    j = i * 3
+    print (j)
+    i = i + 2
+    
+
2) i = 1
+  while i != 20:
+    j = i * 5
+    print (j)
+    i = i + 2
+
3) i = 1
+  while True:
+    j = i * 7
+    print (j)
+    break
+    i = i + 2
+
4) i = 1
+  while True:
+    j = i * 10
+    print (j)
+    i = i + 2
+    if j == 20:
+      break
+ + +A. 3 & 2
+ + +B. 2 & 3
+ + +C. 2 & 4
+ + +D. 4 & 3