Print String
print("Hello World")
Hello Worldprint("Information and Network Engineering")
Information and Network Engineeringprint("Hello Anirach you will be success")
Hello Anirach you will be successprint("I'm hungry")
I'm hungryprint('He ask me "Who got the book?"')
He ask me "Who got the book?"print("I'm good and \"I will do my best\"")
I'm good and "I will do my best"print('/\\')
/\print('\ta\na\ta\ta\n\ta')
a
a a a
a aprint('''\ta a\ta\ta \ta'''
a a a
a
Print Numeric
print('100.00')
100.00print('%d' %100)
100print('%d' %100.58)
100print('%f' %-100.89)
-100.890000print('%.2f' %100.89)
100.89from math import pi
print('%.2f' %pi)
3.14from math import pi
print('%.4f' %pi)
3.1416from math import pi
print('%.50f' %pi)
3.14159265358979311599796346854418516159057617187500
Print String + String
print('My age is', 25,'I have', 3500.50,'Bth.')
My age is 25 I have 3500.5 Bth.print('My age is %d I have %.2f Bth.' %(25,3500.50))
My age is 25 I have 3500.50 Bth.print('My age is' + str(25)+' I have '+ str(3500.50)+' Bth.')
My age is 25 I have 3500.5 Bth.print('5+4 =',5+4)
5+4 = 9print('5+4 = %.2f' %(5+4))
5+4 = 9.00print('5+4 = ' + str(5+4))
5+4 = 9
Print String + String
print("I'm Anirach","I'll keep practicing!")
I'm Anirach I'll keep practicing!print("I'm Anirach" + "I'll keep practicing!"
I'm Anirach I'll keep practicing!
Print Numeric + Numeric
print(1, 1, 2, 3, 5, 8, 13, 21, 34, 55)
1 1 2 3 5 8 13 21 34 55print('%d %d %d %d %d %d %d %d %d %d' %(1, 1, 2, 3, 5, 8, 13, 21, 34, 55))
1 1 2 3 5 8 13 21 34 55