Python Flashcards
What year was Python invented?
1991
Why Python?
-similar to English/Math
-support lots of frameworks/libraries
-easy to learn
What are 4 ways to use Python?
-Web development
-Artificial intelligence
-Machine learning
-Data analytics
What is a key advantage of Python?
Less code, speed to market
What does IDE stand for?
Integrated development environment
What 6 features does IDE Visual Code have?
-auto-completion
-debugging
-code syntax
-highlighting
-white space
-indentation helpers
What are 3 reasons for commenting on code?
-explain what code is intended to do
-let developers know code is depreciated
-add TO-DO comments for work to do at a later time
What are the 3 ways you can comment on code?
-single-line
-multi-line
-inline
What is an example of a single-line comment?
- # this is my comment
What is an example of multi-line comments?
- # this is my comment# and this too
What is an example of an online comment?
X = 5 # this is my comment
What is a variable?
-a value that can change, depending on conditions or on information passed to the program
Can variables be changed?
Yes
What is an important rule about naming variables?
Give meaningful names in context
What are two ways to name(write) variables?
-camelcase
-snakecase
What is camelcase?
myName
What is snakecase?
my_name
How do you delete a variable?
A = 10
del A
What is a data type?
An attribute associated with a piece of data that tells the computer how to interpret its value.
What are the 5 data types?
-numeric
-sequence
-dictionary
-boolean
-set
What are the 3 types of numeric data types?
-integer
-float
-complex
What is an integer?
-non fractional number.
10, -10