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

Find the radius of a circle with an area of 615.75 square kilometers.
About 75% of human body hair is NOT found on the head.
ancient egypt what physical feature is to east and west of the nile river​
The form he builds is 35 1/2 in. long deep, and 6 in. high. How much cement is needed to fill the form?
To best understand any part of a writing assignment, it is crucial for the writer to
Find the angle indicated
if the voltage V in an electric circuit is held​ constant, the current I is inversely proportional to the resistance R. If the current is 60 amperes when the r
Why were the Crusades fought? a. to bring the eastern bishops back under the pope’s control b. to protect European territory from invading Muslims c. to unite t
1 Circle or write down the number in each list which is not a multiple of the first number listed. a 3, 6, 9, 12, 14, 18, 21 b 11, 22, 33, 45, 55, 66 C 21.43.63
Please help me ASAP