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

Please Help ASAP I’m confused
Henry bought a basketball that was on sale for $12. It was 40% off. What was the original price of the basketball? Please Help.
what are two examples of confederate forms of government
2.00 L of a gas is collected at 25.0°C and 745.0 mmHg. What is the volume at 760.0 mmHg and 273K. someone help i only have 2 mins left
Why did the Delian League fail?
When setting a fitness goal, it's best to increase frequency and intensity in the first week to avoid burn out. Please select the best answer from the choices p
What is the solution to the system of equations 3x + 2y = -10 and y = -x - 4
helpppppp plisssssss ​
Sarah jumps rope to keep in shape. she jumps and average of 20 times in 15 sec. which of these describes her jump rate60 min per jump 80 jumps per min80 min per
if there are 44 countries in Europe, about what percent belong to the EU