Explanation:
I think it is 7, but I could be wrong..... sorry
Answer:
Ans1.
double calc_a;
calc_a=Math.pow(3.0,2.0)+Math.sqrt(9);
Ans2.
double calc_b;
calc_b=((12.0/3.0)-(2.0*4.0));
Ans 3.
double calc_c;
calc_c=(Math.sqrt(16.0)*(7.0+9.0));
Ans 4.
double calc_d;
calc_d=Math.pow(7.0,2.0)/Math.sqrt(49.0);
Explanation:
The expressions are done with Java in answer above.
Answer:
bears = {"Grizzly":"angry", "Brown":"friendly", "Polar":"friendly"}
for bear in bears:
if bears[bear] == "friendly":
print("Hello, "+bear+" bear!")
else:
print("odd")
Explanation:
A dictionary called bears is given. A dictionary consists of key-value pairs.
You need to check each key-value pairs in bears and find the ones that have "friendly" as value using a for loop and if-else structure. In order to access the values of the dictionary, use the dictionary name and the key (inside the loop, the key is represented as bear variable). If a key has a value of "friendly", print the greeting. Otherwise, print "odd".
Solution:
Since no language was specified, this will be written in Python.
n1, n2, n3 = input ("Enter three names: ").split()
print(n3)
print(n2)
print(n1)
Cheers.