Your programs will have 3 levels of documentation.
Use the template provided in this unit: Program Template for a Menu Driven Program Using Loops.
Give your program an appropriate name.
1. Ask the user for a number and print that many '*' characters in a vertical line.
For example:
5
*
*
*
*
*
2. Ask the user for a number and print that many '*' characters in a horizontal line. You are going to have to override the default function of print(). Here's how to avoid the newline character from printing: print('*', end='').
For example:
5
* * * * *
3. Your teacher needs help calculating the class average. Your application will ask how many students are in the class, and it will then accept that many number of grades, and calculate the class average.
4. Write a password checker. Your password checker will first ask for a password, then repetitively ask the user to guess at the password. When the user types the same password, acknowledge that the right password was provided. DO NOT USE AN IF STATEMENT.
5. Write a program that asks for a numeric range. For all the numbers in that range, calculate and display the square, square root and cube of the numbers. Here's how to use the square root funciton:
import math #import the math library. This must be at the top of your codethe_square_root = math.sqrt( someVar) #use the sqrt() to calculate a square root.6. Ask a user for a number and print a solid square of '*' characters. You need to think about a nested structure to solve this question.
For example:
5
*****
*****
*****
*****
*****
Note, because of HTML, that 5x5 square may look like a rectangle.
1. Draw this shape, using a nested loop structure with Turtle:
Summative Evaluation