Cheatography
https://cheatography.com
Multiplication and Exponentsstring * number | combine that string multiple times | string * string | crash | number * number | math - multiply | number ** number | math - exponents string ** number crash | string ** number | crash |
codeprint (name.upper()) | print (name.lower()) | print (name.capitalize()) | print (name.title()) |
Functionprint() | displays information on the screen | input() | receives information from the user | int() | converts a value to an integer |
| | Vocabularyvariable | holds a value and can be changed | string | a list of characters such as numbers, letters, symbols | floating point | number include decimal number | integer | number that not include decimal number | Syntax | Grammar or the structure of language | Modulo | Find a remainder |
Functionprint() | Show information that you want on the screen | int() | Change number to be number integer | float() | Change number to be decimal number | input() | Gain information from user | str() | A list of number,letter and symbols | len() | The length of the string | # | Comment, no effect | import random + random.choice() | pick random item in the list |
| | symbol+ | add | - | minus | * | multiply | / | divide | = | equal | =! | not equal | > | more than | < | less than | => | more than or equal to | =< | less than or equal to | " " | quotation mark | ** | power to | % | Modulo, Find the remainder |
Additionstring + string | combine together | number + number | math | String + number | crash |
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment