http://en.wikipedia.org/wiki/Technologist
http://en.wikipedia.org/wiki/Applied_Science_Technologist
http://en.wikipedia.org/wiki/Architectural_technologist
# this_callable.py | |
>>> class Foo: | |
... def __call__(self): | |
... import this | |
... | |
>>> foo = Foo() | |
>>> foo | |
<__main__.Foo object at 0x00BE09B0> | |
>>> foo() |
#!/usr/local/bin/python3 | |
# my_rectangle.py | |
import math | |
class Rectangle: | |
def __init__(self, x, y): | |
# self.width = x | |
# self.height = y | |
self.area = x * y |
#!/usr/bin/env python3 | |
# insert_word2.py | |
import sys | |
def usage(): | |
print(''' | |
Writes to FILE using INSERTED text before each occurrence of FIND text. | |
# insert_word.py | |
import sys | |
def usage(): | |
print(''' | |
Outputs new file with inserted text before each occurrence of find text. | |
Usage: python insert_word.py FILEIN find insert FILEOUT |
# Fahrenheit_to_Celsius.py | |
from decimal import * | |
getcontext().prec = 3 | |
class Fahrenheit_to_Celsius: | |
def convert(degf): | |
return Decimal((degf - 32)) * Decimal(5) / Decimal(9) | |
def main(): | |
begin = """ |
# leapyear_function.py | |
def isLeapYear (year): | |
if ((year % 4 == 0) and (year % 100 != 0)) or (year % 400 == 0): | |
return(True)# changed from "true" string | |
else: return(False) # changed from "false" string | |
# an experiment for the math.fmod | |
# inspired by http://oneau.wordpress.com/2011/08/30/jdcal/ | |
import math | |
def is_leap(year): |
def is_a_vowel(c): | |
vowels = "AEIOUaeiou" | |
return c in vowels | |
if __name__ == "__main__": | |
print(is_a_vowel("X")) | |
print(is_a_vowel("O")) | |
print(is_a_vowel("e")) |
# def calculate_new_balance(d, r): | |
# return(d + d * r ) | |
# if __name__ == "__main__": | |
# r = 0.005 | |
# d = 1000 | |
# n = 12 | |
# month = n + 1 | |
# print("Given the following values I will calculate your new balance for each month") | |
# print("The formula is (new balance = deposit * (1 + rate)^months)") |
# ftoc.py | |
def convert(degf): | |
return str((float(degf) - 32) * 5 / 9) | |
if __name__ == "__main__": | |
print("I will convert Fahrenheit degrees to Celsius degrees for you") | |
print("Please enter the degrees in Fahrenheit at the prompt") | |
degf = input("entry =: ") | |
print("Your entry was " + degf + " degrees Fahrenheit") |