ludo_guess_number program

 import random

choices = [1,2,3,4,5,6]

MAX_INPUT = 5

def ludo_container(i,max_input):
  scores = []
 
   
 
  for _ in range(max_input):
     guess_number = int(input("input your guess number "))
     if guess_number < 1 or guess_number > 6:
       print("guess_number is not valid")
       print("guess a number between 1-6")
 

   

 
     choice = random.choice(i)
     if guess_number == choice:
      scores.append(choice)
     else:
      print("you have no matching value, your score is equal to 0")
     print(scores)
  total_score = sum(scores)
  print(f"your total score is {total_score}")
 
 



 
(ludo_container(choices,MAX_INPUT))                  


Comments

Popular posts from this blog

card slot machine

Programming

Card Game In Python