Here are a few challenges that you should be able to complete based on the knowledge you have currently.
Write a function that takes a text string (i.e.
text_var = "Hello World") prints it back out with a border above and below it.
- You need to count the number of characters in a string, use the
- Use the equal sign (
=) for the border
- The function should create the same number of
=characters as the number of characters in the string
Here are a few examples:
Write a set of Python statements that can find the length of each side of this right triangle.
Given the following:
- Angle C is 90 degrees
- Angle B is 54 degrees
- Side a has a length of 4 inches
- Use the Math library
- Use basic Trigonometry (if you need help, ask)
- You will probably need to convert degrees to radians (there’s a function for that)
Create and print Pascal’s triangle by showing 10 levels. Have each level’s list in one big list (i.e.
pascals_triangle = [, [1, 1], [1, 2, 1], [etc.]]). You cannot just write
[1,3,3,1] in your code, you must find it through an algorithm.
You can append a list after you have created it. For example,