autumnnicole36582
autumnnicole36582 autumnnicole36582
  • 03-03-2021
  • Computers and Technology
contestada

Do you think we could use mathematical operators on string values rather than integers or floats? Explain.

Respuesta :

60002135330 60002135330
  • 03-03-2021

Answer:

Yes and no. For example, you can do this:

print('hi' * 5)

Output:

hihihihihi

HOWEVER, you cannot do mathematical operations on strings. If I have a string "6" and try dividing it by 3, it's not going to work because... it's not an integer. While multiplying strings does work, you cannot actually do real math with strings unless you change them to int or float

Answer Link

Otras preguntas

Metaphors in journey to the center of the earth
what is pneumonoultramicroscopicsilicovolcanoconiosis​
A student designs an experiment to see if detergent affects the growth of seeds. He sets up 10 seed pots. Five of the seed pots will receive a small amount of d
Which of the following statements best explains the trend shown in the data? O State governments tend to be more responsive to social movemente ghan the federal
What is the equation of the line of best fit for the following data? Round the slope and y-intercept of the line to three decimal places. O A. y= -0.927x + 13.
Hey guys please Answer this question..!!​
if a+2b/3=2/c^9 what is 4/b
Describe why people settled in the Balkan Peninsula by the A.D. 400s and 500s.
Schrodinger equation is a ........... Equation
i need help with this ?