repl.it
@ArjunSS1/

Coin Flip

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import random as r
import time, os
def flip(option1,option2):
  returnval = r.randint(0,1)
  if returnval == 0:
    return option1
  else:
    return option2
def run():
  os.system('clear')
  option1 = input("Enter the first choice \n>>> ")
  option2 = input("Enter the second choice\n>>> ")

  print(f"I chose {flip(option1,option2)} as my answer")
  inputval = input("")
  run()
run()
?