To the person who keeps posting the same code after i told them it did not work,
ID: 3584858 • Letter: T
Question
To the person who keeps posting the same code after i told them it did not work, this is the output.
In python please.. much appreciated your help.
CHALLENGE ACTIVITY E 6.2.2: Function call with parameter: Print tic-tac-toe board Complete the PrintTicTacToe function with parameters horiz_char and vert char that prints a tic-tac-toe board with the characters as follows. def print_tic_tac_toe (horiz_char, vert_char): # FIXME: complete function to print game board return Ex: print-tic-tac-toe(~·T) prints: 2 Your solution goes here ''' 4 print-tic-tac-toe(R,-! All rasts Run View your last submission Feedback?Explanation / Answer
Source Code:
def print_tic_tac_toe(hor_char,ver_char):
if hor_char is '~':
hor_char='x'
for i in range(3):
for j in range(5):
if j % 2 == 0:
print(hor_char+" ", end='')
else:
print(ver_char+" ",end='')
if i<2:
print(" ~ ~ ~ ~ ~")
else:
for i in range(3):
for j in range(5):
if j % 2 == 0:
print(hor_char+" ", end='')
else:
print(ver_char+" ",end='')
if i<2:
print(" ~ ~ ~ ~ ~")
print_tic_tac_toe("~","!") # use input function here to dynamically set the player symbols
Expected Output:
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.