Intro to Python Flashcards

Author: Martin Ganchev Cards: 97

Our Python flashcards comprehensively introduce the most popular open-source, general-purpose programming language. Perfect for beginners, they’re an ideal resource to master fundamental concepts and sharpen your coding skills. Start with Python basics like high-level and machine languages, the source code’s structure, and programming and coding environments essentials. Enhance your grasp of essential Python syntax—including variables, commands, operands, and operators—case sensitivity intricacies, and common errors like syntax and value. Consolidate your knowledge of Python data types, including integers, strings, and floats, and explore fundamental operations like arithmetic, comparison, and logical operators. Learn about Python's data conversion functions int(), float(), str()), arithmetic operations (% for remainder, * for multiplication, ** for power), and the role of the double equality sign (==) in comparisons. Our study cards explore Python programming structure—emphasizing indentation, variable reassignment, comments, and line continuation. The deck clarifies control flow mechanisms, including conditional statements (if/elif/else), loops (for, while), infinite loops, and the range() function. The Python flashcards highlight functions, detailing their parameters, arguments, return statements, and distinguishing between ‘return’ and ‘print.’ They also introduce essential built-in functions like abs(), sum(), round(), pow(), max(), min(), and len(). The coding flashcards detail data structures like lists, tuples, and dictionaries, as well as operations and methods like .append(), .extend(), .sort(), and tuple unpacking. They also delve into iteration and data management using loops. Finally, our Python deck of cards introduces advanced concepts like object-oriented programming (OOP), covering classes, object instances, attributes, and using modules and packages. It also gives an overview of the Python Standard Library—including the math module—and emphasizes the importance of software documentation and the help() function. These Python flashcards are an excellent learning resource for beginners seeking to hone their understanding of core Python concepts and practical applications. A plethora of valuable knowledge awaits. Don't delay—begin studying now!

Our Python flashcards comprehensively introduce the most popular open-source, general-purpose programming language. Perfect for beginners, they’re an ideal resource to master fundamental concepts and sharpen your coding skills. Start with Python basics like high-level and machine languages, the source code’s structure, and programming and coding environments essentials. Enhance your grasp of essential Python syntax—including variables, commands, operands, and operators—case sensitivity intricacies, and common errors like syntax and value. Consolidate your knowledge of Python data types, including integers, strings, and floats, and explore fundamental operations like arithmetic, comparison, and logical operators. Learn about Python's data conversion functions int(), float(), str()), arithmetic operations (% for remainder, * for multiplication, ** for power), and the role of the double equality sign (==) in comparisons. Our study cards explore Python programming structure—emphasizing indentation, variable reassignment, comments, and line continuation. The deck clarifies control flow mechanisms, including conditional statements (if/elif/else), loops (for, while), infinite loops, and the range() function. The Python flashcards highlight functions, detailing their parameters, arguments, return statements, and distinguishing between ‘return’ and ‘print.’ They also introduce essential built-in functions like abs(), sum(), round(), pow(), max(), min(), and len(). The coding flashcards detail data structures like lists, tuples, and dictionaries, as well as operations and methods like .append(), .extend(), .sort(), and tuple unpacking. They also delve into iteration and data management using loops. Finally, our Python deck of cards introduces advanced concepts like object-oriented programming (OOP), covering classes, object instances, attributes, and using modules and packages. It also gives an overview of the Python Standard Library—including the math module—and emphasizes the importance of software documentation and the help() function. These Python flashcards are an excellent learning resource for beginners seeking to hone their understanding of core Python concepts and practical applications. A plethora of valuable knowledge awaits. Don't delay—begin studying now!

Explore the Flashcards:

1 of 97

Python

An open-source, high-level programming language known for its simplicity and readability. It supports multiple programming paradigms and is used widely in various fields like web development, data science, and artificial intelligence.

2 of 97

Open Source Software (OSS)

Software whose source code is made freely available for modification and distribution. It encourages collaborative development from multiple independent sources.

3 of 97

