For this challenge we are not going to recreate a full battleship game. Instead we are going to focus on randomly placing the ships on the grid using an algorithm. The code given below uses Python Turtle to draw the…
Rules of the Game A player starts the game with 10 chips. For each game the player should be asked how many chips they want to bet. They should not be allowed to bet more chips than they actually own. Then the user…
Learning Objectives This set of challenges focuses on the use of lists in Python. You will learn how to: Initialise a list Add and remove values to a list Find out the length (number of items) of a list Access…
Did You Know? Rock-paper-scissors is a hand game usually played by two people, where players simultaneously form one of three shapes with an outstretched hand. The “rock” beats scissors, the “scissors” beat paper and the “paper” beats rock; if both…
Using all the skills we covered in the previous few challenges, we are going to adapt a script to create our own logo using Python Turtle. First let’s look at the following code: Challenge Your challenge consists of tweaking this…
Challenge #1: Leap Year? Write a program that lets the end-user enter a year using 4 digits (“yyyy” format). The program should inform the user whether the year entered is a leap year or not. Challenge #2: Valid and Invalid…