0% found this document useful (0 votes)
4 views2 pages

Python Basic3

Uploaded by

youngsterrrrr0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Python Basic3

Uploaded by

youngsterrrrr0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

b = "Hello, World!

"
print(b[2:5])

_____________________________________________________

a = "Hello, World!"
print(len(a))

_____________________________________________________

a = "Hello, World!"
print(a.upper())

_____________________________________________________

a = "Hello, World!"
print(a.lower())

_____________________________________________________

a = "Hello"
b = "World"
c=a+b
print(c)

_____________________________________________________

print(10 > 9)

print(10 == 9)

print(10 < 9)

_____________________________________________________

a = 200
b = 33

if b > a:
print("b is greater than a")
else:
print("b is not greater than a")

_____________________________________________________

print((6 + 3) - (6 + 3))

_____________________________________________________
thislist = ["apple", "banana", "cherry"]
print(thislist)

_____________________________________________________

 Equals: a == b

 Not Equals: a != b

 Less than: a < b

 Less than or equal to: a <= b

 Greater than: a > b

 Greater than or equal to: a >= b

 _____________________________________________________

a = 33
b = 200
if b > a:
print("b is greater than a")

 _____________________________________________________

a = 33
b = 33
if b > a:
print("b is greater than a")
elif a == b:
print("a and b are equal")

 _____________________________________________________

You might also like