A general-purpose programming language

Refers to programming languages designed to be used for writing software in a wide variety of application domains, rather than being specialized to a specific field.

4 of 97

High-level programming language

A type of programming language that is more abstracted from the hardware and focuses on easy and intuitive reading and writing of the code. High-level languages are more user-friendly and closer to human language compared to low-level languages.

5 of 97

Machine Languages

A basic level programming language, consisting of binary code (0s and 1s) directly understood by a computer's CPU. They are highly hardware-specific and difficult for humans to read or write.

6 of 97

Source Code

The human-readable set of instructions written in a programming language that a programmer writes. It needs to be compiled or interpreted into machine code for a computer to execute.

7 of 97

Program

A set of instructions written in a programming language that performs a specific task when executed by a computer.

8 of 97

Programming

The process of designing, writing, testing, debugging, and maintaining the source code of computer programs.

9 of 97

Coding Environment

The set of tools and software used for writing and testing software. This includes text editors, integrated development environments (IDEs), compilers, and interpreters.

10 of 97

Variables

Named storage locations in computer memory used to hold data that can be modified during program execution. Each variable in Python has a specific type and a name.

11 of 97

Command

An instruction given by a user or a program to a computer to perform a specific task.

12 of 97

Command Execution

The process of performing an instruction or a set of instructions by the computer to solve a given programming designated task.

13 of 97

Operands

A value or a variable used for calculations. For example, in the expression 5 + 3, 5 and 3 are operands.

14 of 97

Operators

A symbol performing operations on operands.

15 of 97

Case Sensitivity

In programming, case-sensitivity refers to the ability of a programming language to distinguish between uppercase and lowercase letters. For example, in Python, variable names are case-sensitive, which means that we must pay attention to the use of lowercase and uppercase letters when writing code.

16 of 97

Statement

A unit of code that the Python interpreter can execute, like a command or an instruction. Examples include print statements, assignment statements, or a for loop.

17 of 97

Value Error

A Python error that occurs when a function receives an argument of the correct type but an inappropriate value.

18 of 97

Syntax Error

An error that occurs when the Python interpreter encounters code that does not conform to the syntax rules of the language. It prevents the program from running.

19 of 97

Data Type

Refers to the classification of data such as 'integers', 'strings', 'lists', 'tuples', and 'dictionaries'.

20 of 97

Integers

A Python data type that represents whole numbers, both positive and negative, without decimals.

21 of 97

String

A data type used for representing text. It is a sequence of characters enclosed in quotes, either single ('string') or double (""string"").

22 of 97

Floating-points (floats)

A data type used to represent real numbers, including decimal points.

23 of 97

type() function

A built-in function that returns the Python object type. It is used to find out the data type of a variable or a value.

24 of 97

int() function

A Python built-in function that converts a specified numeric or string value into an integer.

25 of 97

float() function

A Python built-in function that converts a specified numeric or string value into a floating-point number.

26 of 97

Boolean value

An object representing a True or a False value in a logical expression.

27 of 97

str() function

A built-in function that converts the specified value into a string.

28 of 97

Trailing Comma

A comma placed at the end of a list of items in an object such as a list, a tuple, a dictionary, or a function parameter list.

29 of 97

Arithmetic operators

Operators like addition (+), subtraction (-), multiplication (*), division (/), modulo (%), and exponentiation (**).

30 of 97

Remainder in Python (% operator)

An arithmetic operator that returns the remainder of the division of two numbers.

31 of 97

Multiplication in Python (* operator)

An arithmetic operator used for calculating the product of two numbers.

32 of 97

Power in Python (** operator)

An arithmetic operator used to raise a number to the power of another number.

33 of 97

Double equality sign (==)

A comparison operator used for checking if two values are equal. It returns True if the values are equal, otherwise False.

34 of 97

Reassigning values

Changing the value stored in a variable. For example, executing x = 5 followed by the execution of x = 10 changes the value assigned to x from 5 to 10.

35 of 97

