Skip to content

Instantly share code, notes, and snippets.

@bmontana
bmontana / convert_5.py
Created September 6, 2017 14:18
This program prints a table of Celsius temperatures and their Fahrenheit equivalents from 0°C to 100°C.
# convert_5.py
#
# Author: Bill Montana
# Course: Coding for OOP
# Section: A3
# Date: 30 Aug 2017
# IDE: PyCharm Community Edition
#
# Assignment Info
# Exercise: 5
@bmontana
bmontana / futval_graph.py
Created October 2, 2017 16:06
Future Value graph program from 4.6.
# futval_graph.py
from graphics import *
def main():
# Introduction
print("This program plots the growth of a 10-year investment.")
# Get principal and interest rate
principal = float(input("Enter the initial principal: "))
@bmontana
bmontana / U05_Ex08_CaesarCipher.py
Created October 11, 2017 19:28
Encode and decode Caesar ciphers
# U05_Ex08_CaesarCipher.py
#
# Author: Bill Montana
# Course: Coding for OOP
# Section: A3
# Date: 11 Oct 2017
# IDE: PyCharm Community Edition
#
# Assignment Info
# Exercise: 8
@bmontana
bmontana / U05_Ex06_Numerology.py
Last active October 11, 2017 19:29
Determine the "numeric value" of a string of text by assigning each letter a value from 1 to 26 and adding them up.
# U05_Ex06_Numerology.py
#
# Author: Bill Montana
# Course: Coding for OOP
# Section: A3
# Date: 11 Oct 2017
# IDE: PyCharm Community Edition
#
# Assignment Info
# Exercise: 6
@bmontana
bmontana / U05_Ex04_Acronym.py
Last active October 11, 2017 19:30
Creates an acronym from input text
# U05_Ex04_Acronym.py
#
# Author: Bill Montana
# Course: Coding for OOP
# Section: A3
# Date: 30 Oct 2017
# IDE: Pythonista for iOS
#
# Assignment Info
# Exercise: 4
@bmontana
bmontana / U05_Ex03_GradingScale.py
Last active October 11, 2017 19:31
Accepts an exam score as input and prints the corresponding letter grade
# U05_Ex03_GradingScale.py
#
# Author: Bill Montana
# Course: Coding for OOP
# Section: A3
# Date: 30 Oct 2017
# IDE: Pythonista for iOS
#
# Assignment Info
# Exercise: 3
@bmontana
bmontana / U05_Ex01_DateConvert2.py
Last active October 11, 2017 19:32
Redo dateconvert2.py using string formatting
# U05_Ex01_DateConvert2.py
#
# Author: Bill Montana
# Course: Coding for OOP
# Section: A3
# Date: 30 Oct 2017
# IDE: Pythonista for iOS
#
# Assignment Info
# Exercise: 1
@bmontana
bmontana / U05_Ex09_WordCount.py
Created October 12, 2017 02:58
Counts the number of words in a sentence entered by the user
# U05_Ex09_WordCount.py
#
# Author: Bill Montana
# Course: Coding for OOP
# Section: A3
# Date: 11 Oct 2017
# IDE: PyCharm Community Edition
#
# Assignment Info
# Exercise: 9
@bmontana
bmontana / U05_Ex10_AvgWordLen.py
Created October 12, 2017 03:09
Calculates the average word length in a sentence entered by the user
# U05_Ex10_AvgWordLen.py
#
# Author: Bill Montana
# Course: Coding for OOP
# Section: A3
# Date: 11 Oct 2017
# IDE: PyCharm Community Edition
#
# Assignment Info
# Exercise: 10
@bmontana
bmontana / U05_Ex12_FutVal.py
Created October 12, 2017 03:30
Nicely formatted version of futval.py from Chapter 2
# U05_Ex12_FutVal.py
#
# Author: Bill Montana
# Course: Coding for OOP
# Section: A3
# Date: 11 Oct 2017
# IDE: PyCharm Community Edition
#
# Assignment Info
# Exercise: 12