Tuesday, November 22, 2016

To Do



  • By Subject
    • History
      • Nine Terms and a Date for Statebuilding Review (Submit Online)
        • November 28
      • Video Review 1 (Submit Online)
        • November 28
      • Video Review 2 (Submit Online)
        • November 28
      • Group Peer Review (Submit Online)
        • Due November 22
      • Final Exam
        • Due December 2nd 8am
    • Mathematics
      • Final Exam
        • Due December 6th 8am
    • Business Writing
      • Business Writing Final is Due
        • December 1st 11:30am
      • Notebook Check is Due
        • December 1st 11:30am
    • Information Systems
      • Final Exam
        • December 7th 11:30am
  • By Date
    • November 22
      • History
        • Group Peer Review (Submit Online)
    • November 28
      • History
        • Nine Terms and a Date for Statebuilding Review (Submit Online)
        • Video Review 1 (Submit Online)
        • Video Review 2 (Submit Online)
    • December 1st 11:30am
      • Business Writing
        • Business Writing Final Due
        • Notebook Check Due
    • December 2nd 8am
      • History
        • Final Exam
    • December 6th 8am
      • Mathematics
        • Final Exam
    • December 7th 11:30am
      • Information Systems
        • Final Exam

Saturday, November 19, 2016

Random Python Programs November 20 2016

Deck Builder Program v1

def program1(deckname,nameofdeck):
  print("----------------------")
  if (len(deckname)) < 40:
    print("*This deck is below the deck minimum.*")
  if (len(deckname)) > 60:
    print("*This deck is past the deck limit.*")
  print(nameofdeck)
  print(deckname)
  print ("Number of cards in deck:",len(deckname))
  action = input("Rename your deck, add a card to your deck, remove a card from your deck,  check if a card is in a deck, or check how many of card is in your deck (rename),(add),(remove),(check):")
  if action == "rename":
    print("----------------------")
    newname = input("What would you like to rename your deck?:")
    (newname) = (deckname)
    deckname = (newname)
    nameofdeck = (newname)
    program1(deckname,nameofdeck)
  if action == "add":
    print("----------------------")
    add = input("What Card Would you like to Add to The Deck?:")
    counter = int(input("How many copies would you like to add to the deck?:"))
    while counter>0:
      deckname.append(add)
      counter -= 1
      program1(deckname,nameofdeck)
  if action == "remove":
    print("----------------------")
    remove = input ("What Card Would you like to Remove From The Deck?:")
    counter = int(input("How many copies would you like to remove from the deck?:"))
    while counter>0:
      deckname.remove(remove)
      counter -= 1
      program1(deckname,nameofdeck)
  if action == "check":
    print("----------------------")
    check = input("What would you like to check: Number of Card in Deck (number) or If a Card is in Deck (if)?:")
    if check == "number":
      print("----------------------")
      number = input("What card would you like to count in the deck?:")
      print(number,"occurs",deckname.count(number),"times in this deck.")
      program1(deckname,nameofdeck)
    if check == "if":
      print("----------------------")
      check = input("What card would you like to check to see if it is in the deck?:")
      if check in deckname:
        print(check, "is in",nameofdeck)
        program1(deckname,nameofdeck)
      else:
        print(check,"is not in",nameofdeck)
        program1(deckname,nameofdeck)
deckname = input("What would you like to name this deck?:")
nameofdeck = (deckname)
(deckname) = []
program1(deckname,nameofdeck)

Deck Builder Program v2

def program1(deckname,nameofdeck):
  print("----------------------")
  if (len(deckname)) < 40:
    print("*This deck is below the deck minimum.*")
  if (len(deckname)) > 60:
    print("*This deck is past the deck limit.*")
  print(nameofdeck)
  print(deckname)
  print ("Number of cards in deck:",len(deckname))
  action = input("Rename your deck, add a card to your deck, remove a card from your deck,  check if a card is in a deck, or check how many of card is in your deck (rename),(add),(remove),(check):")
  if action == "rename":
    print("----------------------")
    newname = input("What would you like to rename your deck?:")
    (newname) = (deckname)
    deckname = (newname)
    nameofdeck = (newname)
    program1(deckname,nameofdeck)
  if action == "add":
    print("----------------------")
    add = input("What Card Would you like to Add to The Deck?:")
    counter = int(input("How many copies would you like to add to the deck?:"))
    if (deckname.count(action)) == 3:
      print("You cannot add more than three copies of a card to your deck.")
      print("Action canceled")
      program1(deckname,nameofdeck)
    if counter > 3:
      print("You cannot add more than three copies of a card to your deck.")
      print("Action canceled")
      program1(deckname,nameofdeck)
    while counter>0:
      deckname.append(add)
      counter -= 1
      program1(deckname,nameofdeck)
  if action == "remove":
    print("----------------------")
    remove = input ("What Card Would you like to Remove From The Deck?:")
    counter = int(input("How many copies would you like to remove from the deck?:"))
    while counter>0:
      deckname.remove(remove)
      counter -= 1
      program1(deckname,nameofdeck)
  if action == "check":
    print("----------------------")
    check = input("What would you like to check: Number of Card in Deck (number) or If a Card is in Deck (if)?:")
    if check == "number":
      print("----------------------")
      number = input("What card would you like to count in the deck?:")
      print(number,"occurs",deckname.count(number),"times in this deck.")
      if (deckname.count(number)) > 3:
        print("There are too many copies of",number,"in the deck.")
      program1(deckname,nameofdeck)
    if check == "if":
      print("----------------------")
      check = input("What card would you like to check to see if it is in the deck?:")
      if check in deckname:
        print(check, "is in",nameofdeck)
        program1(deckname,nameofdeck)
      else:
        print(check,"is not in",nameofdeck)
        program1(deckname,nameofdeck)
