PYTHON Flashcards
What are the functions of Python?
creating web applications, and workflows, connecting database systems, handling big data
pyhton uses____ to complete a command
New lines
Python relies on _____ to define scope - loops, functions and classes
Indentation
Does python have a command for declaring a variable?
No
What is the purpose of comments in Python?
- make code readable
- explaims code
- prevents execution or I think error when testing code
How to get data type of a variable?
type() function
______ is the method of specifying a type of variable
Casting
What are the different kinds of variables? Explain
String - A sequence of characters (letters, digits, symbols) enclosed in quotes
Float - Numbers that include a decimal point. They are used for representing real numbers
Integer - Whole numbers, without any decimal points. They can be positive, negative, or zero.
b = 14
B= “David”
# B will not overwrite b
What is this an example of?
Case-sesntivity
What are the rules for python variables?
- must start with a letter or underscore character and not a number
- can only contain alpha-numeric characters and underscores
” You can assign values to multiple variables in one line in python” - T/F
True
_____ function allows to output variables
what are strings in python?
array of bytes representing unicode characters
how can u output multiple variables?
Comma and + sign
what is the best way to output different kinds of variables using print function?
COMMA