jeudi 6 janvier 2022

I want to generate a random function for a coin toss and when it is initialized then it should be either head or tail

I want to generate a random number for a coin toss and when it is initialized then it should be either head or tail. Then if it is head then it should display me that either I won or loss toss. For example, if the result of toss is head then it should be random that I won or loss the toss. And next time if I again take random number between 1 2 and again it shows me I won toss and next time it should me I loss the toss randomly.




Aucun commentaire:

Enregistrer un commentaire