0
String conversion
How do calculate total_owls when given num_owls_A is ‘3’ and num_owls_B is ‘4’ the output should be 7
11 Respuestas
+ 2
What language? If it's python then:
num_owls_A = '3'
num_owls_B= '4'
print(int(num_owls_A)+int(num_owls_B))
+ 2
My first answer will work. To understand what is happening, check this out:
https://code.sololearn.com/ci4X0V5KR757/?ref=app
+ 1
You could just save the result in another variable if you need to use the value later if you want.
+ 1
total_owls=int(num_owls_A) + int(num_owls_B)
0
but we’re told that the output should print the value of the total number of owls which is the sum of num_owls_A and num_owls_B
0
it is in python
0
im supposed to caluclate the total number of owls with those strings not print them
0
alright
0
but theyre both strings😭😭😭😭
0
i get what you You mean but it’s just a challenge activity that we have to do for our python class so it’s just telling us to find the total number of always using the strings that I gave you saw the three in the form which are placed in the variables That I gave respectively
0
i got it thanks