DAY 14(CODE INFINITY)
There is a small topic which comes after conditional expression which we skipped. Today we study match case which is addition to python language to make is easier. It is more or lase same as if else . Code which shows how match case gives output:
x=int(input("Enter a number: "))
match x:
case 0:
print("x is zero")
case 1:
print("x is one")
case n:
print("x is not one or zero")
Screenshot of the repel:
![]() |
Link of the repel:
https://replit.com/@shwetaantil97/match-case#main.py
Comments