# Community quiz (loops )

  1. Which of the following is not used as loop in Python?

A. for loop
B. while loop
C. do-while loop
D. None of the above

  1. Which of the following is False regarding loops in Python?

A. Loops are used to perform certain tasks repeatedly.
B. While loop is used when multiple statements are to executed repeatedly until the given condition becomes False
C. While loop is used when multiple statements are to executed repeatedly until the given condition becomes True.
D. for loop can be used to iterate through the elements of lists.

  1. Which of the following is True regarding loops in Python?

A. Loops should be ended with keyword “end”.
B. No loop can be used to iterate through the elements of strings.
C. Keyword “break” can be used to bring control out of the current loop.
D. Keyword “continue” is used to continue with the remaining statements inside the loop.

  1. What keyword would you use to add an alternative condition to an if statement?

A. else if
B. elseif
C. elif
D. None of the above

  1. Can we write if/else into one line in python?

A. Yes
B. No
C. if/else not used in python
D. None of the above

  1. D
  2. C
  3. C
  4. C
  5. A ( in enhanced for loops)

Answers
1.C
2.B
3.C
4.C
5.A

1=c
2=b
3=a
4=c
5=b
#community quiz

1)d
2)c
3)c
4)d
5)d
#done

  1. d
  2. c
  3. c
  4. d
  5. d
  1. a
  2. c
  3. c
  4. c
  5. d
  1. C. do-while loop
  2. B. While loop is used when multiple statements are to executed repeatedly until the given condition becomes False
  3. C. Keyword “break” can be used to bring control out of the current loop.
  4. C. elif
  5. A. Yes

1.C
2.C
3.C
4.C
5.A
#community quiz

  1. c
  2. b
  3. c
  4. c
  5. a

The answer of the quiz is:
1.C
2.C
3.C
4.C
5.A

Answers for the following questions is:
1.c
2.b
3.c
4.c
5.a

The answers for above quiz
1.C
2.B
3.C
4.C
5.A

  1. C. do-while loop
  2. C. While loop is used when multiple statements are to executed repeatedly until the given condition becomes True.
  3. C. Keyword “break” can be used to bring control out of the current loop.
  4. C. elif
  5. B. No

1.C. do-while loop
2.B. While loop is used when multiple statements are to executed repeatedly until the given condition becomes False
3.C. Keyword “break” can be used to bring control out of the current loop.
4.C. elif
5.A. Yes

1,c
2,b
3,c
4,c
5,a
#pythondoubts

answers
1.c
2.b
3.c
4.c
5.a

  1. C
  2. B
  3. C
  4. C
  5. A
    Please find the answers above.

1.c
2.b
3.c
4.c
5.a
#loops