Roshan Book

My Tech Notebook

Tag Archives: lesson1

Python tutorial 1 strings

This program has

a) input method

b) convert to int method

c) if else syntac

 

print(“Hello”);

g= input(“enter your guess”); # input is in string format
guess=int(g); # This converts input into integer

if guess==5:
    print(“You win”)
else :
    print(“You loose”)

%d bloggers like this: