Lab 8 Function in

Veröffentlicht am: 31 Dezember 2020
auf dem Kanal: 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.


Auf dieser Seite können Sie das Online-Video Lab 8 Function in mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer LBSocial 31 Dezember 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 404 Mal angesehen und es wurde von 2 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!