Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming Language in Python GAME: WWII Submarine Warfare. Assuming that you are the captain of a submarine and you have a target ahead of you.

Programming Language in Python
GAME: WWII Submarine Warfare. Assuming that you are the captain of a submarine and you have a target ahead of you. You choose a torpedo type and let's assume the distance between your submarine and the target is constant (20 rows for weapon travelling or range). When the target is not aware of danger it sails at normal speed (N), but when realizes hazard, it changes to zigzag pattern (Z). Your program should solicit firing position (assuming the ocean wide is 40 columns and the movement of both your submarine and the target is from left to right), torpedo type (of your design as long as not straight which is too simple), target speed (N or Z) and run a simulated torpedo in-the-water trajectory to predict performance. Anything not defined you may enhance. Make sure you stipulate clear before the user press the keys. Reject all bad input format as usual.
Then continue the WWII Submarine Warfare game and this time the submarine is approaching from right to left (not left to right played in
Program Language in Python
image text in transcribed
Firing Position 2e movement - torpedo trailing we 21 wave set of wees for repeated use 22 print (wave"10, ende) 23 print (wave's) 2412 firing positon (Loftmost) 25 movement 26 space . Initialize firing position offer 27 loopcount 1 287 bis backspace for printing to move backward once 29 bspace. bbb Movement Left to Right 31 steps. 20 colens of distance (range) Range Torpedo Type 191 Target Hit 33 assing our torpedoyme is running two rows then 34 advance another column and two more rows before 35 another advance. When the last vertical has touches 36 any of the it means a hit. 371 38 while loopcount steps: Illustration Only If loopcounts : print(movement "1) You need to develop a loopcount loopcount + 1 complete and user- else: N-Speed movement movement - loopcounts loopcountel Z-Speed print(movement . ") 46 art ed (N) below emple only) 47 print (wave 10, bspace," wave 5) Use as many 48 speed (2) below e mple only) 49 print(wave"3, bspace, " ", wave *12) bspace as you want MENU MIVM is Target (Choose only one speed for the target) Firing Position 2e movement - torpedo trailing we 21 wave set of wees for repeated use 22 print (wave"10, ende) 23 print (wave's) 2412 firing positon (Loftmost) 25 movement 26 space . Initialize firing position offer 27 loopcount 1 287 bis backspace for printing to move backward once 29 bspace. bbb Movement Left to Right 31 steps. 20 colens of distance (range) Range Torpedo Type 191 Target Hit 33 assing our torpedoyme is running two rows then 34 advance another column and two more rows before 35 another advance. When the last vertical has touches 36 any of the it means a hit. 371 38 while loopcount steps: Illustration Only If loopcounts : print(movement "1) You need to develop a loopcount loopcount + 1 complete and user- else: N-Speed movement movement - loopcounts loopcountel Z-Speed print(movement . ") 46 art ed (N) below emple only) 47 print (wave 10, bspace," wave 5) Use as many 48 speed (2) below e mple only) 49 print(wave"3, bspace, " ", wave *12) bspace as you want MENU MIVM is Target (Choose only one speed for the target)

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

Students also viewed these Databases questions

Question

3. What would you do now if you were Mel Fisher?

Answered: 1 week ago

Question

14.3 Explain WHMISlegislation.

Answered: 1 week ago