EOS; include("../../header.php"); ?>
ch10_pr03.py
.python3 ch10_pr03.py
on MAC and
py -3 ch10_pr03.py
on Windows)
user provides input (red):
Enter integers between 1 and 100: 2 5 6 5 4 3 23 43 2
2 occurs 2 times
3 occurs 1 time
4 occurs 1 time
5 occurs 2 times
6 occurs 1 time
23 occurs 1 time
43 occurs 1 time
statistics.py
), write the following
functions for the equations:
# Compute the standard deviation of values
def deviation(x):
# Compute the mean of a list of values
def mean(x):
statistics.py
and ch10_pr09.py
.python3 ch10_pr09.py
on MAC and
py -3 ch10_pr09.py
on Windows)
user provides input (red):
Enter numbers: 1.9 2.5 3.7 2 1 6 3 4 5 2
The mean is 3.11
The standard deviation is 1.55738
def merge(list1, list2)
len(list1) + len(list2)
comparisons. Write a main method to test your function that prompts the user
for two sorted lists and displays the merged list.
ch10_pr26.py
.python3 ch10_pr26.py
on MAC and
py -3 ch10_pr26.py
on Windows)
user provides input (red):
Enter list1: 1 5 16 61 111
Enter list2: 2 4 5 6
The merged list is 1 2 4 5 5 6 16 61 111
ch13_pr02.py
.python3 ch13_pr02.py
on MAC and
py -3 ch13_pr02.py
on Windows)
user provides input (red),
input file can be
downloaded/seen here:
Enter a filename: diablo_story.txt
1528 characters
318 words
32 lines
cryptography.py
) with two functions
(def encrypt(inFilename, outFilename)
and def
decrypt(inFilename, outFilename)
) that can facilitate encrypting
and decrypting files. The encryption scheme will add 5
to every
byte, and the decryptions scheme reverses this process.
cryptography.py
and ch13_pr08_09.py
.python3 ch13_pr08_09.py
on MAC and
py -3 ch13_pr08_09.py
on Windows)
user provides input (red),
input file can be
downloaded/seen here:
Enter the original filename: quick_brown_fox.txt
Enter the encrypted filename: encrypted.txt
Enter the decrypted filename: decrypted.txt
Done
output file contents can be seen
here (encryption) and
here (decryption)