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

Which detail would best support the theme “traveling can be dangerous”? “Moon of Falling Leaves” “traveled to the north to set up a hunting camp” “much farther
How long will it be (hours) until a silo filled with 50 tons of grain is half empty if the silo is emptying at the rate of 4% per hour
Explain how a lion social group interacts with other social groups in its community (habitat).​
help 6th grade mathhhhhhhhhhhhhhh
How did population growth contribute to the decline of the Qing dynasty?
A chemical reaction that gives off heat as it proceeds is said to be:.
Describe how to transform the quantity of the fifth root of x to the seventh power, to the third power into an expression with a rational exponent. [tex](5\sqrt
Rosh Hashanah celebrates the Jewish new year each wall true or false
How many moles of silver atoms are there in 1. 8 x 1020 atoms of silver?.
Write the rule for the function represented by this table.​