Midterm - ( ( (
Midterm - ( ( (
1
2
3
4
Python ‘Programming’ {
5
6
[Midterm Project]
7
< November 2024 >
8
print(“Ameenah Rajab”, “Saadet Koc”,
9
10
“Yisrael Thomas”, “Nana Yaw Yeboa
11
Afari”)
12
13 }
14
Programming Language
Python_Programming = int(Midterm_Project)
1
2
Introduction; {
3
4
‘The Purpose of The Contact Book and Basic
5 Functionality’
6
<p The purpose is to add contacts within a
7
list, then have the program be able to display
8 them within a list >
9
10
11
</p>
12
13
14 }
Programming Language
Python_Programming = int(Midterm_Project)
1
2
Walkthrough of ‘Midterm’ {
3 The code asks what would you like
4 Step 01 to do, the you would select one
5
6 1. Add Contact; This function asks to
Step 02 insert a 10 digit number and a name
7
8 2. View Contact; This would display
9 Step 03 the contacts added from the
10 previous function
11 3. Exit Program; This would fully exit
12 Step 04 the program, displaying “Exiting
13 Program”, then displays “goodbye!”
14 }
Programming Language
1
2
3
4
5
6
7 This text outlines how the string puts dashes in between
8 numbers. In case the user does not fill out the first input
correctly, it will tell them to fix it.
9
10
11
12
13
14
1
2
3
4
5
6
7
8 This was most definitely the hardest part of the code. This
9 formats the inputs into a contact list.
10
11
12
13
14
1
2
3
4
5
6
7
8 This formats the inputs and then returns the statements.
In the case the input is invalid, the program will read
9
“Invalid please input 10 numbers:” and have them retry.
10 Then at the end the code will reread the name of the
11 contact and the number correlating.
12
13
14
1
2
3
4
5
6
7 The code adds a random amount of lines to simulate a
8 loading screen for fun. A new line comes up once every
second. Once the amount of lines hit 0, the lines will stop
9 showing up.
10
11
12
13
14
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1
2
3
4 With the choose function defined, the code plays out all the
5 other functions within it. The user gets the options to put in
1,2 or 3, any other inputs will be considered invalid. The 3
6
inputs have their own pathways outlining the users experience
7 respectively.
8
9
10
11
12
13
14
Python_Programming = int(Midterm_Project)
1
2
Examples About ‘The Topic’{
3 Variables
4 < The variables used within
Lists
this was used to assign
5 something to a name, such as < Lists were used to show
6 count= y > the contacts within this
7 Data Types assignment >
< The Data types used were
8 used to show a value attached Functions
9 to a variable, such as int or < These are pieces of information
str > that only runs when called by
10 Loops using def, these are used
< Loops were used within this throughout the assignment >
11
assignment, such as; if
12 loops, while loops, and for
13 loops >
14 }
Programming Language
forbeginners.html workshop.css
1
2
Problems We Ran Into {
3 < The largest problem we had was with the contacts
4 list >
5
6
We had trouble when making the contacts
7 list as a whole, and also trying to make
8 the contact list run with the code. We
9 < /1 > were able to fix this by using the
10 conview() rather than using a print and
11 the code started to work fine.
12
13
14 }
Programming Language