# Session1 Notes

Description
Description:
Categories
Published

View again

All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Share
Transcript
# print function used to print on python conosleprint( good morning disha );a=100; # integerf=12.90 # floatname= disha # stringalpha='A' # character#multiple line comments'''sdjhgfskjdhgksdhgkjjflskjglsdjglkljgsdlfkjgdfkljgkdlfj'''print(a)print(f)print(name)print(alpha)# write a program to find area of circle# pi*(r*r)pi=3.14;r=float(input( Enter radious=> ))circle=pi*(r**2)print(circle)# comparision operatorsa=100b=200c=a<=b # true or false print(c)'''< less than true<= less or equal true> greater than true>= grater or equal true== just equal!= not equal=== equal & checks datatypes as wellsal=12000C= sal>=10000 or sal <=25000 con1 con2 result And true true true And true false false And false true false And false false false con1 con2 result OR true true true   or true false true or false true true or false false false And & or operator always need atleast 2 conditions but for not only 1 condition is required a=true b=!a #false a=!(100<500) #false # write a program to check user entered number is odd or evennum=int(input( Enter number => ))if num%2 == 0: #condition #condition true print( even number )else: #condition false print( odd number )#main block statementprint( out side if .... )# addition of two integer variable a=100b=200add=a+b;print(a);print(b);print(add);# addition of two integer variable a=100b=200add=a+b;print(a);print(b);print(add);#Modulo Examplea=115mod=a%10print(mod)  #write a program to print 1 to 10 numberscount =1 #initwhile count<=10: print(count) count=count+1# write a program to print odd numbercount =1 #initwhile count<=10: if count%2!=0: print(count) count=count+1 else: count=count+1#School report programm= 65p= 56b= 78c= 73e= 62percentage=((m+p+b+c+e)/500*100)print (percentage)if (percentage <35): print( fail )elif (percentage >=35 and percentage <50): print ( third class )elif (percentage >=50 and percentage<60): print ( second class )elif(percentage >=60 and percentage <70): print ( first class )else: print ( distiction )# Simple Interest= amout*year*rate/100amount=float(input( Enter amount => ))r=float(input( Enter Rate => ))y=float(input( Enter Year => ))si=amount*r*y/100print(si);''' arithmetic +,-,/,*,//,** constional operator <,>,<=,>=,==,!=,===   a=10 b= 10  c=a==b #true c=a===b # false # String is collection of charactersname= Disha print(name[0])mul=name*3print(mul)fullname=name + Pawar print(fullname)statement = i love india ,its my india ;c=statement.count('India',0,13);print(c)print(statement.find('india'));

Oct 7, 2019

#### Networking management

Oct 7, 2019
Search
Similar documents

View more...
Tags

## Abstract Algebra

Related Search
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks
SAVE OUR EARTH

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...

Sign Now!

We are very appreciated for your Prompt Action!

x