Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you help with the develop a game on Python? See instructions below. Thank You. 8. Create a function to present the on-screen game board

Can you help with the develop a game on Python? See instructions below. Thank You.

image text in transcribed
8. Create a function to present the on-screen game board as follows: 1 2 3 7 9 10 Naval Battle (Part 1) A | . I - BI - I - 1 . Instructions: CI - I -I - 1 . 1. Create a new project in Visual Studio called: Task6_1_. DI - I - I - 1 . 2. Type the heading comments and the description of the program. 3. Develop a Python program that tells the user to enter the number of rows and columns with G I which you want the game board. Alternatives are 10x10. HI - | . I . I - I - I - I - I . 1. 4. You must validate the user input; if you select an incorrect alternative, it displays a message stating that the entry is incorrect and that you must select again. 1 . 5. Create an array using the number of rows and columns selected by the user. JI - I - 6. Create a function to initialize the array. In each position place a point (.) As the content, this KI . I - indicates that the position has not yet been played. 7. Create a function to calculate the position of each ship in the array. 9. The functions must be written in a separate module and must be imported into the initial You must create a second matrix where the coordinates of the ships are stored. program. a. Boats must be placed randomly. b. Boats must be placed horizontally or vertically. 10. Discuss the purpose of each function and the most important lines of code inside and outside the C. Boats should not be placed diagonally. functions d. You must place 3 ships that occupy 3 positions each

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions