|
print ()
|
show information that you want on screen
|
|
input()
|
Gain information from user
|
|
str()
|
A list of number, letter and symbols
|
|
len()
|
The length of the string
|
|
float()
|
Change number to be decimal number
|
|
int()
|
Change number to be number integer
|
|
==
|
equal to
|
|
!=
|
no equal to
|
|
<
|
less than
|
|
>
|
more than
|
|
<=
|
less than or equal to
|
|
>=
|
more than or equal to
|
|
%
|
modulo,find the remainder
|
|
Variable
|
Hold a value and can be change
|
|
String
|
A list of character such as number, letter and symbols
|
|
Integer Number
|
whole number/counting number
|
|
Float Number
|
The number in decimal
|
|
Syntax
|
Grammar/Structure of language
|
|
Modulo
|
Find the remainder
|
|
Boolean
|
True/False
|
|
string+number
|
Combine together
|
|
string+number
|
Crash!
|
|
number+number
|
Addition (Math)
|
|
string*number
|
Combine that string
|
|
string*string
|
Crash!
|
|
number*number
|
Multiply (Math)
|
|
string**string
|
Crash!
|
|
number**number
|
Exponent (Math)
|
|
string**number
|
Crash!
|
while True:
word = input("Please enter a word")
index = 0
reverse = ' '
while int(index) < len(word):
reverse = word[index] + (reverse)
index = int(index) + 1
print ("Reverse: ", reverse)
user_number = input("What number do you want to count down? ")
number = int(user_number)
countdown_string = ' '
while number > 0:
countdown_number = countdown_string + str(number) + " "
number = number - 1
#print(number)
print (countdown_string)
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.