|
print()
|
write word on python
|
print("Hello There")
|
|
input()
|
let people input their information in python
|
input("insert number")
|
|
len()
|
show the length of that word
|
len(word)
|
|
int()
|
Number into number integer
|
int(2.50)
|
|
float()
|
Change number into decimal
|
float(5)
|
|
str()
|
a list of number and letter
|
str(10)
|
|
#
|
It's comment
|
print("Hello There")#It prints Hello There
|
|
shoppinglist = ['bags', 'shoes', 'boots', 'shirts']
|
|
print (shoppinglist[2])
|
|
item_number = 0
|
|
"""
|
|
while item_number < len(shoppinglist):
|
|
print ("List item:",shoppinglist[item_number])
|
|
item_number = item_number + 1
|
|
"""
|
|
out = 0
|
|
for muids in shoppinglist:
|
|
out = out + 1
|
|
print(out)
|
|
Result =
|
|
boots
|
|
4
|
|
string +\-*\/ string
|
calculate string
|
|
number +\-*\/ number
|
calculate number
|
|
number +\-\/ string
|
CANT
|
|
string +\-\/ number
|
CANT
|
|
string * number
|
It will multiply amount of string ex: str(5) * 6 = 555555
|
|
number * string
|
It will multiply amount of string ex: 6 * str(5X = 555555
|
|
number ** number
|
Exponent
|
|
number ** string
|
CANT
|
|
==
|
equal
|
3 == 3
|
|
!=
|
not equal
|
4 != 3
|
|
<
|
less than
|
3 < 4
|
|
>
|
more than
|
4 > 3
|
|
<=
|
less than or equal
|
len(word) <= letternum
|
|
>=
|
more than or equal
|
len(word) >= letternum
|
|
%
|
find the remainder
|
5%4
|
|
Variable
|
a value and can ne change
|
|
String
|
a list of character such as number and letter
|
|
Integer Number
|
whole number
|
|
Floating Point
|
decimal number
|
|
Syntax
|
Grammar
|
|
Modulo
|
Find remainder
|
|
Boolean
|
True/False
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.