Solved: Python type conversion lab script not working in cloudxlab


#1
area_of_circle = 78.5
area_of_circle = str(area_of_circle)
area_of_circle_msg = "Area of the circle is - " + area_of_circle
print(area_of_circle_msg)

Area of the circle is - 78.5

Above is my script in cloudx lab Jupyter notebook

Lab instructions:
Use Jupyter notebook on the right-hand side. Press “Shift + Enter” to run code in individual cells.

Convert area_of_circle to string with str() method.

area_of_circle = str(area_of_circle)

Define a variable area_of_circle_msg and concatenate the two strings.

area_of_circle_msg = "Area of the circle is - " + area_of_circle
print(area_of_circle_msg)

I’m not able to mark the lab test complete. @sgiri can you please help me what is wrong with my script?


#2

Hi Gopi,

Your code is right. There was a bug in the assessment which we have fixed now.


#3

I’m still getting the message: Please check the steps

Script included again for your convenience:

area_of_circle = 78.5
area_of_circle = str(area_of_circle)
area_of_circle_msg = "Area of the circle is - " + area_of_circle
print(area_of_circle_msg)

#4

Solved:
Logged out and logged back into CloudXLab and it worked now. Thank you @sgiri