Skip to content

Student thread #6

Open
Open

Description

@Nasher47

Hello 👋

The Checklist below is designed to help you monitor your understanding of the core Python topics covered at level 4 (KD4014).

Your personal checklist is generated below. You can also interact with the course bot, called choochoo, using commands in this thread. To list all possible choochoo commands type choochoo list commands in comment box below.

Running Python | links |

    • Create a new Jupyter Notebook |
    • Save and download a Jupyter Notebook |
    • Create Markdown cells in a Jupyter Notebook |
    • Run Python code in a Jupyter Notebook |
    • Create in-line code comments using # |

Variables and Assignment | links |

    • Use variables to store values |
    • Use print to display values |
    • Use meaningful variable names |

Data Types and Type Conversion | links |

    • Explain the difference between integers and floats |
    • Explain the difference between numeric values and strings |
    • Convert between numbers and strings |

Built-in Functions, Help and Errors | links |

    • Round a number to a specified number of decimal places |
    • Use help() or ? (in Jupyter Notebooks) to access help documentation for a function |
    • Descrive the difference between syntax errors and runtime errors |

Lists | links |

    • Create a Python list |
    • Find the length of a list |
    • Fetch an item from a list using list indexing |
    • Fetch multiple item from a list using list slicing |
    • Replace an item in a list with a new value |

For Loops | links |

    • Identify the iterable, dummy variable and loop body in a For loop |
    • Use a For loop to repeat a basic programming task |
    • Use range to iterate over a sequence of numbers |

Conditionals | links |

    • Use if to control whether a block of code is executed |
    • Combine a for loop and an if loop to implement a basic programming task |
    • Use a combination of if, elif and else to implement a basic programming task |
    • Test if a combination of things are true using and or or. |

Writing Functions | links |

    • Define a simple function that returns a value |
    • Call a custom-made function |

Variable scope | links |

    • Explain the difference between local and global variables |

Libraries | links |

    • Import a library |
    • Import a library using an alias (nickname) |

Storing data in Numpy arrays | links |

    • Read in data from a text file |
    • Describe the difference between Numpy arrays and Python lists |
    • Write a Numpy array to a text file |
    • Create a one-dimensional Numpy array with zero-values |
    • Create a two-dimensional Numpy array with zero-values |
    • Create a one-dimensional Numpy array with pre-defined values |
    • Create a Numpy array with evenly spaced numbers over a given interval |
    • Create a Numpy array with evenly spaced numbers over a given interval in logspace |
    • Combine the enumerate function with a for loop to populate a Numpy array |

Retrieving data from Numpy arrays | links |

    • Use array indexing to select a single element from a 2D array |
    • Use array slicing to select a column of a 2D array |
    • Use array slicing to select a row of a 2D array |

Visualizing data with Matplotlib | links |

    • Generate a basic line plot |
    • Generate a basic scatter plot |
    • Label the plot with an x-axis label, y-axis label and title |
    • Create a plot legend |
    • Use a figure and subplots to group similar plots |
    • Save a plot as a .png file |

Analysing data using Numpy | links |

    • Use the least-squares method to fit a polynomial function to data |
    • Plot the polynomial fit alongside the raw data for comparison |
    • Use Numpy array operations to perform mathematical operations across an array |
    • Use Numpy functions e.g. mean, max, min or round across one or more array axes. |
    • Plot the uncertainty associated with a measurement using an errorbar |

Code Quality | links |

    • Use assertions to check for internal errors |
    • Write docstrings to provide help messages |
    • Print package version numbers to increase code reproducibility |
    • Re-factor code to reduce code repetition and remove redundant code |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions