Computer Science, asked by Parikshit5864, 4 months ago

Create a program that ask the user to enter the number of switches and calculate the possible outcomes that can come from those many numbers of switches (on/off) in python using while loop

Answers

Answered by smriti007230
2

Answer:

this is the correct answer key

Explanation:

The for statement in Python differs a bit from what you may be used to in C or Pascal. Rather than always iterating over an arithmetic progression of numbers (like in Pascal), or giving the user the ability to define both the iteration step and halting condition (as C), Python’s for statement iterates over the items of any sequence (a list or a string), in the order that they appear in the sequence. For example (no pun intended):

>>>

>>> # Measure some strings:

Similar questions