deckname = input("What would you like to name this deck?:")
nameofdeck = (deckname)
(deckname) = []
program1(deckname,nameofdeck)

Deck Builder Program v3

def program1(deckname,nameofdeck):
  print("----------------------")
  if (len(deckname)) < 40:
    print("*This deck is below the deck minimum.*")
  if (len(deckname)) > 60:
    print("*This deck is past the deck limit.*")
  print(nameofdeck)
  print(deckname)
  print ("Number of cards in deck:",len(deckname))
  action = input("Rename your deck, add a card to your deck, remove a card from your deck,  check if a card is in a deck, or check how many of card is in your deck (rename),(add),(remove),(check):")
  if action == "rename":
    print("----------------------")
    newname = input("What would you like to rename your deck?:")
    (newname) = (deckname)
    deckname = (newname)
    nameofdeck = (newname)
    program1(deckname,nameofdeck)
  if action == "add":
    print("----------------------")
    add = input("What Card Would you like to Add to The Deck?:")
    counter = int(input("How many copies would you like to add to the deck?:"))
    if (deckname.count(action)) == 3:
      print("You cannot add more than three copies of a card to your deck.")
      print("Action canceled")
      program1(deckname,nameofdeck)
    if counter > 3:
      print("You cannot add more than three copies of a card to your deck.")
      print("Action canceled")
      program1(deckname,nameofdeck)
    while counter>0:
      deckname.append(add)
      counter -= 1
      program1(deckname,nameofdeck)
  if action == "remove":
    print("----------------------")
    remove = input ("What Card Would you like to Remove From The Deck?:")
    counter = int(input("How many copies would you like to remove from the deck?:"))
    while counter>0:
      deckname.remove(remove)
      counter -= 1
      program1(deckname,nameofdeck)
  if action == "check":
    print("----------------------")
    check = input("What would you like to check: Number of Card in Deck (number) or If a Card is in Deck (if)?:")
    if check == "number":
      print("----------------------")
      number = input("What card would you like to count in the deck?:")
      print(number,"occurs",deckname.count(number),"times in this deck.")
      if (deckname.count(number)) > 3:
        print("There are too many copies of",number,"in the deck.")
      program1(deckname,nameofdeck)
    if check == "if":
      print("----------------------")
      check = input("What card would you like to check to see if it is in the deck?:")
      if check in deckname:
        print(check, "is in",nameofdeck)
        program1(deckname,nameofdeck)
      else:
        print(check,"is not in",nameofdeck)
        program1(deckname,nameofdeck)
deckname = input("What would you like to name this deck?:")
nameofdeck = (deckname)
(deckname) = []
program1(deckname,nameofdeck)

Deck Builder Program v4


Wednesday, November 16, 2016

Infinite Floyd Triangle (It never stops)

def floyd_triangle(level):
a = level
program2(level,a,1,2,1)
def program2(level,a,start,stop,row):
if a == level:
for counter in range(start,stop,1):
print(counter,end=" ")
print("")
a += 1
row += 1
program2(level,a,start,stop,row)
elif a>0:
start = stop
stop = stop+row
for counter in range(start,stop,1):
print(counter,end=" ")
print("")
a += 1
row += 1
program2(level,a,start,stop,row)
else:
print("[Complete]")
floyd_triangle(3)
print("-------------------------")
floyd_triangle(5)

Sunday, November 13, 2016

November 13-18 2016 Agenda



  • November 13: Sunday
  • November 14: Monday
    • History
      • Read pg.315-321 and the Hassig Paper
    • Programming
  • November 15: Tuesday
    • Math
      • 13.2 assignment
    • Business Writing
      • Give Comic Speech
  • November 16: Wednesday
    • History
      • Video Project
      • Read pp. 435
        Ming State and Commercial Revolution & Chinese Exams (RPQ)
    • Programming
  • November 17: Thursday
    • Math
      • Test
    • Business Writing
  • November 18: Friday
    • Programming

Monday, November 7, 2016

Programming: Relevant Class Announcements

Prime Numbers Announcement

# What are prime numbers?
# http://www.programiz.com/python-programming/examples/prime-number

