Lab 8 Function in

Published: 31 December 2020
on channel: LBSocial
404
2

Objectives:
• To get familiar with the functions in Python
Data:
• None
Steps:
1. Log into the AWS console, and start your environment in Cloud9.
2. In the terminal, update your local repository by typing:
git pull
3. Create a new python script, name it lab8.py, and try to answer the following questions.
3.1. Define a function to count the number of words in a string.
3.2. Test your 3.1 function with the demo_str = 'hello world!'
3.3. Define a function to find out the minimal number in a list with a for loop.
3.4. Test your 3.3 function with the demo_list = [1,2,3,4,5,6]
3.5. Test your 3.3 function with the mix_list = [1,2,3,4,’a’,5,6]. If your function generates errors, redesign the function in 3.3
4. Upload the new python file to GitHub by typing the following command in the terminal:
git add --all
git commit -m "some notes here."
git push
5. Go to your GitHub repository and check the changes.


On this page of the site you can watch the video online Lab 8 Function in with a duration of hours minute second in good quality, which was uploaded by the user LBSocial 31 December 2020, share the link with friends and acquaintances, this video has already been watched 404 times on youtube and it was liked by 2 viewers. Enjoy your viewing!