Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
"""
Homework 3.
# -*- coding: utf-8 -*-
"""
Created on Wed Jan 30 17:12:45 2019
@author: akilic3
"""
#FIRST method
class NRES898():
pass
#Class is basically creating bueprint for instances
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
my_name = "Marketa Podebradska"
my_name2 = 'Marketa'
print(my_name, my_name2)
# -*- coding: utf-8 -*-
"""
Homework 2
We will be submitting this assignment on Canvas.
It's due before Jan 24 11:59pm.
"""
###############################################################################
# -*- coding: utf-8 -*-
"""
Created on Thu Jan 17 11:25:18 2019
@author: mpodebradska2
"""
# Exercise 6
my_list = [1, 2, 3]
def loan(principle, annual_percentage_rate, payments_per_year, years):
'''This function calculates monthly payment for a loan'''
monthly_interest = annual_percentage_rate / payments_per_year / 100.0
total_num_payments = yeras * payments_per_year
val = (1 + monthly_interest) ** total_num_payments
return round((principle * monthly_interest * val / (val - 1)), 2)
loan1 = loan(
years = 5.0,
# -*- coding: utf-8 -*-
"""
Read the comments in this file. The comments contain problem statements.
Do your best to write code that satisfies what is being requested in the
problem statements.
This homework will be handed in at the start of the next class by depositing
the file in the class folder in the Y drive. Place the homework in your
personal folder. Name the file {first name}_{last name}_homework1.py.
For example: philip_blankenau_homework1.py
#variables
price = 24.95
discount = 1 - 0.4
number_copies = 60
first_copy = 2
next_copies = 0.80
#functions
def discounted(price, discount):
'''Calculated discounted price'''
library(car)
library(MASS)
library(ggplot2)
library(viridisLite)
setwd("/Users/marketa/Library/Mobile Documents/com~apple~CloudDocs/School/Thesis/EDDI")
EDDI <- read.csv("EDDI_3mn_all.csv", header = TRUE)
EDDI <- EDDI[,-1]
EDDI <- EDDI*-1
names(EDDI) <- c("2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013","2014", "2015", "2016")
library(car)
library(MASS)
library(ggplot2)
library(viridisLite)
setwd("/Users/marketa/Library/Mobile Documents/com~apple~CloudDocs/School/Thesis/ESI")
ESI <- read.csv("ESI.csv", header = TRUE)
names(ESI) <- c("2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013","2014", "2015", "2016")
Productivity <- read.csv("prod_anomaly.csv", header = TRUE)
Productivity <- Productivity[,-1]