Posts

Showing posts with the label label 1

My Projects

 3. Snake Water Gun Game import random def run_game ():   print ( '--< welcome to snake water and gun game >--' . upper ())   print ( '''   s.snake   w.water   g.gun   ''' )   u_choice = input ( 'enter your choice: ' . capitalize ()). lower ()   c_choice = random . choice ([ 's' , 'w' , 'g' ])   print ( f 'computer choice is { c_choice } ' )   if c_choice == u_choice :     print ( 'Tie!!!' )   elif c_choice == 's' and u_choice == 'w' :     print ( 'you lose!!!' . title ())   elif c_choice == 's' and u_choice == 'g' :     print ( 'you win!!!' . title ())   elif c_choice == 'w' and u_choice == 's' :     print ( 'you win!!!' . title ())   elif c_choice == 'w' and u_choice == 'g' :     print ( 'you lose!!!' . title ())   elif c_choice == 'g' and u_choice == 's' :  ...