1.People = 30 2.Cars = 40 3. Trucks = 14 # line 1,2,3 assign the value to variables 4.If cars > people: #Using if statement 5.Print(“we should take the cars.”) 6.Elif cars < people: #if 1st is false execute elif 7.print(“we should not take the car.”) 8.else : # if both are false then execute else: 9.print(“we can’t decide.”)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter