Cheatography
https://cheatography.com
function
print() |
displays information on the screen |
input() |
receives information from the user |
int() |
converts a value to an integer |
code
print (name.upper()) |
print (name.lower()) |
print (name.capitalize()) |
print (name.title()) |
data type
false |
false boolean value |
false and true == False |
true |
true boolean value |
true or false == true |
non |
represents " nothing" or "no value" |
x= none |
|
|
Addition
string + string |
combine together |
string + number |
crash |
number + number |
math - addition |
symbol
= |
assigns the value on the right to variable on the left |
== |
test if 2 things have the same value |
""" |
quotes out everything beneath these triple quotes until it reaches another triple quotes. |
|
|
Vocabulary
variable |
holds a value and can be changed |
string |
a list of characters such as numbers, letters, symbols |
Integer |
is a number that can be written without a fractional component |
Print |
evaluates each expression in turn and writes the resulting object to standard output |
Floating point |
numbers you write a period after the number and a zero (if its a whole number). |
input |
receives information from the user |
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment