Question: What does the following code do ? myNumber = 2 . 9 8 7 myString = str ( myNumber ) print ( myString

What does the following code do?
myNumber ="2.987"
myString = str(myNumber)
print(myString)
Group of answer choices
Assign the number 2.987 to the variable myNumber and print it as a string.
Convert the string "2.987" to a number and then print it.
Assign the string "2.987" to the variable myString and print it
Convert the number 2.987 to a string and then print it.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!