PYTHON

 # Comparison Operators

a = (14<=7)
b = (14>=7)
c = (14<7)
d = (14>7)
e = (14==7)
f = (14!=7)       #[!= not equal to]

print(a)
print(b)
print(c)
print(d)
print(e)
print(f)
TERMINAL.....

False True False True False True



 #Assignment Operators

a = 34
a -= 12
a *=12
a /=12
print (a)
TERMINAL..........

22.0



 #Arithmetic Operators


print ("The value of 3+4 is", 3+4)
print ("The value of 3-4 is", 3-4)
print ("The value of 3*4 is", 3*4)
print ("The value of 3/4 is", 3/4)
TERMINAL.......

The value of 3+4 is 7 The value of 3-4 is -1 The value of 3*4 is 12 The value of 3/4 is 0.75


 a = '''harry'''

b = 345
c = 45.32
d = True

#Printing the types of variables
print (type(a))
print (type(b))
print (type(c))
print (type(d))

TERMINAL.......

<class 'str'> <class 'int'> <class 'float'> <class 'bool'>




 import os

print(os.listdir())




TERMINAL.......

['.android', '.VirtualBox', '.vscode', '3D Objects', 'AppData', 'Application Data', 'Contacts', 'Cookies', 'Desktop', 'Documents', 'Downloads', 'Favorites', 'IntelGraphicsProfiles', 'Links', 'Local Settings', 'Music', 'My Documents', 'NetHood', 'NTUSER.DAT', 'ntuser.dat.LOG1', 'ntuser.dat.LOG2', 'NTUSER.DAT{53b39e88-18c4-11ea-a811-000d3aa4692b}.TM.blf', 'NTUSER.DAT{53b39e88-18c4-11ea-a811-000d3aa4692b}.TMContainer00000000000000000001.regtrans-ms', 'NTUSER.DAT{53b39e88-18c4-11ea-a811-000d3aa4692b}.TMContainer00000000000000000002.regtrans-ms', 'ntuser.ini', 'OneDrive', 'Pictures', 'PrintHood', 'Recent', 'Saved Games', 'Searches', 'SendTo', 'Start Menu', 'Templates', 'Videos', 'VirtualBox VMs']








# Author: Raj
# Location: Mars
# Date: 22/07/2022
'''shortcut - ctrl + /'''




 print("Hello world")







TERMINAL...........

Hello world




Comments

Popular posts from this blog

WINDOWS UPGRADE