Need help with google colab

I have been trying to workout prigrams in google colab but it is not working poroperly. It always show wrong output eventhogh the codes are correct. Please help to sort this out.

post your code screenshot with error/wrong output

1 Like

weight = input("enter your weight in kgs")
height_unit =input('enter your prefered unit of height "f" for feet and "m" for meter')
if height_unit == "f":
print("f block is working")
else:
print("m block is working")

this is the code i used and when i give f ass input it shows m block is working

weight = input(“enter your weight in kgs”)
height_unit =input(‘enter your prefered unit of height “f” for feet and “m” for meter’)
if height_unit == “f”:
print(“f block is working”)
else:
print(“m block is working”)

Code is working fine no errors in code, just make sure alignment is fine after if height condition print cannot be exactly below it as it will fail the indentation

It works sometimes but sometime even when i run the same code it is not working. Will network problem affect my output?

Technically no issues with your code it might be network problem :sweat_smile:

You can use spyder scripting IDE on local which can eliminate network problems, Hope that helps :slight_smile:

1 Like

Okay.
Thank youuuu​:blush::innocent:

1 Like

There might be a problem of capslock also so check this also before running your code.