Lab 6: Introduction to Programming with Python
This week, we will be learning to program using Python, a high-level programming language.
This is the first of two programming labs.
By the end of this lab, you should:
- Have learned how to use Active Python to create new scripts, save and execute them.
- Have written programs using the print, for and while statements.
Lab Tasks:
- Open ActivePython by clicking on start, All Programs, ActivePython, and then the PythonWinIDE.
- Write a program to print your name 5 times.
- Write a program that asks the user for his/her first name and last name, and greets him/her
by name.
- Write a MADLIB program that asks the user for at least 10 words.
- Write a security program that asks a user for a password, and prints "Access Granted" if the
password is correct, and allows up to 2 retries if it is incorrect. If the user does not know the
password, the program should exit.
- Write a program to print the sum of the numbers 1 through 10.
- Write a program that solves the quadratic formula.
- Write a program to print the sum of the numbers 1 through n, where n is a value that the user
inputs.
- Write a program to print one verse of the 'bottles of beer' song, where the number of bottles
is specified by the user.