Use this repository (repo, for short) to complete your practice for Lesson 1.
- Edpuzzle practice
- Use this for practice during the Edpuzzle video. You can use the main window or the Python Console (see button at the bottom of the PyCharm window)
- Parsons Puzzle #1: basic functions 1
- no parameters
- Parsons Puzzle #2: basic functions 2
- two parameters
Use these exercises to notice the parts of the function and how it works.
- Fix the Code #1 🪁
- Fix the code so it determines the number of characters in the user's name. (Remember that spaces count as characters.)
- Parameter and argument should have different names
- GitHub will test your solution when you submit. See instructions at the end of this page.
- Write Code #1 🚁
- Write a function that accepts three numbers as arguments and returns the average.
- You do not need to use
if __name__ == '__main__
condition in your program, but you may if you wish.
- Fix the Code #2 🪁
- This function should take two numbers and calculate the first number raised to the power of the second. Then return the result.
- Example:
- input numbers: 2, 3
- expected output: 8
- GitHub will run a test on this when you submit it.
- Example:
- This function should take two numbers and calculate the first number raised to the power of the second. Then return the result.
- Write Code #2 🚁
- Write a function called
concat
that accepts two words from the user concatenates them and then returns the length of the new string. Return the length of the new string.- GitHub will run a test on this when you submit it.
- Write a function called
- When you have completed each task, commit and push to GitHub.
- Go to the repo on GitHub and click on the Pull Requests tab. Look for feedback about code function and style. If any issues are found, fix them and check your changes in to GitHub. repeat until no errors are found.
- When done, submit "Done" on Canvas.
Attribution:
Thank you to Bianca Ruiz @RuiztheRuler for providing a great starting place for automating feedback!