Answer
$Code:$
Work Step by Step
$Code:$
import random
coinFilp = random.randint(0, 2)
guess = int(input("Coin flip,Enter 1 for heads, 0 for tails"))
if guess == coinFilp:
$ $ $ $ print("correct!")
else:
$ $ $ $ print("sorry,incorrect")
$Output:$