Assign total_owls with the sum of num_owls_A and num_owls_B.

The result or output for the program should be something like following:

Number of owls: 7 num_owls_A = '3' num_owls_B = '4' total_owls = 0 ' ' ' Remedy' ' ' print('Number of owls:', total_owls)

Respuesta :

Answer:

Explanation:

  • We declare the variable about the zoo with the owl's quantity, we could put any integer.
  • We make the sum operation zooA + zooB, with the variable total_owls.
  • we print the result about the two zoo.

num_owls_zooA= 3

num_owls_zooB = 4

total_owls = 0

total_owls = num_owls_zooA + num_owls_zooB

print('Number of owls:', total_owls)

Answer:

total_owls = int(num_owls_A) + int(num_owls_B)

Explanation:

I initially tried adding the two together by doing total_owls = num_owls_A + num_owls_B but that didn't work. All it seem to do was put the two numbers, 3 and 4, together into 34.

So I looked at my notes about how python works. Along with some websites that would help me. And I found the answer I was looking for on https://www.w3schools.com/python/python_howto_add_two_numbers.asp

Where it turns out I needed to use int() into the code. int() converts the specified value into an integer number.

So I decided to give it my best shot by doing total_owls = int(num_owls_A) + int(num_owls_B) and wellah, it worked.

Hope this helps :)

Ver imagen matthewrapuano6