Functions

In this lab students are encouraged to work collaboratively to create various functions. This activity requires students to create functions that performs various calculations on entered values. The first function calculates molecular weight of hydrogen, carbon, and oxygen; the second calculates body-mass index (bmi); and the third the Collatz conjecture. This lab is ideal for students looking for more practice creating functions.

Caesar Cipher-Strings, Conditionals, Loops

In this lab students collaborate on the creation of a Caesar cipher in Python. This lab covers the concept of a rotation (Caesar) cipher, including encoding and decoding strings of text. This lab is ideal for students looking to practice working with strings, functions, conditionals, and loops in the context of encryption/decryption.

Strings

In this lab students collaborate using Pair Programming to explore strings in Python. Using iteration, students create a program that loops through strings and produces one of a couple different outputs. Students are required to work together on this lab and the instructor recommends periodic performance checks to ensure that adequate progress is being made by both students. This lab is ideal for students looking to get additional practice working with strings and collaborating on program development and analysis through Pair Programming.

Stars and Triangles

In this lab (Lab 5) students collaborate using Pair Programming to explore looping and conditionals in Python. Using loops (e.g. 'while) and conditionals ('if/else'), students complete a series of activities that involve creating ASCII art and formatted output.

Exploring Repetition

In this lab students collaborate using Pair Programming to explore looping (iteration) in Python. Using various loop structures, such as 'while' and 'for', students must complete a series of tasks that illustrate the use of iteration. Frequent use of guiding questions helps students to both explore these ideas together and to discuss how the looping structures can best be used to complete the task. These activities are ideal for students interested in gaining experience with implementing and evaluating loops, as well as those who are looking for an example of how to implement Pair Programming in a CS1 lab section.

Engagement Excellence

Conditionals and Selection Statements

In this lab students explore conditionals in Python. Using boolean expressions and conditional logic, students are required to predict the outcome of multiple expressions and then use the Python interpreter to obtain the actual outcome for each statement. Through a series of activities students gradually build programs that demonstrate an understanding of how to use these fundamental constructs in CS. These series of activities are ideal for students looking for more experience with boolean operators and in creating small programs using conditional logic.

IDLE and Basics of Python Programming

In this lab students explore the basics of Python. Using the Python Interpreter in IDLE, students create a series of programs that cover performing mathematical calculations and concatenation with strings. After building a program to calculate information about a particular sphere, students get to create their own project based on the premise of planning a trip to Europe. This activity is ideal for students who are both new to programming and new to Python.

Subscribe to Master's Colleges and Universities I