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

Need some help with this one
If the mean weight of 4 backfield members on the football team is 323 lb and the mean weight of the 7 other players is 190 lb, what is the mean weight of the 11
In The Book Thief, what is Markus Zusak's message about the theme of outsiders vs. insiders?
differences between planters, free african americans, and yeomen
Give any 3 reasons why people who wish to lose body weight are encouraged to eat a high-carbohydrate diet as opposed to a low-carbohydrate diet.
Multiply. 3√⋅22√⋅58√⋅18−−√
In glycolysis, as in all the stages of cellular respiration, the transfer of electrons from electron donors to electron acceptors plays a critical role in the o
What is 150 mm expressed in decimeters
You are going on a road trip! You drive to your best friend's house and then get on the highway. After 2.5 hours, you had traveled a total of 135 miles. You c
State the theorem or postulate that justifies why D is parallel to E.