game of guessing number and see if it matchs with the random number choosen by the computer
0
stars
0
forks
source link
import random digit = (input("Enter a 4-digit Pin Code: \n")) my_random_d = random.randint(0000,9999) if len(digit) ==4: if my_random_d==digit: print("Pin Code Matched") else: print(f"Failure! Pin Code did not match.\n The Computer generated this code: {my_random_d}") else: print("Please Enter 4 digits") #1
import random
digit = (input("Enter a 4-digit Pin Code: \n"))
my_random_d = random.randint(0000,9999)
if len(digit) ==4:
if my_random_d==digit:
print("Pin Code Matched")
else:
print(f"Failure! Pin Code did not match.\n The Computer generated this code: {my_random_d}")
else:
print("Please Enter 4 digits")
import random digit = (input("Enter a 4-digit Pin Code: \n")) my_random_d = random.randint(0000,9999) if len(digit) ==4: if my_random_d==digit: print("Pin Code Matched") else: print(f"Failure! Pin Code did not match.\n The Computer generated this code: {my_random_d}") else: print("Please Enter 4 digits")