def isPrime(num):
    if isinstance(num, float) or isinstance(num, int):
        if isinstance(num,bool) or int(num) != num:
            print("Illegal input")
        elif num > 1:
        # check for factors
            num = int(num)
            for i in range(2,num):
                if (num % i) == 0:
                    print(num,"is not a prime number")
                    print(i,"times",num//i,"is",num)
                    break
            else:
                print(num,"is a prime number")
# if input number is less than
# or equal to 1, it is not prime
        else:
            print(num,"is not a prime number")
    else:
        print("Illegal input")

isPrime([3,4])
isPrime(True)
isPrime(3.0)
isPrime(-4.3)
isPrime("a")
isPrime(5.6)
isPrime(407)
isPrime(17)

Multiplication Table Announcement

def multi_table(a,b):
    if a > b:
        small = b
        large = a
    else:
        small = a
        large = b
    print("{:<6 br="" end="" format="">    for head in range(small,large+1,1):
        print("{:<6 br="" end="" format="" head="">    print("")
    for row in range(small,large+1,1):
        print("{:<6 br="" end="" format="" row="">        for col in range(small,large+1,1):
            print("{:<6 br="" col="" end="" format="" row="">        print("")

multi_table(11,17)
print("------------------")
multi_table(17,11)

Exam 3

Exam 3 will be held on Nov 7 and 9. On Monday (11/7), you will see one question and on Wednesday (11/9) you will see another question. Exam 3 covers everything up to and including Chapter 7. It is open book and open notes, but it is closed on any living thing.

Friday, November 4, 2016

Programming Exam#3 Tips


  • Day One: November 7th
    • Read all the announcements on Canvas
      • Especially the Python Code
  • Day Two: November 9th
    • Hint #1
      • We have done this before.
      • It uses the pmt function and nested loops.
  • Day Three: November 11th
    • Cancelled 
  • Things to Review Before the Exams
    • The announcements on Canvas
    • PMT functions in Python
    • How to do Nested Loops

Thursday, November 3, 2016

Schedule: November 4th to November 15th


Subject by Subject Schedule

  • History
    • Read pg.426-431,437-446
      • Due November 7th
    • Crashcourse Assignment
      • Due November 9th
    • Read pg. 458-467
      • Due November 9th
    • Read pg.315-321 and the Hassig Paper
      • Due November 14th
  • Programming
  • Mathematics
    • 13.1 Assignment
      • Due November 8th
    • 13.2 Assignment
      • Due November 15th
  • Business Writing
    • Write and Submit a Proposal
      • Due November 10th
    • Design and Submit a Logo
      • Due November 10th

Earliest Due Date to Latest Due Date

  • November 7th
    • Read pg.426-431,437-446
  • November 8th
    • 13.1 Assignment
  • November 9th
    • Crashcourse Assignment
    • Read pg.456-467
  • November 10th
    • Write and Submit a Proposal
    • Design and Submit a Logo
  • November 14th
    • Read pg.315-321 and the Hassig Paper
  • November 15th
    • 13.2 Assignment

Day by Day Schedule

  • Friday: November 4th
    • Read pg.426-431,437-446
    • Work on 13.1 Assignment
    • Work on CrashCourse Assignment
    • Work on Proposal Assignment
    • Read pg.315-321 and the Hassig Paper
    • Work on 13.2 Assignment
  • Saturday: November 5th
    • Read pg.426-431,437-446
    • Work on 13.1 Assignment
    • Work on CrashCourse Assignment
    • Work on Proposal Assignment
    • Read pg.315-321 and the Hassig Paper
    • Work on 13.2 Assignment
  • Sunday: November 6th
    • Read pg.426-431,437-446
    • Work on 13.1 Assignment
    • Work on CrashCourse Assignment
    • Work on Proposal Assignment
    • Read pg.315-321 and the Hassig Paper
    • Work on 13.2 Assignment
  • Monday: November 7th
    • Due: Read pg.426-431,437-446
    • Work on 13.1 Assignment
    • Work on CrashCourse Assignment
    • Work on Proposal Assignment
    • Read pg.315-321 and the Hassig Paper
    • Work on 13.2 Assignment
  • Tuesday: November 8th
    • 13.1 Assignment is Due
    • Work on CrashCourse Assignment
    • Read Pg.456-467
    • Work on Logo Assignment
    • Work on Proposal Assignment
    • Read pg.315-321 and the Hassig Paper
    • Work on 13.2 Assignment
  • Wednesday: November 9th
    • Crashcourse Assignment is Due
    • Reading is Due
    • Work on Logo Assignment
    • Work on Proposal Assignment
    • Read pg.315-321 and the Hassig Paper
    • Work on 13.2 Assignment
  • Thursday: November 10th
    • Proposal Assignment is Due
    • Logo Assignment is Due
    • Read pg.315-321 and the Hassig Paper
    • Work on 13.2 Assignment
  • Friday: November 11th
    • Read pg.315-321 and the Hassig Paper
    • Work on 13.2 Assignment
  • Saturday: November 12th
    • Read pg.315-321 and the Hassig Paper
    • Work on 13.2 Assignment
  • Sunday: November 13th
    • Read pg.315-321 and the Hassig Paper
    • Work on 13.2 Assignment
  • Monday: November 14th
    • Due: Read pg.315-321 and the Hassig Paper
    • Work on 13.2 Assignment
  • Tuesday: November 15th
    • 13.2 Assignment is Due