Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

FAST SOLVE PLEASE. add a comment next to important codes. I'll definitely like it if you send it. A program that performs a simulation for

FAST SOLVE PLEASE. add a comment next to important codes. I'll definitely like it if you send it.

image text in transcribed

A program that performs a simulation for a game will be written. The game will feature three characters: Fire Titan, water Titan and Earth Titan. Simulation will be done by selecting two different characters at random. The attack types, effects, and probability of the characters occurring are given as in the table. Initially, the energies of the selected characters will be considered 100. After the character's attack type is randomly determined in each move, the opponent's energy will be reduced as much as the effect of the attack type. The probability of the attack type occurring for the characters is random with the addition of the library as follows.it will be calculated using the randint command. . Page 2 import random... probability = random.randint (1,100) ... For example, if the values in the table are examined, the icy healing attack type will be used if the probability of an attack for a water Titan is in the range of 1 to 20 (including). In the range of 21 to 60 (including), the type of attack of the frost needle will be used. In the range of 61 to 100 (including), the north wind attack type will be used. For these types of attacks, the energy of the opposite side will be reduced to 11, 7 and 3, respectively. In other characters, values in the table will be used similarly. The first player to drop their opponent's energy to zero or below zero will win the game. Write this application using the Python programming language. Table : Attack types of characters, their effects and their probability of occurrence. Character Attack Type Effects Probability Karakter Su Titani Su Titani Su Titani Ates Titani Ates Titani Ates Titani Toprak Titani Toprak Titani Toprak Titani Saldr Tipi Buzlu ifa Kura nesi Kuzey Rzgri Alev Habercisi Ezici Darbe Patlayan fke Yeralt Hapishanesi Dnyann fkesi Orman Frtnas Etkisi 11 7 3 12 8 4 10 6 5 Olaslk 20 40 40 10 40 50 15 25 60

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

Beginning C# 2005 Databases

Authors: Karli Watson

1st Edition

0470044063, 978-0470044063

More Books

Students also viewed these Databases questions