''' print ('...............Hello, what is your name?') nz = input() print ('Hello',nz) print ('My name is Sal,what do you like to do?') m = input() print ('I like to',m,'to') ''' #It's 15 dots so you can see your print if taking input.Ask me to explain if you don't get it. #for copy and paste: (15 dots) ............... ''' for n in range (1,10): print ('Hello Ishan and Rhea! From Papa') ''' #------------------------------------------------------------------------------------------------------------------------ def drawGrid(Grid): print 'this is your tic-tac-toe board' for y in range (0,3): for x in range (0,3): print Grid[y][x], print '' print ' To put an x or o,enter an x,y coordinate from 1,1 to 3,3.' print 'enter start to play.' s = input() if s == 'start': print ' x or o?' xo = input() Grid = [] Grid.append(['*', '*', '*']) #Row 0 Grid.append(['*', '*', '*']) #Row 1 Grid.append(['*', '*', '*']) #Row 2 ''' row = y column = x Grid[row][column] = xo drawGrid(Grid) row = 1 column = 2 if Grid[row][column] != '*': print 'Sorry, the square you chose is occupied' else: Grid[row][column] = 'Y' drawGrid(Grid) ''' # if y == xo: # print 'Stop cheating,you cannot put a mark where a mark already was.' for n in range (1,10): print 'Enter x coordinate.' x = int(input()) print 'Enter y coordinate.' y = int(input()) print 'You entered coordinates x=', x, ' y=', y Grid[x][y]= xo drawGrid(Grid) ''' else: print 'you are mean.................' '''
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question