PhpAdmin. As you can see from the example above, there are 5 columns. a. We need a data type for each column. I think you know how to figure most of them out. The only new one is gametime. The correct type for this is called TIMESTAMP. b. We will rely on the DBMS to provide the value for gametime each time a new record is added. To do that, we provide a default value using CURRENT_TIMESTAMP. c. We will also rely on the DMBS to provide the value for the id column. We use a feature called AUTO_INCREMENT. It automatically creates ID numbers every time you add a record. Since we havent seen this before, Ill show you how to do it: CREATE TABLE invaders ( id INT NOT NULL AUTO_INCREMENT, player VARCHAR(20) NOT NULL, hero INT NOT NULL, gametime TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, score INT NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB 2. Now when you insert, you only need to specify the player, the hero, and the score. So your insert commands will look something like this: INSERT INTO invaders (player, hero, score) VALUES (‘crono’, 1, 50) You can try it out in PhpMiniAdmin if you want to see how auto increment and the timestamp work. 3. Now comes the time for Python code. a. Open the diceGame.py file from in Task 1 from Canvas. Play the game once. When the game is over, a message is printed to the console, such as Crono achieved a score of 26 while playing Acton. b. That message is printed in the updateDatabase
Needs help with similar assignment?
We are available 24x7 to deliver the best services and assignment ready within 6-12hours? Order a custom-written, plagiarism-free paper
Get Answer Over WhatsApp Order Paper Now