Comments

Text strings used for documentation and explanation throughout the source code. They start with the # symbol and are not executable.

36 of 97

Line Continuation

A method in Python where a single statement is written in multiple lines for better readability. This can be achieved by using the backslash character (\) indicating the end of a line.

37 of 97

Indexing elements

Refers to accessing an element from a list, string, or other data structures, by using its position (index). In Python, indices start from 0.

38 of 97

Block of code

A group of statements that serve a specific scope.

39 of 97

Indentation

Indentation refers to the number of empty spaces used at the beginning of a code line. For instnce, In Python we often use indentation to define blocks of code.

40 of 97

Comparison operators

In Python, these include == (equal to), != (not equal to), > (greater than), < (less than), >= (greater than or equal to), and <= (less than or equal to).

41 of 97

Logical operators

Operators used to combine conditional statements. The Python logical operators are and, or, and not.

42 of 97

Order of logical operators in Python

This refers to the precedence of logical operators when evaluating an expression. In Python, not has the highest precedence, followed by and, then or.

43 of 97

Identity operators

Identity operators (is and is not) are used to determine whether two variables reference the same object.

44 of 97

Conditional statements

Statements executing different blocks of code based on certain conditions.

45 of 97

Control flow

This refers to the order in which individual statements, instructions, or function calls of a program are executed.

46 of 97

If/Elif/Else

In Python, if checks a condition, executing its code block if True. elif (else if) allows for additional checks when if is False, running its block when True. else executes its block when all if and elif conditions fail.

47 of 97

Function

A block of reusable code, used for performing a single action, that only runs when it is called. Functions can accept arguments and return data as a result.

48 of 97

Keyword

Words having a special meaning and purpose for Python's control flow and that cannot be used as an identifiers of an object. Examples include if, for, while, return, etc.

49 of 97

Parameters

In programming, parameters are the named variables in a function that act as a placeholder for values when the function is called.

50 of 97

Arguments

In programming, arguments are the values that are assigned to the parameters defined in the function when the function is called.

51 of 97

return

In Python, the return statement is used in a function to end the execution of a function and returns a value.

52 of 97

return vs. print in Python

return sends a value back to the caller and ends the function execution, whereas print outputs a value to the console. return does not display the output, but print does.

53 of 97

Multiple parameters in a function

Functions in Python can accept more than one parameter, allowing them to receive and operate on multiple pieces of data.

54 of 97

Built-in functions

Functions that are pre-defined in Python and are readily available to use. Examples include print(), len(), type().

55 of 97

Python abs() function

A built-in function that returns the absolute value of the provided argument.

56 of 97

Python sum() function

A built-in function that returns the sum of all the items in an iterable (like a list or tuple).

57 of 97

Python round() function

A built-in function used to round a number to a specified number of decimal places or to the nearest integer if no decimal place is specified.

58 of 97

Python pow() function

A built-in function that returns the value of a number raised to the power of another specified number.

59 of 97

Python max() function

A built-in function that returns the largest item from an iterable or the largest of two or more arguments.

60 of 97

Python min() function

A built-in function that returns the smallest item from an iterable or the smallest of two or more arguments.

61 of 97

Pyton len() function

A built-in function returning the length of an object, that is - the number of items that the object contains. It can be used on various object types such as strings, lists, tuples, and dictionaries.

62 of 97

List

A mutable, ordered sequence of items. Lists are versatile and can contain items of different objects as well, including other lists.

63 of 97

del

A Python keyword used to delete objects. It can be used to remove individual items from a list, slices from a list, or entire variables.

64 of 97

Method

A function that is associated with an object. In object-oriented programming, methods act on the object and its data.

65 of 97

Python .append() method

A method used to add a single item to the end of a list.

66 of 97

Python .extend() method

A method used to add multiple items (from another iterable like list, tuple, set) to the end of a list.

67 of 97

Slicing

A feature retrieving part of a sequence (like a string, list, tuple or other iterable objects). It is done by specifying a start index and an end index, separated by a colon.

