Programming for Engineers
Introduction to Python programming using AI tools (GitHub Copilot) and VS Code. Covers Python basics through data visualization and a final interactive project.
Q1
Python: string indexing, slicing, and uppercase on "Hello World"
Variables, Data Types, and Strings
🟢 Intro
Free with account
Q2
Python has two common ways to insert variables into strings: the %-format style and…
Variables, Data Types, and Strings
🟢 Intro
🔒 $2.99
Q3
Create a list my_list = [1, 2, 3] and a tuple my_tuple = (1, 2, 3).
Variables, Data Types, and Strings
🟡 Intermediate
🔒 $2.99
Q4
NumPy: array shapes, np.arange vs np.linspace
NumPy Arrays and Matrix Operations
🟢 Intro
Free with account
Q5
NumPy: indexing, element-wise ops, transpose, and b @ d
NumPy Arrays and Matrix Operations
🟡 Intermediate
🔒 $2.99
Q6
Python: function my_trig returning multiple values with docstring
Functions
🟢 Intro
🔒 $2.99
Q7
(a) Define a lambda function called square that takes one argument and returns its…
Functions
🟢 Intro
🔒 $2.99
Q8
In Python, functions are first-class objects — they can be passed as arguments to other…
Functions
🟡 Intermediate
Free with account
Q9
Write a Python for loop that computes the sum of every integer from 1 to n.
Loops and Control Flow
🟢 Intro
🔒 $2.99
Q10
(a) Given numbers = [2, 4, 5, 7, 8, 10, 13], use a for loop and an if statement to count…
Loops and Control Flow
🟡 Intermediate
🔒 $2.99
Q11
Python: debug a loop summing a list with print tracing
Error Handling and Debugging
🟢 Intro
🔒 $2.99
Q12
The code below should count numbers greater than 5 in [2, 4, 5, 7, 8, 10, 13] but has…
Error Handling and Debugging
🟡 Intermediate
🔒 $2.99
Q13
The function below should compute n! (n factorial) but always returns 0. This is a logic…
Error Handling and Debugging
🟡 Intermediate
🔒 $2.99
Q14
Python: try/except for TypeError and ValueError in comparisons
Error Handling and Debugging
🟡 Intermediate
🔒 $2.99
Q15
The function below checks if a string is a palindrome (same forward and backward,…
Testing with Doctest
🟡 Intermediate
🔒 $2.99