Computer Science, asked by siddhantsingh1801, 21 hours ago

which of the following is not a valid loop in python a for b while c do-while and if-else​

Answers

Answered by simonsaikia9
0

Answer:

c) do while and if else

is the correct answer.

Explanation

Python doesn't have do while loop and if-else is not even a loop.

Answered by Jaswindar9199
0

QUESTION:-

Which of the following is not a valid loop in python

  • a for
  • b while
  • c do-while
  • d if-else

ANSWER:-

  • c do-while is the correct option

  • do-while is not a valid loop in python

EXPLANATION:-

  • A loop In a programming language is a statement that comprises instructions that repeatedly repeat until a specific condition is attained.

  • The loop "do while" is the correct option because "do while" loop cannot be supported by Python. Although this loop can be implemented easily using other loops.

  • The loop "For" is the wrong answer because the "For" loop enables a programmer to perform a sequence of statements numerous times, the loop variables can be managed as it abbreviates the code.

  • The loop "While" is the wrong answer because the "While" loop enables a programmer to repeat a single statement or a group of statements for the condition that is TRUE. It ascertains the condition before implementing the loop.

  • If-else is the wrong option because If-else is not a loop in Python but it can be valid by nesting "if" statements in a "while" loop.

#SPJ2

Similar questions