fork download
  1. #coin flipper
  2. import random
  3. tailcount = 0
  4. headcount = 0
  5. totalcount = 0
  6. while totalcount != 100:
  7. totalcount += 1
  8. #print 'This is...', totalcount, 'Flip'
  9. x = random.randrange(2)
  10. if x == 0:
  11. headcount += 1
  12. #print 'The result is Head'
  13. elif x == 1:
  14. tailcount += 1
  15. #print 'The result is Tail'
  16. print 'We had', headcount, 'Heads'
  17. print 'And', tailcount, 'Tails'
  18. print 'Coin was flipped' , totalcount, 'times'
  19. raw_input('\n\nP')s here
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/py_compile.py", line 117, in compile
    raise py_exc
py_compile.PyCompileError:   File "prog.py", line 19
    raw_input('\n\nP')s here
                      ^
SyntaxError: invalid syntax

stdout
Standard output is empty