warming up your workspace

Python Foundations through Computational Chemistry

Never written code before? Start here. You will learn the absolute basics of Python, output, variables, types, decisions, loops, and functions, using moles, molar mass, reactions, concentration, and temperature as your playground. By the end you are ready for Project 1.

First words

  1. Display your first lab message
  2. Display whole numbers and decimal values
  3. Explain a displayed procedure with comments
  4. Display an element name as text
  5. Calculate and store a molar mass

Remembering things

  1. Store an amount in a variable
  2. Update a concentration by reassignment
  3. Store numbers and text with the right types
  4. Convert a text reading into a number
  5. Give a chemical record clear names and units

Making choices

  1. Compare a concentration with a practice limit
  2. Use if to display a temperature warning
  3. Use if and else to choose between two labels
  4. Use elif to classify a supplied pH
  5. Combine two conditions with and

Doing it again

  1. Repeat a countdown with while
  2. Generate temperature steps with for and range
  3. Accumulate the total amount added
  4. Stop a temperature sequence with break
  5. List sample and trial pairs with nested loops

Many values and reuse

  1. Store sample masses in a list
  2. Find the largest recorded sample mass
  3. Define and call a function
  4. Pass inputs to a function and return an amount
  5. Build a concentration summary

Explore the full field