Day 5 Task Questions Theory: ---------------- 1.1.What is difference between break and continue? 2.What is mean by control statements and types? 3.What is mean by for loop? 4.Can you explain about for loop execution process? 5.Difference between for and while loop? 6.Is it possible to use break and continue outside of loop? 7.Write a syntax of while()? QUESTIONS(Find the output): --------------------------- QUESTION 1: ------------ for x in range(1,100): if(x==5): print(x) QUESTION 2: ------------ for x in range(1,100): if(x==5): break print(x) QUESTION 3: ---------- for x in range(1,100): if(x==5): continue print(x) QUESTION 4: ------------ for x in range(1,4): for y in range(1,4): print(y) print(x) QUESTION 5: ------------ for x in range(1,4): for y in range(1,4): print(x) QUESTION 6: ----------- for x in range(1,4): for y in range(1,x): print(y) QUESTION 7: ----------- for x in range(1,4): for y in range(x+1,4): print(y) QUESTION 8: ------------ for x in range(1,4): for y in range(x+1,x): print(y) QUESTION 9: ------------ i=5; if i==5: break; QUESTION 10: ------------ i=5; if i==5: continue QUESTION 11: ------------ for x in range(1,100): if(x==5): print(x) QUESTION 1: ----------- Description: Write a pattern program Using nested for Example: --------- * ** *** **** ***** ****** QUESTION 2: ------------ Description: Write a program to print even number from 1 to 100 Example: --------- Output = 2,4,....100 QUESTION 3: ------------ Description: Find the sum of odd number 1 to 100 Example: -------- Output = 2500 QUESTION 4: ----------- Description: Count of even number 1 to 100 Example: -------- Output = 50 QUESTION 5: ----------- Description: Write a program to find the factorial of a number. Example: -------- Input = 5 Output = 120 QUESTION 6: ------------ Description: Write a program to print the Fibonacci series of a number 1 to 100. Example: -------- Output = 0,1,1,2,3,5.....