Using the knowledge in computational language in python it is possible to write a code that was fixed;
Writting in python:from random import randint
class Character:
def __init__(self):
self.name = ""
self.health = 1
self.health_max = 1
def do_damage(self, enemy):
damage = min(
max(randint(0, self.health) - randint(0, enemy.health), 0),
enemy.health)
enemy.health = enemy.health - damage
if damage == 0:
print("%s evades %s's attack." % (enemy.name, self.name))
else:
print("%s hurts %s!" % (self.name, enemy.name))
return enemy.health <= 0
class Enemy(Character):
def __init__(self, player):
Character.__init__(self)
self.name = 'a goblin'
self.health = randint(1, player.health)
class Player(Character):
def __init__(self):
Character.__init__(self)
self.state = 'normal'
self.health = 10
self.health_max = 10
def quit(self):
print(
"%s can't find the way back home, and dies of starvation.\nR.I.P." % self.name)
self.health = 0
def help(self): print(Commands.keys())
def status(self): print("%s's health: %d/%d" %
(self.name, self.health, self.health_max))
def tired(self):
print("%s feels tired." % self.name)
self.health = max(1, self.health - 1)
def rest(self):
if self.state != 'normal':
print("%s can't rest now!" % self.name)
self.enemy_attacks()
else:
print("%s rests." % self.name)
if randint(0, 1):
self.enemy = Enemy(self)
print("%s is rudely awakened by %s!" %
(self.name, self.enemy.name))
self.state = 'fight'
self.enemy_attacks()
else:
if self.health < self.health_max:
self.health = self.health + 1
else:
print("%s slept too much." % self.name)
self.health = self.health - 1
def explore(self):
if self.state != 'normal':
print("%s is too busy right now!" % self.name)
self.enemy_attacks()
else:
print("%s explores a twisty passage." % self.name)
if randint(0, 1):
self.enemy = Enemy(self)
print("%s encounters %s!" % (self.name, self.enemy.name))
self.state = 'fight'
else:
if randint(0, 1):
self.tired()
def flee(self):
if self.state != 'fight':
print("%s runs in circles for a while." % self.name)
self.tired()
else:
if randint(1, self.health + 5) > randint(1, self.enemy.health):
print("%s flees from %s." % (self.name, self.enemy.name))
self.enemy = None
self.state = 'normal'
else:
print("%s couldn't escape from %s!" %
(self.name, self.enemy.name))
self.enemy_attacks()
def attack(self):
if self.state != 'fight':
print("%s swats the air, without notable results." % self.name)
self.tired()
else:
if self.do_damage(self.enemy):
print("%s executes %s!" % (self.name, self.enemy.name))
self.enemy = None
self.state = 'normal'
if randint(0, self.health) < 10:
self.health = self.health + 1
self.health_max = self.health_max + 1
print("%s feels stronger!" % self.name)
else:
self.enemy_attacks()
def enemy_attacks(self):
if self.enemy.do_damage(self):
print("%s was slaughtered by %s!!!\nR.I.P." %
(self.name, self.enemy.name))
Commands = {
'quit': Player.quit,
'help': Player.help,
'status': Player.status,
'rest': Player.rest,
'explore': Player.explore,
'flee': Player.flee,
'attack': Player.attack,
}
p = Player()
p.name = input("What is your character's name? ")
print("(type help to get a list of actions)\n")
print("%s enters a dark cave, searching for adventure." % p.name)
while(p.health > 0):
line = input("> ")
args = line.split()
if len(args) > 0:
commandFound = False
for c in Commands.keys():
if args[0] == c[:len(args[0])]:
Commands[c](p)
commandFound = True
break
if not commandFound:
print("%s doesn't understand the suggestion." % p.name)
See more about python at brainly.com/question/12975450
#SPJ1
The motor branch circuit short circuit and ground-fault protective device shall be capable of carrying the ______ current of the motor.
Answer:
Starting current
Explanation:
The motor branch circuit short circuit and ground-fault protective device shall be capable of carrying the Starting current of the motor.
c) Although Ethics means different thi ng to different people, its meaning
al ways has some ethical implications. Ethics are standards of right and
wrong, good and bad. They are concerned with what one has to do to fulfill one’s moral duty. In your opinion, is it good t o practice euthanasia in
Ghana?
I would say it is not good (ethical) to practice euthanasia in Ghana because it limits and prunes the chances and fundamental rights to life of a patient.
What are ethics?Ethics can be defined as a set of unwritten and written standards of good and bad, right and wrong, principles, values or rules of moral conduct that are established to guide human behaviors, especially with respect to their relationship with others.
What is euthanasia?Euthanasia can be defined as a medical practice which typically involves ending or cutting short the life of a terminally ill patient or someone who is experiencing great pain and suffering, in order to limit and end the patient's suffering.
In my opinion, I would say it is not good (ethical) to practice euthanasia in Ghana because it limits and prunes the chances and fundamental rights to life of a patient.
Read more on ethics here: brainly.com/question/24277955
#SPJ1
When required to drill holes on a roof that has no power supply the best drill for the job would be__________.
When required to drill holes on a roof that has no power supply the best drill for the job would be a cordless drill.
What is power supply?It should be noted that a power supply is an electrical device which supplies electric power to an electrical load.
In this case, the main purpose of a power supply is simply to be able to convert electric current from the source to the correct current, and frequency.
In this case, the power supply unit converts the main AC to a low-voltage regulated DC power. Therefore, When required to drill holes on a roof that has no power supply the best drill for the job would be a cordless drill.
Learn more about power supply on:
https://brainly.com/question/14510836
#SPJ1
he critical buckling load of an ideal column of circular cross section can be reduced by: The critical buckling load of an ideal column of circular cross section can be reduced by: increasing the Poisson's ratio of the column material increasing the length of the column increasing the modulus of elasticity of the column material increasing the diameter of the column
The critical buckling load of an ideal column of circular cross section can be reduced by increasing the diameter of the column.
What is critical load of buckling of column?The critical load is known to be that factor that is labeled the greatest load that is one which is unable to cause lateral deflection (buckling).
Note that For loads greater than the critical load, the column will tend to decrease laterally. The critical load is known to be one that puts the column in what we call the state of an unstable form of equilibrium.
The critical buckling load is based on the shape and dimensions of beam section that is said to have constant cross sectional area.
Hence, The critical buckling load of an ideal column of circular cross section can be reduced by increasing the diameter of the column.
Learn more about ideal column from
https://brainly.com/question/1788884
#SPJ1
Business support systems ____.
Answer:
These are the components telecommunication service providers use to run certain operations towards customers.
hope it helps. pls like and follow
Business support systems "provide job-related information support to users at all levels of a company". The correct option is 'a'.
Business support systems (BSS) encompass a combination of functionalities mentioned in the provided options. Let's discuss each option briefly:
a. Provide job-related information support to users at all levels of a company:
This statement aligns with the concept of Decision Support Systems (DSS), which are a type of BSS that aid users in making informed decisions by providing relevant information and analysis. DSS supports various levels of management by assisting them in evaluating alternatives, analyzing data, and generating reports to support decision-making processes.
b. Simulate human reasoning by combining a knowledge base and inference rules that determine how the knowledge is applied:
This description pertains to Expert Systems, which are an advanced form of BSS. Expert Systems utilize a knowledge base and inference rules to imitate human expertise and provide intelligent solutions to complex problems. They are particularly useful in domains where specialized knowledge is required.
c. Process data generated by day-to-day business operations:
This statement refers to Transaction Processing Systems (TPS), which are an essential component of BSS. TPS handles routine, day-to-day transactions and processes data generated during regular business operations, such as sales, inventory, and payroll.
d. Include e-mail, voice mail, fax, video conferencing, word processing, automated calendars, database management, spreadsheets, and integrated mobile computing systems:
These technologies are examples of Office Automation Systems (OAS), another category of BSS. OAS streamline office tasks and improve communication and collaboration among employees through various software tools and applications.
Therefore, business support systems encompass a range of applications and technologies that provide job-related information support.
To learn more about Business support systems;
https://brainly.com/question/31807690
#SPJ3
The complete question:
Business support systems ____.
a. provide job-related information support to users at all levels of a company
b. simulate human reasoning by combining a knowledge base and inference rules that determine how the knowledge is applied
c. process data generated by day-to-day business operations
d. include e-mail, voice mail, fax, video conferencing, word processing, automated calendars, database management, spreadsheets, and integrated mobile computing systems
Effutu community members, in a recent community conference aimed at
deliberating on dishonest behavior of some communi ty leaders ended up
justifying unet hical behavior with the assertion that everybody acts
unethically. As a professional ethics st udent, analyze five reasons why
members in Effutu community act unethically
As a professional ethics student, analyze five reasons why members of Effutu community act unethically.
They are:
They believe that everyone acts unethicallyThey believe that there is little to no reward in acting honestlyThey do not believe that ethics has any long-term benefitThey do not want to be the odd-one-outThey are scared of change starting from themWhat is Ethics?This refers to the moral principles that guide a person's behavior and show their conduct to others and also to themselves.
Hence, we can see that based on the assertion made by the Effutu community members, they ended up justifying unethical behavior and the analysis has been made above.
Read more about ethics here:
https://brainly.com/question/13383200
#SPJ1
A complicated emissions control system would be the only way to lower a rotary engines poor emissions.
It is false that a complicated emissions control system would be the only way to lower a rotary engines poor emissions.
What is emission control system?Emission control system is developed to reduce emissions and discharge.
They are found in vehicles and other automobile to limit the discharge or release of gases thay are noxious which emit from combustion engine.
To control exhaust emissions, the air-injection system can be used and also, the exhaust gas recirculation (EGR) system can be used to reduce emissions. A high emissions requires high energy control system.
Therefore, It is false that a complicated emissions control system would be the only way to lower a rotary engines poor emissions
Learn more on emission below
https://brainly.com/question/2187993
#SPJ1
This occurs when a layer of water builds between the wheels of the vehicle and the road surface, leading to a loss of traction that prevents the vehicle from responding to control inputs.
Aquaplaning or hydroplaning by the tires of a road vehicle, aircraft, or other wheeled vehicle happens when a coating of water builds between the wheels of the vehicle and the road surface, leading to a failure of traction that controls the vehicle from responding to govern inputs.
What is Aquaplaning or hydroplaning?Aquaplaning or hydroplaning by the tires of a road vehicle, aircraft, or other wheeled vehicle happens when a coating of water builds between the wheels of the vehicle and the road surface, leading to a failure of traction that controls the vehicle from responding to govern inputs. Aquaplaning, also understood as hydroplaning, is a situation in which standing water, slush, or snow, drives the moving wheel of an aircraft to lose contact with the load-bearing surface on which it stands rolling with the impact that braking action on the wheel stands not effective in decreasing the ground speed of the aircraft.
When driving on wet roads at increased speed, a wedge of water can create up between the tire and the road surface. The tire loses road contact, and the vehicle stands no longer responsive to steering. This phenomenon exists understood as aquaplaning or hydroplaning.
To learn more about Aquaplaning or hydroplaning refer to:
https://brainly.com/question/3157449
#SPJ4
why is it important to know where your online information comes from?
It is very important to know where online information comes from in order to validate, authenticate and be sure it's the right information
What are online information?Online informations are information which are available on the internet such as search engines, social handles and other websites
In conclusion, it is very important to know where online information comes from in order to validate, authenticate and be sure it's the right information
Learn more about online information:
https://brainly.com/question/921157
#SPJ1
Another specialty valve widely used in hydronic systems provides the ability to isolate, flow balance, and even drain individual heat emitters. It is called a ____.
The lock shield valve is known to be another specialty valve widely used in hydronic systems provides the ability to isolate, flow balance, and even drain individual heat emitted.
What is a lock shield valve?The Lockshield valve is known to be a kind of a valve that is seen on a radiator.
Note that it is known to be a kind of a valve that is often used to aid one in the balancing of the radiator and that of the central heating system as in full.
Therefore, It is one that can be opened to a lot of amounts to let in a a given amount of pressure based on where the radiator is and therefore, The lock shield valve is known to be another specialty valve widely used in hydronic systems provides the ability to isolate, flow balance, and even drain individual heat emitted.
Learn more about lock shield valve from
https://brainly.com/question/20347783
#SPKJ1
During welding in the vertical position, the torch angle can be varied to control sagging.
a. true
b. false
Answer:
A: True
Explanation:
The given statement is true.
During welding in the vertical position, the torch angle is not typically varied to control sagging. This statement is False.
Sagging, also known as downward distortion, occurs when the molten metal in the weld pool pulls downward due to gravity.
To control sagging, the primary method is to adjust the welding parameters, such as the welding current, travel speed, and electrode angle, rather than the torch angle.
Maintaining a proper travel speed and using appropriate welding techniques, such as weaving, can also help to manage sagging.
Ensuring proper joint preparation and fit-up, as well as using suitable welding procedures, are crucial in minimizing sagging and achieving high-quality vertical welds.
Know more about sagging:
https://brainly.com/question/339185
#SPJ7
a cylindrical tank of length 30m and diameter 1.5kg contains 25kg of air. Determine the specific volume and density of the air in the tank.
Answer: chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/http://www.velhightech.com/Documents/ME8391%20Engineering%20Thermo%20Dynamics.pdf
click this link for the best explaination
Explanation:
You are coming to this intersection, and are planning on turningright. There is a vehicle close behind you. You should?
Answer:
Put on your right turn signal
Esma and hasan are putting the finishing touches on their model for a tiny chip-based energy source to power their lighting system. what phase of the engineering design process should they complete next? confirm with research build a prototype test their work get the product priced
The phase of the engineering design process which should be completed next is to test their work and is denoted as option C.
What is Engineering design?These are the series of steps and techniques which are done by individuals in the making of functional product and services.This employs the use of scientific methods and also ensures an easier living for different individuals.
The first stage involves identifying the problem and then building a prototype through the use of different materials. This is then tested before the final finishing work is done to ensure the parts are properly placed before they are moved for evaluation by other people.
Read more about Engineering design here https://brainly.com/question/411733
#SPJ1
Which class of material is generally considered to be the weakest at room temperature, offering the lowest elastic moduli and tensile strengths?
Polymers is the referred to the class of material which is generally considered to be the weakest at room temperature, offering the lowest elastic moduli and tensile strengths and is denoted as option B.
What is a Polymer?This refers to a type of compound which are long chained and are formed from smaller repeating chemical units known as monomers through the process which is referred to as polymerization
They are usually in the form of plastics or resins and have features such as lowest elastic moduli and tensile strengths thereby making it the most appropriate choice.
Read more about Polymer here https://brainly.com/question/766968
#SPJ1
The options incliude:
A.Metal
B.Polymer
C.Ceramics
D.Composites
How do I create a run chart?
One of the simple ways to create a run chart is:
Open Microsoft Excel. You should see a blank worksheet with grid lines.Across the top row, (start with box A1), enter headings for the type of information you will enter into your run chart: Time Unit, Numerator, Denominator, Rate/Percentage. Enter in the time period and corresponding numerator and denominator data into the columns below your headingsSelect cell B2 (the border should light up blue)Type a forward slash: /Select cell C2 (it should light up green)Type a closed parenthesis: )Type a star (hold the SHIFT and 8 keys down at the same time): *Type the number 1000: 1000The whole equation should look like this: =(B2/C2)*1000Hit the “Enter” key. You will see a number with decimals appear in cell D2. Select the information you want to include in your run chart. This is usually the time unit and rate/percentage, which in this example, would be month and 30 day readmission rate.Click on the “Insert” tab, Select the “Line” graph option, then click on the “Line with Markers” boxA run chart should appear on the screen What is a Run Chart?This refers to the line chart that is plotted over time and displays observed data in a time sequence.
Hence, we can see that the simple tutorial on how to create a run chart with the use of an Excel Spreadsheet is given above.
Read more about run charts here:
https://brainly.com/question/24215818
#SPJ1
How do you fix this?
def quit(self):
print("%s can't find the way back home, and dies of starvation.\nR.I.P." % self.name)
self.health = 0
The debugging of this code would be to replace Character that is inside the class "namespace".
Therefore, you must use Character.Character instead of only Character if you use the class from outside of the namespace.
What is Debugging?This refers to the process of identifying and eliminating bugs in a computer program that does not allow it to run or execute.
Hence, we can see that the complete program contains the error of the character "Character" being inside the class "namespace". and you would need to rename it appropriately.
Read more about debugging here:
https://brainly.com/question/16813327
#SPJ1
Describe the potential evidences of child hood fixation that show up in adult personality?
Answer:
Im so pretty hahahaha
Explanation:
I can describe myself to you hehehehehe I'm just calm
The potential evidence of childhood fixation that shows up in adult personality is oral fixation. It is the oral fixation that is caused by unmet oral needs. Such kinds of needs can be seen in early childhood.
What is potential evidence?There are some devices or items that are intended or actually used depending upon their functions or capabilities. One may get other information that is contained in it. Such an item is known as potential evidence.
There is one more way to keep the record of such kind of item, and that is digital. When the evidence is recorded in the digital form, they are stored in the binary form that may be relied on in court. This evidence can be found on a computer hard drive or on a mobile phone.
Thus, it is the oral fixation that has been done in childhood.
Learn more about potential evidence from here:
https://brainly.com/question/4608050
#SPJ2
Air turbine starters are generally designed so that reduction gear distress or damage may be detected by?
Air turbine starters are generally designed so that reduction gear distress or damage may be detected by producing sounds from the starter assembly.
What is air turbine?An air turbine are usually attached to engines such as a moving vehicle or turbines.
It contains compressed air that allows it movement and it can be used to start engines. The compressed air in the turbines allows it to produce energy called mechanical energy. In case of damage it is made to produce sound which serves as indicator.
Therefore, Air turbine starters are generally designed so that reduction gear distress or damage may be detected by producing sounds from the starter assembly.
Learn more on turbine below
https://brainly.com/question/15321264
#SPJ1
Write a SELECT statement that returns these four columns:
vendor name -
invoice number
i11voice date
balance due
The vendor_name column from the Vendors table
The invoice number column from the Invoices table
The invoice date coltrmn from the Invoices table
The invoice_total column minus the payment_total
and credit_total columns from the Invoices table
Use these aliases for the tables: v for Vendors and i for Invoices.
Return one row for each invoice with a non-zero balance. This should return
11 rows.
Sort the result set by vendor_name in ascending order.
A SELECT command pulls zero or more rows from one or more database tables or views. SELECT is the most often used data manipulation language (DML) command in most applications. See the statement required below.
What is the SELECT Statement that gives the above results?SELECT VendorName, InvoiceNumber, InvoiceDate,
InvoiceTotal - PaymentTotal - CreditTotal AS Balance
FROM Vendors JOIN Invoices
ON Vendors.VendorID = Invoices.VendorID
WHERE InvoiceTotal - PaymentTotal - CreditTotal > 0
ORDER BY VendorName;
Learn more about SELECT Statements at;
https://brainly.com/question/19338967
#SPJ1
The type of current that flows from the electrode across the arc to the work is called direct current electrode?
Answer:
Direct Control Electrode Negative) (DCEN)
Explanation:
The type of current that flows from the electrode across the arc to the work is called direct current electrode is called DCEN.
The regulator is closed when the adjusting screw is turned in (clockwise).
a. true
b. false
The regulator is closed when the adjusting screw is turned in (clockwise), this statement is false.
What is Regulator?Monitoring adherence to other legal and regulatory standards as well as contractual responsibilities to the government and users. establishing technical, safety, and quality requirements and ensuring that they are followed (if not already specified in the contract agreements). levying fines in the event of non-compliance.
The principal oversight organization for a bank or other financial institution is known as a primary regulator. Primary regulators are state or federal regulatory organizations, which are frequently the same organization that granted the financial institution's operating permit with a charter.
Hence, The regulator is closed when the adjusting screw is turned in (clockwise), it is turned Anticlockwise.
To know more about follow the link.
https://brainly.com/question/27289175
#SPJ5
Add the following vector given in rectangular form and illustrated the process graphically A = 16+j12, B= 6+j10.4
Answer:
A=16+j12…'B=6+j10.4
Explanation:
add the following vector given in
If the suction pressure of a system is 60 psig and the oil pump outlet is 85 psig, what is the net oil pressure?
Answer:
25 psig
Explanation:
The net oil pressure = 85 - 60 = 25 psig
(c) As Engineering and Computing students, you must be familiar, with the respective professional bodies, as well as, Rules of Practice, Professional Obligations and Codes of Ethics. Comment
The professional ethics for computer engineers are:
They will Contribute to society and to human well-being.They will Avoid harm.Be honest and trustworthy.They will be fair and take action that do to discriminate others.What are the Characteristics of Code of Ethics?The code of ethics are known to be a kind of a universal moral values, that is one that state that what a person expect of any given employee such as been trustworthy, respectful, responsible, and others.
Note that Rules of Practice, Professional Obligations and Codes of Ethics. are known to be put in place to avoid issues that may lead to conflict.
Therefore, i believe that As Engineering and Computing students, the respective professional bodies, Rules of Practice, Professional Obligations and Codes of Ethics are good and acts as a check and balance to us.
Therefore, The professional ethics for computer engineers are:
They will Contribute to society and to human well-being.They will Avoid harm.Be honest and trustworthy.They will be fair and take action that do to discriminate others.Learn more about Engineering rules from
https://brainly.com/question/17169621
#SPJ1
The smaller the grinder, the _______ the speed it turns
Answer:
faster
Explanation:
because in a big grinder you ca only grind bigger things but not Small things , some parts of your things that will
remain as they were in the beginning, so it will take more time to grind Small things .
When making a conduit-to-box connection and a bonding wire will be installed, use?
When making a conduit-to-box connection and a bonding wire will be installed, by using a. grounding locknut.
How can one connect conduit to a box?
Metallic couplings can be used for metallic conduit and they can be secured with set screws or via compression.
It should be noted that the threaded couplings screw onto couplings that have threaded ends will make it easier.
Nonmetallic couplings can be used for nonmetallic conduit which are usually attached with solvent cement, hence When making a conduit-to-box connection and a bonding wire will be installed, by using a. grounding locknut.
Learn more about bonding wire on:
https://brainly.com/question/3753070
#SPJ1
Question 5 of 10
Multiple Choice
How much cubic inch space is required inside a box for 4 #6 XHHN current carrying conductors?
OA. 12 cubic inches
OB. 10 cubic inches
OC. 20 cubic inches
OD. 8 cubic inches
The cubic inch space that is required inside a box for 4 #6 XHHN current carrying conductors will be D. 8 cubic inches.
What is a conductor?It should be noted that a conductor simply means a substance or material that simply allows electricity to pass through it.
From the information given, the cubic inch space that is required inside a box for 4 #6 XHHN current carrying conductors is yo be computed.
This will be:
= (4 × 6)/3
= 24/3
= 8
In conclusion, the cubic inch space that is required inside a box for 4 #6 XHHN current carrying conductors will be 8 cubic inches.
Learn more about conductor on:
brainly.com/question/11845176
#SPJ1
how do you fix this code? python
from random import randint
class Character:
def __init__(self):
self.name = ""
self.health = 1
self.health_max = 1
def do_damage(self, enemy):
damage = min(
max(randint(0, self.health) - randint(0, enemy.health), 0),
enemy.health)
enemy.health = enemy.health - damage
if damage == 0: print "%s evades %s's attack." % (enemy.name, self.name)
else: print "%s hurts %s!" % (self.name, enemy.name)
return enemy.health <= 0
The correct code that fixes this bug-filled python code is:
from random import randint
class Character:
def __init__(self):
self.name = ""
self.health = 1
self.health_max = 1
def do_damage(self, enemy):
damage = min(
max(randint(0, self.health) - randint(0, enemy.health), 0),
enemy.health)
enemy.health = enemy.health - damage
if damage == 0:
print("%s evades %s's attack." % (enemy.name, self.name))
else:
print("%s hurts %s!" % (self.name, enemy.name))
return enemy.health <= 0
class Enemy(Character):
def __init__(self, player):
Character.__init__(self)
self.name = 'a goblin'
self.health = randint(1, player.health)
class Player(Character):
def __init__(self):
Character.__init__(self)
self.state = 'normal'
self.health = 10
self.health_max = 10
def quit(self):
print(
"%s can't find the way back home, and dies of starvation.\nR.I.P." % self.name)
self.health = 0
def help(self): print(Commands.keys())
def status(self): print("%s's health: %d/%d" %
(self.name, self.health, self.health_max))
def tired(self):
print("%s feels tired." % self.name)
self.health = max(1, self.health - 1)
def rest(self):
if self.state != 'normal':
print("%s can't rest now!" % self.name)
self.enemy_attacks()
else:
print("%s rests." % self.name)
if randint(0, 1):
self.enemy = Enemy(self)
print("%s is rudely awakened by %s!" %
(self.name, self.enemy.name))
self.state = 'fight'
self.enemy_attacks()
else:
if self.health < self.health_max:
self.health = self.health + 1
else:
print("%s slept too much." % self.name)
self.health = self.health - 1
def explore(self):
if self.state != 'normal':
print("%s is too busy right now!" % self.name)
self.enemy_attacks()
else:
print("%s explores a twisty passage." % self.name)
if randint(0, 1):
self.enemy = Enemy(self)
print("%s encounters %s!" % (self.name, self.enemy.name))
self.state = 'fight'
else:
if randint(0, 1):
self.tired()
def flee(self):
if self.state != 'fight':
print("%s runs in circles for a while." % self.name)
self.tired()
else:
if randint(1, self.health + 5) > randint(1, self.enemy.health):
print("%s flees from %s." % (self.name, self.enemy.name))
self.enemy = None
self.state = 'normal'
else:
print("%s couldn't escape from %s!" %
(self.name, self.enemy.name))
self.enemy_attacks()
def attack(self):
if self.state != 'fight':
print("%s swats the air, without notable results." % self.name)
self.tired()
else:
if self.do_damage(self.enemy):
print("%s executes %s!" % (self.name, self.enemy.name))
self.enemy = None
self.state = 'normal'
if randint(0, self.health) < 10:
self.health = self.health + 1
self.health_max = self.health_max + 1
print("%s feels stronger!" % self.name)
else:
self.enemy_attacks()
def enemy_attacks(self):
if self.enemy.do_damage(self):
print("%s was slaughtered by %s!!!\nR.I.P." %
(self.name, self.enemy.name))
Commands = {
'quit': Player.quit,
'help': Player.help,
'status': Player.status,
'rest': Player.rest,
'explore': Player.explore,
'flee': Player.flee,
'attack': Player.attack,
}
p = Player()
p.name = input("What is your character's name? ")
print("(type help to get a list of actions)\n")
print("%s enters a dark cave, searching for adventure." % p.name)
while(p.health > 0):
line = input("> ")
args = line.split()
if len(args) > 0:
commandFound = False
for c in Commands.keys():
if args[0] == c[:len(args[0])]:
Commands[c](p)
commandFound = True
break
if not commandFound:
print("%s doesn't understand the suggestion." % p.name)
Read more about python programming here:
https://brainly.com/question/27666303
#SPJ1
Question1: You are contracted to install MS Exchange Server software on all PCs of a company. After doing half of the work, you found that the company did not pay MS for the copies you are installing. You notified the company that they were out of compliance with MS licensing requirement, but got no response.
a. What do you do?.
b. What other information would you need?.
c. Explain.
Since you notified the company that they were out of compliance with MS licensing requirement, and got no got no response. one can:
Let the job go or find an alternative by asking if the company have a product key which you can use.The other information that a person would need in the case above is if the company already have a product key or if they have the money to buy the licensing key.What are Microsoft licenses?The Microsoft Services Provider License Agreement ("SPLA") is known to be a kind of a program that is made to target a lot of service providers and also those of Independent Software Vendors ("ISVs").
This is known to be the v that is given to their partners to give their software services and that of their hosted applications to the end customers.
Based on the above, Since you notified the company that they were out of compliance with MS licensing requirement, and got no got no response. one can:
Let the job go or find an alternative by asking if the company have a product key which you can use.The other information that a person would need in the case above is if the company already have a product key or if they have the money to buy the licensing key.Learn more about MS licensing from
https://brainly.com/question/15612381
#SPJ1