num1 = float(input("Enter the first number: "))
num2 = float(input("Enter the second number: "))
operation = input("Which operation are you performing? (a/s/m/d) ")
if operation == "a":
print("{} + {} = {}".format(num1, num2, num1+num2))
elif operation == "s":
print("{} - {} = {}".format(num1, num2, num1-num2))
elif operation == "m":
print("{} * {} = {}".format(num1, num2, num1*num2))
elif operation == "d":
print("{} / {} = {}".format(num1, num2, num1/num2))
I hope this helps!
Answer:
D
Explanation:
pecialisation - departments focus on one area of work. productivity - specialism means that staff are skilled in the tasks they do. accountability - there are clear lines of management. clarity - employees understand their own and others' roles.
Answer:
result 1 = false;
result 2 = true;
Explanation:
result 1 = (43 < -77 && 1! = 10)
43 < -77 = false
1 != 10 = true
for any false && true logical operator, it returns false
result 1 = false;
false = 90 < -77 || -1 < 43
90 < -77 = false
-1 < 43 = true
for any false || true logical operator, it returns true
result 2 = true;
Answer:
Hi!
The following Javascript statement compares if num is 2 or 5 and increment num by 1 if true.
if ( num==2 || num==5)
num = num +1;
Explanation:
The operator == is used to compare if the operands are equal.
The operator || is OR.
- If at least one of the operands is true then return true.
- If all operands are false returns false.
if( num==2 || num==5)
<em> // if num is equal 2 or if num is equal 5</em>
num = num +1; <em>// adds 1 to num.</em>
Typing in the site address?
Hope this helped!