From 8ea810c84f25403c4622c0584fac7029a287f25b Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Sat, 28 Oct 2017 09:35:15 -0700 Subject: [PATCH 01/24] Delete finalproduct.py --- ProjTemplates/u1battleship/finalproduct.py | 108 --------------------- 1 file changed, 108 deletions(-) delete mode 100644 ProjTemplates/u1battleship/finalproduct.py diff --git a/ProjTemplates/u1battleship/finalproduct.py b/ProjTemplates/u1battleship/finalproduct.py deleted file mode 100644 index b78bb89..0000000 --- a/ProjTemplates/u1battleship/finalproduct.py +++ /dev/null @@ -1,108 +0,0 @@ -from random import randint -enem_board = [[u"\U0001F30A"]*5 for n in range(5)] -frnd_board = [[u"\U0001F30A"]*5 for n in range(5)] -name = "Sa'ar" -def print_board(frnd, enem): - print("CPU") - print(end=" ") - for i in range(1, len(enem[0])+1): - print(i, end=" ") - print() - for i in range(1, len(enem[0])+1): - row = enem[i-1] - print(i," ".join(row)) - print("-".join(["--"]*5)) - print(name) - print(end=" ") - for i in range(1, len(frnd[0])+1): - print(i, end=" ") - print() - for i in range(1, len(frnd)+1): - row = frnd[i-1] - print(i," ".join(row)) - print() -#computer hide -row = randint(0, len(enem_board)-1) -col = randint(0, len(enem_board[0])-1) -#player hide -pr = None -pc = None -while pr == None and pc == None: - if pr == None: - pr = randint(1, len(frnd_board)) - pr -= 1 - if pc == None: - pc = randint(1, len(frnd_board)) - pc -= 1 - if pc < 0 or pc >= len(frnd_board[0]): - pc = None - if pr < 0 or pr > len(frnd_board): - pr = None -else: - print(pr+1,pc+1) - frnd_board[pr][pc] = u"\U0001F6A2" - -won = False -lost = False -while (not won) and (not lost): - print_board(frnd_board, enem_board) - print("CPU: ") - t = False - while not t: - gr = randint(0, len(frnd_board)-1) - gc = randint(0, len(frnd_board[0])-1) - if frnd_board[gr][gc] != u"\U0001F4A3": - t = True - print("Row: ",gr+1) - print("Column: ",gc+1) - print() - if frnd_board[gr][gc] == u"\U0001F6A2": - lost = True - frnd_board[gr][gc] = u"\U0001F4A5" - print("Hit!") - break - else: - frnd_board[gr][gc] = u"\U0001F4A3" - print("Miss!") - print() - print_board(frnd_board, enem_board) - print(name+":") - gr = randint(1, len(enem_board)) - gr -= 1 - print("Row:",gr) - gc = randint(1, len(enem_board[0])) - gc -= 1 - print("Column:",gc) - print() - if gr == row and gc == col: - print("Hit!") - enem_board[gr][gc] = u"\U0001F4A5" - won = True - elif gr < 0 or gr >= len(enem_board) or gc < 0 or gc >= len(enem_board[0]): - print("That's not even in the ocean ):") - elif enem_board[gr][gc] == u"\U0001F4A3": - print("You already guessed that, stupid! DX") - else: - print("Miss!") - print() - enem_board[gr][gc] = u"\U0001F4A3" -if won: - for i in range(len(enem_board)): - for j in range(len(enem_board[i])): - if not enem_board[i][j] == u"\U0001F4A3": - enem_board[i][j] = u"\U0001F525" - else: - enem_board[i][j] = u"\u2620" - enem_board[row][col] = u"\U0001F4A5" - print("Congrats on winning!") -if lost: - for i in range(len(frnd_board)): - for j in range(len(frnd_board[i])): - if not frnd_board[i][j] == u"\U0001F4A3": - frnd_board[i][j] = u"\U0001F525" - else: - frnd_board[i][j] = u"\u2620" - frnd_board[pr][pc] = u"\U0001F4A5" - enem_board[row][col] = u"\U0001F6A2" - print("You sax. Better luck next time!") -print_board(frnd_board, enem_board) From b495c1b6d33e99542434fe20dea0283eb7b5d82d Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Sat, 28 Oct 2017 09:35:48 -0700 Subject: [PATCH 02/24] Update final.py From 9954d755e892a2c627ef9578894b3c7c31c12a0c Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Sat, 28 Oct 2017 09:36:08 -0700 Subject: [PATCH 03/24] Create 01.py --- Project templates/u1_battleship/01.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 Project templates/u1_battleship/01.py diff --git a/Project templates/u1_battleship/01.py b/Project templates/u1_battleship/01.py new file mode 100644 index 0000000..7b701a6 --- /dev/null +++ b/Project templates/u1_battleship/01.py @@ -0,0 +1 @@ +board = [] From 8fe4b2865f2ac0899e171d5ed4ac903851bdb479 Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Sat, 28 Oct 2017 09:37:15 -0700 Subject: [PATCH 04/24] Create 02.py --- Project templates/u1_battleship/02.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 Project templates/u1_battleship/02.py diff --git a/Project templates/u1_battleship/02.py b/Project templates/u1_battleship/02.py new file mode 100644 index 0000000..d811522 --- /dev/null +++ b/Project templates/u1_battleship/02.py @@ -0,0 +1 @@ +board = [["O"]*5 for i in range 5] From 4cd4c8bb871512befd76ff163dfce7cd626ab55a Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Mon, 30 Oct 2017 17:19:34 -0700 Subject: [PATCH 05/24] Update screens.py --- screens.py | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/screens.py b/screens.py index 1763004..0e8899c 100644 --- a/screens.py +++ b/screens.py @@ -2,10 +2,17 @@ from window import Window class Screen: + width = 300 def __init__(self, title, showAs, func): self.title = title self.showAs = showAs self.func = func + + def __repr__(self): + return showAs + + def __str__(self): + return self.__repr__() class LessonScreen(Screen): def __init__(self, i, text, screenFunc): @@ -22,6 +29,10 @@ def __init__(self, unit, proj, partTitle, screenFunc): super().__init__(text, showAs, func) class Screens(Window): + def scrnBtn(self, btn): + btn = self.cenBtn(btn, btn.func) + btn.cofig(width=btn.width) + #screenNum: 1, 2, 3, 4, 5, etc. def new_lesson(self, unit, screenNum): screenNum -= 1 @@ -78,11 +89,17 @@ def __init__(self, master=None): ProjectScreen(1, PROJ, "Next time, try to aim *inside* the ocean", None), ProjectScreen(1, PROJ, "\"Insanity: doing the same thing over and over and expecting different results\" - Albert Einstein", None), ProjectScreen(1, PROJ, "Testing, one, two, three", None), - ProjectScreen(1, PROJ, "Loop. Loop-edy loop loop la-loop loop", None), ProjectScreen(1, PROJ, "Are you sure you won?", None), ProjectScreen(1, PROJ, "Stop cheating!", None), - ProjectScreen(1, PROJ, "Extra credit!", None) + ProjectScreen(1, PROJ, "Adding enemy board", None) ] + self.units = [ + {name: "The fundmentals of Python programming", started: True}, + {name: "Turtle graphics", started: False}, + {name: "GUI with Tkinter", started: False}, + {name: " + ] + self.pr1 = PROJ super().__init__(master) self.master = master self.master.title("LearnPythonWithPython") @@ -99,10 +116,17 @@ def p_init(self, unitNum): s = "self.proj_"+str(unitNum)+"()" exec(s) self.master.geometry(self.homeBounds) + + def unit_scrn(self, i): + for s in eval("self.u"+str(i)): + self.scrnBtn(s) + self.cenBtn("Unit project: "+eval("pr"+i), eval("p"+i)) + if self.units[i].started: + Button(self, text="Unit"+str(i+1)+self.units[i].text, command=eval("self.units["+str(i+1)+"]" def unit_1(self): for s in self.u1: - self.cenBtn(s.showAs, s.func) + self.scrnBtn(s) self.cenBtn("Unit project: Battleship", lambda: self.p_init(1)) Button(self, text="Unit 2: Turtle graphics", command=None).place(relx=1.0, rely=1.0, anchor=SE) @@ -241,4 +265,4 @@ def bs_win(self): def bs_lose(self): self.new_proj(1, 8) - self.multiLbl("""To make a losing condition, we have to add an else. The else co""") \ No newline at end of file + self.multiLbl("""To make a losing condition, we have to add an else. The else condition will be if he gets it wrong.""") From cd5b9f300d2a0432a740e4f440af2d348ea14c48 Mon Sep 17 00:00:00 2001 From: Belvedere Tiburon Library CoderDojo Date: Fri, 17 Nov 2017 17:59:38 -0800 Subject: [PATCH 06/24] Updated files --- __pycache__/mainloop.cpython-34.pyc | Bin 467 -> 467 bytes __pycache__/screens.cpython-34.pyc | Bin 22270 -> 23271 bytes __pycache__/window.cpython-34.pyc | Bin 2759 -> 2820 bytes dist/library.zip | Bin 3588940 -> 3590160 bytes screens.py | 38 +++++++++++++--------------- window.py | 28 ++++++++++++-------- 6 files changed, 35 insertions(+), 31 deletions(-) diff --git a/__pycache__/mainloop.cpython-34.pyc b/__pycache__/mainloop.cpython-34.pyc index 028bd2307cbb84ed57b9bd055efa057cf9b3f605..7d35f66a6bcd8892487e02c15c29d2871d5e3940 100644 GIT binary patch del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$2g9Tp`a%wQZ*?KnyeC|=tx<;R|Z5h!&?mm`AFB6#c{b6^0OMw z8K(zH%aKgX**NI3T$0yBk}vosH6EVd@(TLsy*HmT} z(;dhVG+T+CzOp31)m7elIxRZnud7bCRicm(kn2)-MFLc~i27HKj;@F1F9^Xvih#V! zz$pnZ`%H$O-i}c6^U-KgbPH~;}TfhWHi;o3^cAZ{dg4$og0;lxBKMxJpPYl78@@Bt>XqKUvkbV;}N z9vnx&TgHS*QHhwpFD`=GwPFyxvT+kmM~Xf1o&iDbi5{mVayD~u>3_t@@DvkV?Rrg5 z3vqv1SYl9z}A>d?QK9&5B=Sj!hT&rayj5s6(OI^rO=1y=D44*CK`A7V%EcamWFhhj(^*@H!0gIyosC(Q)p$Db_+lBDBL zff=qXmnaM)5_w9M4AUpopFIf8h4`NzE_^6Oi`Ot4r&!P`8J^clSunJX$R zG1E^+9P9!l<4tQ1VQn%uw8-Kx_R2B$9o7s5k$~LXjr$mTnQeH8aYVR|Sb%FMli`p0 zAn6WSM#Hno;5J!|q&DI8s!bUM_-!8n`3^>2P3CO2(T)hG5GT9kyJW~lGR?_;R&+f0 ztT74*0eN5(cPp72Qc`TPDgJ?&n_oi0RK!K?ul|q;2<@o0)9)u|L4=N0qn%f zSBm@cTNOl Date: Fri, 1 Dec 2017 08:25:25 -0800 Subject: [PATCH 07/24] Update screens.py --- screens.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screens.py b/screens.py index adb8fd2..f32138d 100644 --- a/screens.py +++ b/screens.py @@ -263,4 +263,4 @@ def bs_win(self): def bs_lose(self): self.new_proj(1, 8) - self.multiLbl("""To make a losing condition, we have to add an else. The else condition will be if he gets it wrong.""") + self.multiLbl("""To make a losing condition, we have to add an else. The else condition will be if the player gets it wrong.""") From 2d24fc0ba5a2788b41a0c784dfd1d97fd394650b Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Fri, 1 Dec 2017 08:25:51 -0800 Subject: [PATCH 08/24] Update 02.py --- Project templates/u1_battleship/02.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project templates/u1_battleship/02.py b/Project templates/u1_battleship/02.py index d811522..c3b13e6 100644 --- a/Project templates/u1_battleship/02.py +++ b/Project templates/u1_battleship/02.py @@ -1 +1 @@ -board = [["O"]*5 for i in range 5] +board = [["O"]*5 for _ in range 5] From 8b57c22e2767f20caefb9e6c60b76c90902f3211 Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Fri, 1 Dec 2017 08:39:11 -0800 Subject: [PATCH 09/24] Create 03.py --- Project templates/u1_battleship/03.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Project templates/u1_battleship/03.py diff --git a/Project templates/u1_battleship/03.py b/Project templates/u1_battleship/03.py new file mode 100644 index 0000000..fa22453 --- /dev/null +++ b/Project templates/u1_battleship/03.py @@ -0,0 +1,5 @@ +board = [["O"]*5 for _ in range 5] + +def print_board: + for row in board: + " ".join(row) From 69b75f36361f37b7460140ab334654b12a761b91 Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Fri, 1 Dec 2017 08:39:29 -0800 Subject: [PATCH 10/24] Create 04.py --- Project templates/u1_battleship/04.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 Project templates/u1_battleship/04.py diff --git a/Project templates/u1_battleship/04.py b/Project templates/u1_battleship/04.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Project templates/u1_battleship/04.py @@ -0,0 +1 @@ + From 9b66666ed15add18ad0f408de883eff7f2e08f81 Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Fri, 1 Dec 2017 08:42:42 -0800 Subject: [PATCH 11/24] Update 04.py --- Project templates/u1_battleship/04.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Project templates/u1_battleship/04.py b/Project templates/u1_battleship/04.py index 8b13789..880ec8f 100644 --- a/Project templates/u1_battleship/04.py +++ b/Project templates/u1_battleship/04.py @@ -1 +1,9 @@ +from random import randint +board = [["O"]*5 for _ in range 5] +def print_board: + for row in board: + print(" ".join(row)) + +col = randint(0, len(board[0])) +row = randint(0, len(board)) From 28249fd1261007713863a4442d92cf19e818ee37 Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Fri, 1 Dec 2017 08:43:29 -0800 Subject: [PATCH 12/24] Create 05.py --- Project templates/u1_battleship/05.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Project templates/u1_battleship/05.py diff --git a/Project templates/u1_battleship/05.py b/Project templates/u1_battleship/05.py new file mode 100644 index 0000000..880ec8f --- /dev/null +++ b/Project templates/u1_battleship/05.py @@ -0,0 +1,9 @@ +from random import randint +board = [["O"]*5 for _ in range 5] + +def print_board: + for row in board: + print(" ".join(row)) + +col = randint(0, len(board[0])) +row = randint(0, len(board)) From 32d2a620dbfe67f6a3c9b618b8aa8d97a109ee5c Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Fri, 1 Dec 2017 08:44:38 -0800 Subject: [PATCH 13/24] Update 05.py --- Project templates/u1_battleship/05.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Project templates/u1_battleship/05.py b/Project templates/u1_battleship/05.py index 880ec8f..3f30012 100644 --- a/Project templates/u1_battleship/05.py +++ b/Project templates/u1_battleship/05.py @@ -7,3 +7,6 @@ def print_board: col = randint(0, len(board[0])) row = randint(0, len(board)) + +row_guess = input("Guess row: ") +col_guess = input("Guess column: ") From 2f4ba221f08b265a03f81d91669fdc85915c25a3 Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Fri, 1 Dec 2017 08:52:27 -0800 Subject: [PATCH 14/24] Update screens.py --- screens.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/screens.py b/screens.py index f32138d..74705fb 100644 --- a/screens.py +++ b/screens.py @@ -94,10 +94,14 @@ def __init__(self, master=None): ProjectScreen(1, PROJ, "YOU SAX!!!", None), ProjectScreen(1, PROJ, "Next time, try to aim *inside* the ocean", None), ProjectScreen(1, PROJ, "\"Insanity: doing the same thing over and over and expecting different results\" - Albert Einstein", None), + ProjectScreen(1, PROJ, "Game loop-da-loops", None), ProjectScreen(1, PROJ, "Testing, one, two, three", None), ProjectScreen(1, PROJ, "Are you sure you won?", None), ProjectScreen(1, PROJ, "Stop cheating!", None), - ProjectScreen(1, PROJ, "Adding enemy board", None) + ProjectScreen(1, PROJ, "Adding the other board", None), + ProjectScreen(1, PROJ, "Now, hide your ships", None), + ProjectScreen(1, PROJ, "Pirates of the Caribbean", None), + ProjectScreen(1, PROJ, "You are terminated!", None) ] self.units = [ {"name": "The fundmentals of Python programming", "started": True}, @@ -112,7 +116,11 @@ def __init__(self, master=None): def s_init(self, unitNum): self.new(0) - self.unit_scrn(unitNum) + for s in eval("self.u"+str(unitNum)): + self.scrnBtn(s) + self.projBtn("Unit project: "+eval("self.pr"+str(unitNum)), self.p_init(unitNum)) + if self.units[unitNum]["started"]: + Button(self, text="Unit"+str(unitNum+1)+self.units[unitNum].text, command=eval("self.u"+str(unitNum+1))).place(relx=1.0, rely=1.0, anchor=SE) self.master.geometry(self.homeBounds) def p_init(self, unitNum): @@ -121,18 +129,11 @@ def p_init(self, unitNum): exec(s) self.master.geometry(self.homeBounds) - def unit_scrn(self, i): - for s in eval("self.u"+str(i)): - self.scrnBtn(s) - self.projBtn("Unit project: "+eval("self.pr"+str(i)), self.p_init(i)) - if self.units[i]["started"]: - Button(self, text="Unit"+str(i+1)+self.units[i].text, command=eval("self.u"+str(i+1))).place(relx=1.0, rely=1.0, anchor=SE) - def proj_1(self): for s in self.p1: self.cenBtn(s.showAs, s.func) self.cenBtn("Back to unit 1", lambda: self.s_init(1)) - self.cenBtn("Unit 2: Turtle graphics", None) #s_init(2) + self.cenBtn("Unit 2: Turtle graphics", self.s_init(2)) def idle(self): self.new_lesson(1, 1) @@ -243,15 +244,15 @@ def bs_board_list(self): def bs_print_board(self): self.new_proj(1, 3) - self.multiLbl("""We need a method to print out the board good because we don't want it looking like [['O', 'O', 'O', 'O', 'O'], ['O', 'O', 'O', 'O', 'O'], ['O', 'O', 'O', 'O', 'O'], ['O', 'O', 'O', 'O', 'O'],['O', 'O', 'O', 'O', 'O']]. We want to join it. So the function called print_board which will take one argument, board and will have a for loop in which we are doing a command *for row in board*. The command is a method I haven't told you about yet. It's called join. The syntax is like this: str.join(list). For example, we want to print O O O O O where it's currently printing ['O', 'O', 'O', 'O', 'O'] so we do " ".join(board) to join the board with spaces. That is our command in the for loop.""") + self.multiLbl("""We need a method to print out the board good because we don't want it looking like [['O', 'O', 'O', 'O', 'O'], ['O', 'O', 'O', 'O', 'O'], ['O', 'O', 'O', 'O', 'O'], ['O', 'O', 'O', 'O', 'O'],['O', 'O', 'O', 'O', 'O']]. We want to join it. So the function called print_board which will take no arguments and will have a for loop in which we are doing a command *for row in board*. The command is a method I haven't told you about yet. It's called join. The syntax is like this: str.join(list). For example, we want to print O O O O O where it's currently printing ['O', 'O', 'O', 'O', 'O'] so we do " ".join(board) to join the board with spaces. We surround that with a print( and ) and then we have our print.""") def bs_hide(self): self.new_proj(1, 4) - self.multiLbl("""Let's "hide" the ship. To do this, we need to have a few lines of code. First we need to do this thing called import-ing. To import, you can either do import module_name or from module_name import what_you_want_from_the_module (or you can add as what_you_want_to_called). So we need to do a from module_name import what_you_want. We want to import randint from random. Soooo, just use your logic and from random import randint. Then you need to set a variable *col =* to a *randint* from *(0,* to *len(boardp[0])-1)* and set *row =* to a *randint* from *(0,* to *len(board)-1)*. Then you have the locations of the ship""") + self.multiLbl("""Let's "hide" the ship. To do this, we need to have a few lines of code. First we need to do this thing called import-ing. To import, you can either do import module_name or from module_name import what_you_want_from_the_module (or you can add as what_you_want_to_call_it). So we need to do a from module_name import what_you_want. We want to import randint from random. Soooo, just use your logic and from random import randint. Then you need to set a variable *col =* to a *randint* from *(0,* to *len(boarp[0])-1)* and set *row =* to a *randint* from *(0,* to *len(board)-1)*. Then you have the locations of the ship""") def bs_seek(self): self.new_proj(1, 5) - self.multiLbl("""Let's "seek" the ship. To do this, we need to ask the user for *input()*. Let's set a variable called *row_guess =* to *input("Guess row: ") and set *col_guess =* to *input("Guess column")*. Then we have a guess that literally does nothing (so far).""") + self.multiLbl("""Let's "seek" the ship. To do this, we need to ask the user for *input()*. Let's set a variable called *row_guess =* to *input("Guess row: ") and set *col_guess =* to *input("Guess column: ")*. Then we have a guess that literally does nothing (so far).""") def bs_debug(self): self.new_proj(1, 6) From 04b196a51aa55416b363e1a539642c79d756ebb0 Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Fri, 1 Dec 2017 08:53:09 -0800 Subject: [PATCH 15/24] Create 06.py --- Project templates/u1_battleship/06.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Project templates/u1_battleship/06.py diff --git a/Project templates/u1_battleship/06.py b/Project templates/u1_battleship/06.py new file mode 100644 index 0000000..3f30012 --- /dev/null +++ b/Project templates/u1_battleship/06.py @@ -0,0 +1,12 @@ +from random import randint +board = [["O"]*5 for _ in range 5] + +def print_board: + for row in board: + print(" ".join(row)) + +col = randint(0, len(board[0])) +row = randint(0, len(board)) + +row_guess = input("Guess row: ") +col_guess = input("Guess column: ") From 8eb87961ee83fa222094cae0c2f0b27fb14ec035 Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Fri, 1 Dec 2017 08:54:24 -0800 Subject: [PATCH 16/24] Update 06.py --- Project templates/u1_battleship/06.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Project templates/u1_battleship/06.py b/Project templates/u1_battleship/06.py index 3f30012..37739f4 100644 --- a/Project templates/u1_battleship/06.py +++ b/Project templates/u1_battleship/06.py @@ -10,3 +10,5 @@ def print_board: row_guess = input("Guess row: ") col_guess = input("Guess column: ") + +print(row, col) From 3c143c093425ba5874cf127f487390225b7d0dd3 Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Fri, 1 Dec 2017 08:55:05 -0800 Subject: [PATCH 17/24] Create 07.py --- Project templates/u1_battleship/07.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Project templates/u1_battleship/07.py diff --git a/Project templates/u1_battleship/07.py b/Project templates/u1_battleship/07.py new file mode 100644 index 0000000..37739f4 --- /dev/null +++ b/Project templates/u1_battleship/07.py @@ -0,0 +1,14 @@ +from random import randint +board = [["O"]*5 for _ in range 5] + +def print_board: + for row in board: + print(" ".join(row)) + +col = randint(0, len(board[0])) +row = randint(0, len(board)) + +row_guess = input("Guess row: ") +col_guess = input("Guess column: ") + +print(row, col) From 9fe3d553a41f52718b3dd79d3e3cf40de7847339 Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Fri, 1 Dec 2017 08:57:21 -0800 Subject: [PATCH 18/24] Update 07.py --- Project templates/u1_battleship/07.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Project templates/u1_battleship/07.py b/Project templates/u1_battleship/07.py index 37739f4..5502289 100644 --- a/Project templates/u1_battleship/07.py +++ b/Project templates/u1_battleship/07.py @@ -8,7 +8,10 @@ def print_board: col = randint(0, len(board[0])) row = randint(0, len(board)) +print(row, col) + row_guess = input("Guess row: ") col_guess = input("Guess column: ") -print(row, col) +if row_guess == row and col_guess == col: + print("something like \\\"We have a winner\\\"") From 666c6dba1552d09e8b591bf4e6e0151e4cf55e82 Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Fri, 1 Dec 2017 08:57:37 -0800 Subject: [PATCH 19/24] Update 07.py --- Project templates/u1_battleship/07.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project templates/u1_battleship/07.py b/Project templates/u1_battleship/07.py index 5502289..326d8bf 100644 --- a/Project templates/u1_battleship/07.py +++ b/Project templates/u1_battleship/07.py @@ -14,4 +14,4 @@ def print_board: col_guess = input("Guess column: ") if row_guess == row and col_guess == col: - print("something like \\\"We have a winner\\\"") + print("something like \"We have a winner\"") From 83c5e24175757f6c7d75587f35c09a93f7a99c25 Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Fri, 1 Dec 2017 08:58:02 -0800 Subject: [PATCH 20/24] Create 08.py --- Project templates/u1_battleship/08.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Project templates/u1_battleship/08.py diff --git a/Project templates/u1_battleship/08.py b/Project templates/u1_battleship/08.py new file mode 100644 index 0000000..326d8bf --- /dev/null +++ b/Project templates/u1_battleship/08.py @@ -0,0 +1,17 @@ +from random import randint +board = [["O"]*5 for _ in range 5] + +def print_board: + for row in board: + print(" ".join(row)) + +col = randint(0, len(board[0])) +row = randint(0, len(board)) + +print(row, col) + +row_guess = input("Guess row: ") +col_guess = input("Guess column: ") + +if row_guess == row and col_guess == col: + print("something like \"We have a winner\"") From 001fdcb1991561108742eea5d215b85e24c1827e Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Fri, 1 Dec 2017 08:58:32 -0800 Subject: [PATCH 21/24] Update 08.py --- Project templates/u1_battleship/08.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Project templates/u1_battleship/08.py b/Project templates/u1_battleship/08.py index 326d8bf..29f278e 100644 --- a/Project templates/u1_battleship/08.py +++ b/Project templates/u1_battleship/08.py @@ -15,3 +15,5 @@ def print_board: if row_guess == row and col_guess == col: print("something like \"We have a winner\"") +else: + print("YOU SAX!!!") From 9dc1656cecba20b4a34bdc2b7063782a0ac1e3e2 Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Fri, 1 Dec 2017 08:59:40 -0800 Subject: [PATCH 22/24] Create 09.py --- Project templates/u1_battleship/09.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Project templates/u1_battleship/09.py diff --git a/Project templates/u1_battleship/09.py b/Project templates/u1_battleship/09.py new file mode 100644 index 0000000..29f278e --- /dev/null +++ b/Project templates/u1_battleship/09.py @@ -0,0 +1,19 @@ +from random import randint +board = [["O"]*5 for _ in range 5] + +def print_board: + for row in board: + print(" ".join(row)) + +col = randint(0, len(board[0])) +row = randint(0, len(board)) + +print(row, col) + +row_guess = input("Guess row: ") +col_guess = input("Guess column: ") + +if row_guess == row and col_guess == col: + print("something like \"We have a winner\"") +else: + print("YOU SAX!!!") From 7f96b31531280b9383ab769a695fda1eb46cb917 Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Fri, 1 Dec 2017 09:02:40 -0800 Subject: [PATCH 23/24] Update 09.py --- Project templates/u1_battleship/09.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Project templates/u1_battleship/09.py b/Project templates/u1_battleship/09.py index 29f278e..f6dd80c 100644 --- a/Project templates/u1_battleship/09.py +++ b/Project templates/u1_battleship/09.py @@ -10,10 +10,12 @@ def print_board: print(row, col) -row_guess = input("Guess row: ") -col_guess = input("Guess column: ") +row_guess = input("Guess row: ") - 1 +col_guess = input("Guess column: ") - 1 if row_guess == row and col_guess == col: print("something like \"We have a winner\"") +elif row_guess > len(board) or col_guess > len(board[0]) or row_guess < 0 or col_guess < 0: + print("Next time, try to aim *inside* the ocean") else: print("YOU SAX!!!") From 4f18198b6eb77fc1c27b5ab4256eb9704286d92f Mon Sep 17 00:00:00 2001 From: Sa'ar Date: Fri, 1 Dec 2017 09:24:37 -0800 Subject: [PATCH 24/24] Create 10.py --- Project templates/u1_battleship/10.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Project templates/u1_battleship/10.py diff --git a/Project templates/u1_battleship/10.py b/Project templates/u1_battleship/10.py new file mode 100644 index 0000000..2725e43 --- /dev/null +++ b/Project templates/u1_battleship/10.py @@ -0,0 +1,25 @@ +from random import randint +board = [["O"]*5 for _ in range 5] + +def print_board(): + for row in board: + print(" ".join(row)) + +col = randint(0, len(board[0])) +row = randint(0, len(board)) + +print(row, col) + +row_guess = input("Guess row: ") - 1 +col_guess = input("Guess column: ") - 1 + +print_board() +if row_guess == row and col_guess == col: + print("something like \"We have a winner\"") +elif row_guess > len(board) or col_guess > len(board[0]) or row_guess < 0 or col_guess < 0: + print("Next time, try to aim *inside* the ocean") +elif board[row_guess][col_guess] == 'x': + print("Insanity: doing the same thing over and over again and expecting different results.") +else: + board[row_guess][col_guess] = 'x' + print("YOU SAX!!!")