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

Perform the indicated operation and simplify your answer. 7/17+(-6/17)
-1/2 divided by 1 3/4 as a fraction in simplest form
does anyone know the answers to these blank questions? if so pls type it in! thank you!! ( pic question uploaded )
What causes summer to be awestruck? when she sees a 44. 52 ton blue dinosaur when she walks into the museum of natural history when she sees the hope diamond wh
When 5.0g of a nonelectrolyte is added to 25g of water, the new freezing point is -2.5 degrees C What is the molality of the solution? What is the molar mass of
1. What are "common courtesies"? List 5 common courtesies that you could do for your classmates and/or teachers (does not have to be related to eating).
How did F. W. de Klerk influence change in South Africa?
please help i need to solve for m and n
Scenario 1: Aiden comes in from work. Jane had cooked dinner and is waiting for him so they could eat. However, Aiden is tired and just wants to go to bed. Jane
W over 5 =3 what does w equal