The answer is D. You can take a look at the image I attached, it contains some good illustrations.
It changes a little depending on what programming language you're using, but in C you could say
int times_ten (int num) {
num = num*10;
return num;
}
Or, in general terms:
Integer Function times_ten (Integer num)
Set num = num * 10
Return num
This is all done assuming the number used as an argument is an integer and that you are returning an integer value, not a decimal. The main thing to notice is that since you have to return a value, you must have two things: a return statement, and a type declaration for the function, otherwise you'll get an error.
Answer:
Here you go :)
Explanation:
Change this however you'd like:
def calc(n1, op, n2):
if op.lower() == "x":
return n1*n2
elif op == "+":
return n1+n2
elif op == "-":
return n1-n2
elif op == "/":
return n1/n2
else:
return "error"
num1 = float(input("Input first number: "))
oper = input("Input operator: ")
num2 = float(input("Input second number: "))
print(calc(num1, oper, num2))