Convert the following for loop into while loop.
for num in range(-10, 0, 1):
print(num)
Share
Convert the following for loop into while loop.
for num in range(-10, 0, 1):
print(num)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Explanation:
num=int(input("enter the value"))
while num<0 and num>-10:
print(num)