CME 106 Python Workbook#
This Jupyter Book contains a series of Python exercises aimed at introducing students to scientific computing in the context of CME 106: Introduction to Probability and Statistics for Engineers at Stanford University. The exercises are adapted by Enze Chen, Lecturer in Materials Science and Engineering, from the MATLAB Workbook created by Vadim Khayms, Senior Lecturer in Mechanical Engineering. We hope you will find these exercises useful for your studies!
Note for students
These pages only have Python, corresponding to the exercises in the original MATLAB Workbook. If you’re looking for the MATLAB exercises, see the document provided in class.
Other FAQs#
What do I install?#
Nothing! Unlike the MATLAB exercises, we’ll be doing everything in the cloud. If you like the sound of this, keep reading the Usage tips for instructions on how to complete and submit your work.
What if I want to use Python for a homework problem?#
If you choose to use Python on the homework, you can start with our homework template. This avoids the hassle of managing your local installation and uses the same Google Colab UI as all the examples.
Does it matter which language I learn?#
Not particularly, as the underlying computing principles and computational thinking are the same. Sure, certain tasks may be easier in one language than in the other as they were developed by different scientific communities, but we anticipate that learning one will serve as a solid foundation for learning all others in your future work.
However, if you strongly prefer to optimize your choice of programming language, we suggest you talk to your friends, major department, and professionals in your field to understand which programming language you’re more likely to encounter in the future.
What if I didn’t take previous CME courses with Python?#
That’s OK! We prepared a Python fundamentals notebook that scaffolds some introductory Python exercises, and you can also find the entire CME 100 Python workbook online. However, it’s likely that by the time you’re taking this course, you will have already seen many examples in your other work that can transfer to these Python-based calculations.