Answer:
- equation = input("Enter an equation: ")
-
- if("+" in equation):
- operands = equation.split("+")
- result = int(operands [0]) + int(operands[1])
- print(operands[0] + "+" + operands[1] + "=" + str(result))
- elif("-" in equation):
- operands = equation.split("-")
- result= int(operands [0]) - int(operands[1])
- print(operands[0] + "-" + operands[1] + "=" + str(result))
- elif("*" in equation):
- operands = equation.split("*")
- result = int(operands [0]) * int(operands[1])
- print(operands[0] + "*" + operands[1] + "=" + str(result))
- elif("/" in equation):
- operands = equation.split("/")
- result = int(operands [0]) / int(operands[1])
- print(operands[0] + "/" + operands[1] + "=" + str(result))
- elif("%" in equation):
- operands = equation.split("%")
- result = int(operands [0]) % int(operands[1])
- print(operands[0] + "%" + operands[1] + "=" + str(result))
Explanation:
The solution code is written in Python 3.
Firstly prompt user to enter an equation using input function (Line 1).
Create if-else if statements to check if operator "+", "-", "*", "/" and "%" exist in the input equation. If "+" is found (Line 3), use split method to get the individual operands from the equation by using "+" as separator (Line 5). Output the equation as required by the question using string concatenation method (Line 6). The similar process is repeated for the rest of else if blocks (Line 7 - 22).
Access the Settings app.
Tap your name.
Scroll down until you reach the Subscriptions feature.
Tap on Subscriptions.
Locate your Brainly Plus subscription.
Select Cancel Subscription.
Tap Confirm.
Using the computer language in python to write a function code that calculates the area of a rectangle.
<h3>Writting the code in python:</h3>
<em>def rectangle_area(base, height):</em>
<em> z = base*height # the area is base*height</em>
<em> print("The area is " + str(z))</em>
<em>rectangle_area(5,6)</em>
See more about python at brainly.com/question/18502436
#SPJ1
Answer / Explanation:
195.200.0.0/16
Note: Class C address can not be assigned a subnet mask of /16 because class c address has 24 bits assigned for network part.
2ⁿ = number of subnets
where n is additional bits borrowed from the host portion.
2ˣ - 2 = number of hosts
where x represent bits for the host portion.
Assuming we have 195.200.0.0/25
In the last octet, we have one bit for the network
number of subnets = 2¹ =2 network addresses
number of host = 2⁷ - 2= 126 network addresses per subnets
Answer: keeps confidential documents secure,
displays a GUI, allocates the computer's resources, and retrieves files
Explanation:
The operating system can be defined as the software installed in the system that provides the information and services to the users by controlling the hardware, software resources, and regulates the computer programs. It runs the applications and programs in the system, displays the graphic user interface for the services, stores, manipulates, and retrieves files. It prevents the unauthorized access to the data and programs by using passwords thus provides the security to the system and documents.