(Solved):Write an if-else statement (in pyhton) that assigns 0 to the variable b if the variable a is less than 10. Otherwise, it should assign 99 to the variable b. View Answer…

 

Question

Write an if-else statement (in pyhton) that assigns 0 to the variable b if the variable a is less than 10. Otherwise, it should assign 99 to the variable b.

 

EXPERT ANSWER

Python code:

a = 9
if a < 10:
    b = 0
else:
    b = 99
print(b)

We are so grateful for the pleasure of serving you and hope we met your expectations. Thank you. Manvila.

Scroll to top