(REV) Lab Assignment Instructions
Last Changed: 8/10/2024 10:10 PM
Read and follow the directions below carefully and perform the steps in the order listed. You will solve a program within
Visual Code (VSCode) as instructed and make sure to push the changes to the remote repository into GitHub. You will then
turn in two files (your python program/script file and a screenshot of your GitHub repository) via uploaded files within Eagle
Online/Canvas. Make sure and check your work prior to uploading the files.
Note: Refer to (SET) Visual Studio Code (VSCode) Setup and (SET) Use Git and GitHub In VSCode links within
Module 2 on how to use VSCode and GitHub.
Instructions
1. Create a python file in VSCode:
a. Open VSCode and create a new Python file and name it [Link] (where Last is your actual last name
and First is your first name. For example: If your name is Nancy Drew you will name the python file
[Link])
2. Develop a python program:
a. You will develop a modular Vowel Counter Program as described below:
Write a program that accepts from the user a text string. The program should generate a report (as shown in
step 4 screenshots) of each of the vowels’ count and the total count of vowels in the text string entered (do
not use any of the readily available standard functions like min, max, sum, sort, etc. instead, you should
apply programming concepts learnt including functions, dictionaries, lists, loops, and selection structures!).
b. The first thing you should enter in your python program script file is a top comment block which includes the
following:
'''
#Name: Enter your full name here
#Date: Enter today’s date here
#Module: 03REV – Review Python Fundamentals
#Description: Enter a paragraph description of the program (at least 5 sentences in
your own words. Do not copy from the Lab instructions above)
'''
c. Below the top comment/documentation block, type the actual Python code for the problem described above
(Refer to the below descriptions of the suggested functions to include and Source Code screenshot in step 3
with example statements and HINTS):
i. main()
This should be the first and foremost function called and defined. This function should prompt the user
to input a text string. Then, call the functions below.
ii. findVowelCount()
This should be multiple value returning function that accepts an input text string as one argument. This
function should find the count of each vowels in the text string and store into a dictionary (of
vowels:count as key:value pair) and further find the total vowel count using repetition and selection
structures. The function should then return the dictionary and the total vowel count back to the main
function.
iii. generateReport()
This should be a void function called by main function that accepts two arguments: dictionary (of
vowels:count key-value pair) and total (of all vowel count) and display a report as shown in the output
Page 1 of 3
screenshot in step 4.
d. Make sure to include the following in your code:
At least 2 functions (as suggested above) apart from main.
Use CONSTANTS appropriately (Refer to the below sample code screenshot)
Use descriptive and appropriate variable and function names (Refer to the below sample code
screenshot).
Keep proper documentation for understandability of your program by adding block comments with
paragraph description prior to each function explaining the function logic.
Use proper indentation and blank/line spaces in your program for readability of your code/program.
3. Sample program screenshot below with HINTS to complete your program:
4. Save and run the python file:
a. After completing your program as instructed, make sure to Save it in the DSScripts folder created as part of
Module (02SET) Lab Assignment.
b. Run your program to obtain the output/results as shown in the screenshots below:
Page 2 of 3
I. II.
5. Commit the file locally:
a. Click Source Control on the Navigation Pane
b. Type “First Commit” to Commit Message Box (In red border)
c. Click on the Commit box below (in green border) to add the file for tracking
d. Click Sync Changes to push your changes to the remote repository
6. Display remote repository and take a screenshot:
a. Open the DSScripts repository on your GitHub and take a screenshot of it (make sure your assignment is
shown in the screenshot).
b. Name your screenshot file as [Link] (or .jpg files are recommended).
(Where Last is your actual last name and First is your first name. For example: If your name is Nancy Drew
you will name the python file [Link] or .jpg)
7. You may now proceed to Lab Assignment INSTRUCTIONS and UPLOAD link within this module and follow the
steps in the link and submit the following two files:
a. [Link] and
b. [Link] (or .jpg)
Page 3 of 3