Following are the "dice_eval" method code into python language.
Program Explanation:
- Defining a method "dice_eval" that takes two variables "d1,d2" in its parametes.
- Inside the method, multiple conditional statements were used that adds the parameter values and calculates its value which can be defined as follows:
- In the if block, it adds the parameters and uses or gate that check its value that is equal to 7 or 11. so, it will return a string message that is 'Winner!'.
- In the elif block, it adds the parameters and uses or gate that check its value that is equal to 2 or 3 or 12. so, it will return a string message that is ' C r aps ! '.
- In the else block, it uses a return keyword that adds parameter value and prints a string value.
- Outside the method "d1,d2" is declared that inputs the value from the user-end, and passes the value into the method, and prints its value.
Program:
def dice_eval(d1, d2):#defining a method dice_eval that takes two parameters
if (d1+d2)==7 or (d1+d2)==11:#defining if block that adds parameter value and use or operator to check its value
return 'Winner!'#return string value
elif (d1+d2)==2 or (d1+d2)==3 or (d1+d2)==12:#defining elif block that adds parameter value and use or operator to check its value
return 'C r aps!'#return string value
else:#defining else block
return 'Point is '+str(d1+d2)#return string value with adding parameter
d1=int(input())#defining d1 that input value
d2=int(input())#defining d2 that input value
print(dice_eval(d1,d2))#calling method and print its return value
Output:
Please find the attached file
Please find the complete code in the attached file.
Learn more:
brainly.com/question/15011927
Inside the case are the components that make up the computer itself, such as the RAM memories, the processor and the hard disk, all of which are directly or indirectly connected to the motherboard. In addition, the case allocates the power suplly, which is responsible for supplying power to the computer.
<h3>What is a computer case?</h3>
The case is the hardware component used to house most parts of a computer. It is inside it that components such as CPU, motherboard, SSD, video card and power supply are placed.
In addition, it is where the outputs for connections to other equipment are found, such as USB and HDMI outputs, plug for sound box and microphone and input for memory card.
The case has the important function of protecting the internal components of a computer from knocks, heat, light, moisture and dust. That's because most of the electronic components inside a computer are very sensitive and need this protection.
It is also used to connect to other hardware components, such as a monitor, keyboard, mouse and headset, through the various outputs provided on its exterior.
See more about computing at: brainly.com/question/15707178
#SPJ1
Answer:
Confederalism is not in the constitution it was adopted later.
Explanation:
The engineering design process important to the customer layout system permits things: A shared technique on a way to discover and remedy problems. A framework to assess ideas, tell priorities and save you myopic paintings.
<h3>What is the maximum vital step withinside the engineering layout system?</h3>
The first step withinside the engineering layout system is to outline the trouble that you are solving. This step is the maximum vital, as a defective know-how of the trouble handy ends in layout failures. Engineers paintings to discover the foundation trouble via way of means of opposite engineering the signs and symptoms they perceive.
The engineering layout system, via way of means of definition, is a sequence of steps that engineers use to discover an option to a trouble. These steps include: defining the trouble, brainstorming solutions, designing and constructing a prototype of the solution, trying out the solution, and enhancing it.
Read more bout the engineering :
brainly.com/question/17169621
#SPJ1
Answer:
int
Explanation:
<h2><u>Fill in the blanks </u></h2>
The control variable of a counter-controlled loop should be declared as <u>int </u> to prevent errors. Group of answer choices int double float Any of the above.