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.
En esta página del sitio puede ver el video en línea Lab 8 Function in de Duración hora minuto segunda en buena calidad , que subió el usuario LBSocial 31 diciembre 2020, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 404 veces y le gustó 2 a los espectadores. Disfruta viendo!