Solved: Python type conversion lab script not working in cloudxlab

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?

Hi Gopi,

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

1 Like

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)

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

1 Like