Battleship! Lab

#18

This lab was very interesting. At first, I didn’t know where to put the else statements under another one. It felt sort of like listing out repeated steps and once I got the hang of it. I noticed that you can put else: first then put  if:, elif: and finally else: can be put again. It was confusing because else: under else: would give an error, but with this it didn’t. Python is incredible! All this coding made a really fun battleship game.

Untitled

#19

I create my own battleship game this time, but now with multi players! The first 14 lines I made was the same as the one in “To Your Battle Stations!”. I created a range for the battleships which is the amount of turns. I inputted a “Game Over” if you play pass 4 turns. Losing makes everything more fun! When guess_row and guess_col are pass 5,  it will print my statement. It was really fun making this game, I hope others will understand how python works and enjoy it as much as me.

Untitled1