68 of 97

Python .sort() method

A method that sorts the items of a list in a specific order (either ascending or descending). It modifies the list in place.

69 of 97

Tuples

An immutable, ordered sequence of items. Tuples are similar to lists but cannot be modified after they are created.

70 of 97

Immutable objects

An object whose state cannot be modified after its creation. This is a key feature of tuples in Python.

71 of 97

Packed values

In Python, packing refers to the organization of multiple arguments into a single iterable object. For example, executing packed = 1, 2, 3 immediately creates a tuple, called packed, containing the three integers.

72 of 97

Tuple assignment

A Python feature where a tuple of values is used to assign values to several variables simultaneously. For example, x, y = (1, 2) assigns 1 to x and 2 to y.

73 of 97

Comma-separated values

Data separated by commas, like in a CSV file or in tuple creation (1, 2, 3).

74 of 97

Python .split() method

A string method used to split a string into a list of substrings based on a specified delimiter.

75 of 97

Dictionary

A mutable, unordered collection of items. Each item is a key-value pair, allowing for fast retrieval of a data value by using keys as a reference.

76 of 97

A key-value pair (in a Python dictionary)

A set of two linked data items: a key, which is unique within a dictionary, and a value associated with that key.

77 of 97

Python .get() method

A method used for dictionaries that returns the value associated with a specified key. If the suggested key is not found, the method returns a specified default value or ""None"" if such value has not been provided.

78 of 97

Iteration

Looping through the elements of a data structure, like a list or a dictionary, and performing operations on each element.

79 of 97

For loop

A control flow statement in Python used for iteration over a sequence (like a list, tuple, or string) or other iterable objects.

80 of 97

Increment operation

An increase of a variable's value, typically by a fixed amount, called an increment. In Python, this is often done with the += operator.

81 of 97

While loop

A control flow statement in Python used for a repeated statement execution as long as a specified condition is true. It's often used when the number of iterations cannot be known beforehand.

82 of 97

Infinite loop

A never-ending Python loop. This occurs when the loop's condition is always true. Executing an infinite loop is often an error unless intentionally applied for a continuous process.

83 of 97

Python range() function

A built-in function generating a sequence of numbers. It is often used for looping a specific number of times in For loops.

84 of 97

How many iterations will this for loop make?

6

85 of 97

Is this loop infinite?

Yes.

86 of 97

Range object

An immutable sequence type, often used for looping a specific number of times in For loops.

87 of 97

Object-oriented programming (OOP)

A programming paradigm based on the concept of ""objects"", where ""objects"" are data structures containing data in the form of fields, and ""code"" is represented in the form of procedures. E.g. in Python, everything is an object.

88 of 97

Object Instance

In OOP, an instance of a Python object is a specific realization of the class defining the given object type.

89 of 97

Class

In OOP, a class is a blueprint for creating objects (a particular data structure), providing initial values for state (attributes) and defines the behavior (functions or methods) that the given objects can have.

90 of 97

Attributes

In OOP, attributes are data stored inside a class or instance that represent the state or quality of the class or instance. In Python, attributes are accessed using the dot . operator.

91 of 97

Module

A file containing Python definitions and statements serving a specific problem-solving purpose. A module can define functions, classes, and variables.

92 of 97

Package

A collection of modules related to a specific problem-solving area (such as statistics or machine learning) where the modules are organized into a hierarchy.

93 of 97

Python Standard Library

A collection of core Python modules, providing a wide range of functionalities like network communication and data manipulation.

94 of 97

Python math module

A module in the Python Standard Library that provides access to mathematical functions like trigonometric functions, logarithms, and others.

95 of 97

Python sqrt() function

A function in the math module that calculates and returns the square root of a given number.

96 of 97

Python help() function

A built-in function in Python used to display the documentation of modules, functions, classes, keywords, etc.

97 of 97

Software documentation

Written text or illustration that explaining how the given piece of software operates and how to use it.