Show TeX
Notices

Chapter01

For page specific messages
For page specific messages

Why Program?

All Chapter contains the python code which is used during teaching.

Simplest Python Program

print('Hello! This is my first program in python')

Input your name and print them

x=input('enter your name')
print(x)

Input Hours & Rate and print Pay accordingly  

x=input('enter hours')
y=input('enter rate')
z=int(x)*float(y)
print('pay',z)

Input tempearture in celsius and print it in fahrenheit  

x=input('enter the temperature in celsius :')
y=(int(x)*1.8)+32
print('the temperature in fahrenheit is :')
print(y)

Input tempearture in celsius and print it in fahrenheit  

x=input('enter the temperature in celsius :')
y=(int(x)*1.8)+32
print('the temperature in fahrenheit is :')
print(y)

If else example

x=input('Enter the hours')
y=input('Enter rate')
if(int(x)<40):
    z=int(x)*float(y)
else:
    z=1.5*(int(x)-40)*float(y)+40*float(y)
print('pay',z)

Exclude node summary : 

n