1. Write a Python program named LastnameFirstname12.py, using your last name and your first name, that does the following:
Nikki's phone number is: 455-0123
Edward's phone number is: 455-0987
Blanca's phone number is: 455-3456
input data
save data
retrieve data
end the program
2. Be sure to add comments for each section of your code.
3. Your output must be descriptive. Make sure it's clear to the user what your program is doing.
>>>
Welcome to my phonebook program!
Press 1 to input phonebook data
Press 2 to save your data to a .txt file
Press 3 to retrieve data you've previously saved
Press 0 to exit
Enter a command: 1
Please enter a name: Nikki
Please enter a phone number: 455-0123
Enter a command: 1
Please enter a name: Edward
Please enter a phone number: 455-0987
Enter a command: 1
Please enter a name: Blanca
Please enter a phone number: 455-3456
Enter a command: 100
Invalid command. Please try again!
Enter a command: 2
Enter the filename to save your information in (for example: phonenumbers.txt)
my_phonebook.txt
All phone numbers have been saved to the file: my_phonebook.txt
Enter a command: 3
Enter the filename where your data is saved: my_phonebook.txt
Reading contents of file.....
Nikki's phone number is: 455-0123
Edward's phone number is: 455-0987
Blanca's phone number is: 455-3456
Enter a command: 1
Please enter a name: William
Please enter a phone number: 455-0000
Enter a command: 1
Please enter a name: Pete
Please enter a phone number: 455-9999
Enter a command: 2
Enter the filename to save your information in (for example: phonenumbers.txt)
my_phonebook.txt
All phone numbers have been saved to the file: my_phonebook.txt
Enter a command: 3
Enter the filename where your data is saved: my_phonebook.txt
Reading contents of file.....
Nikki's phone number is: 455-0123
Edward's phone number is: 455-0987
Blanca's phone number is: 455-3456
William's phone number is: 455-0000
Pete's phone number is: 455-9999
Enter a command: 0
Now exiting.....
>>>
0. Create a Python script named LastnameFirstname01A.py
1. This script will compute the circumference of a circle given a radius.
2. Output a message stating to the user that this script calculates circumference.
3. Ask the user to enter in the radius.
4. Calculate the circumference.
5. Output the result of the calculation.
6. All output is properly labeled.
7. It is okay when your program crashes if the user enters letters or symbols instead of a number, it should NOT crash if the user enters a decimal number or an integer.
8. Ensure that your code is sufficiently styled and documented.
> python MeyerEdward01A.py
Calculate the circumference of a circle given a radius.
Enter a radius: 3
~~~~~~~~~~~~~~~~~~~~
Circumference: 18.84955592153876
> python MeyerEdward01A.py
Calculate the circumference of a circle given a radius.
Enter a radius: 12.5
~~~~~~~~~~~~~~~~~~~~
Circumference: 78.53981633974483
> python MeyerEdward01A.py
Calculate the circumference of a circle given a radius.
Enter a radius: -0.0
~~~~~~~~~~~~~~~~~~~~
Circumference: 0
> python MeyerEdward01A.py
Calculate the circumference of a circle given a radius.
Enter a radius: -8
~~~~~~~~~~~~~~~~~~~~
Circumference: 0
0. Create a Python script named LastnameFirstname01B.py.
1. Note: This script has no user input.
2. Create a loop to print the numbers from 1 to 100, each number on its own line.
3. Modify the loop so that numbers with certain characteristics print a word instead:
> python MeyerEdward01B.py
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
17
Fizz
19
Buzz
Fizz
22
23
Fizz
Buzz
26
Fizz
28
29
FizzBuzz
31
32
Fizz
34
Buzz
Fizz
37
38
Fizz
Buzz
41
Fizz
43
44
FizzBuzz
46
47
Fizz
49
Buzz
Fizz
52
53
Fizz
Buzz
56
Fizz
58
59
FizzBuzz
61
62
Fizz
64
Buzz
Fizz
67
68
Fizz
Buzz
71
Fizz
73
74
FizzBuzz
76
77
Fizz
79
Buzz
Fizz
82
83
Fizz
Buzz
86
Fizz
88
89
FizzBuzz
91
92
Fizz
94
Buzz
Fizz
97
98
Fizz
Buzz