Python
Python
2 y = "Hello, World!"
print(x)
print(y)
Comments #print("Hello, World!")
Casting x = str(3)
4 y = int(3)
z = float(3)
print(x)
print(y)
print(z)
Get the Type x = 5.6677
5 y = "John"
z=5
print(type(x))
print(type(y))
print(type(z))
Many Values to Multiple x, y, z = "Orange", "Banana", "Cherry"
Variables
6
print(x)
print(y)
print(z)
One Value to Multiple x = y = z = "Orange"
Variables
7
print(x)
print(y)
print(z)
Output Variables x = "Python"
y = "is"
z = "awesome"
print(x, y, z)
x = "Python "
y = "is "
z = "awesome"
print(x + y + z)
Python Numbers
● int
● float
● complex
x=1
y = 2.8
z = 1j
print(type(x))
print(type(y))
print(type(z))
Int x=1
Int, or integer, is a whole
number, positive or
y = 35656222554887711
negative, without
decimals, of unlimited z = -3255522
length.
print(type(x))
print(type(y))
print(type(z))
Float x = 1.10
Float, or "floating point
number" is a number,
y = 1.0
positive or negative,
containing one or more z = -35.59
decimals.
print(type(x))
print(type(y))
print(type(z))
x = 35e3
y = 12E4
z = -87.7e100
print(type(x))
print(type(y))
print(type(z))
x = 5
y = 3
print(x + y)