Python program for Zip, Zap and Zoom game

Python program for Zip, Zap and Zoom game; Through this tutorial, i am going to show you how to create python program for Zip, Zap and Zoom game.

What does mean by zip zap zoom in python program?

  • If the number is multiple of 3, to display “Zip”.
  • If the number is multiple of 5, display “Zap”.
  • If the number is multiple of 3 and 5, display “Zoom”.
  • If it does not satisfy any of the above-given conditions, display “Invalid”.

Python program for Zip, Zap and Zoom game

# Python program for Zip, Zap and Zoom game
def myFunc(Num):
    
    if Num % 3 == 0 and Num % 5 == 0 :
       return "Zoom"
        
    elif Num % 3 == 0 :
        return "Zip"
    
    elif Num % 5 == 0 :
        return "Zap"
        
    else :
        return "invalid"
  
#take input from user
n=int(input("Enter any number to find zip, zap, zoom :- "))
#call calSum() function and print result
print("The entered number is :- " , 
      myFunc(n)) 

Output

Enter any number to find zip, zap, zoom :- 5
The entered number is :-  Zap

Recommended Python Tutorials

Leave a Comment