Answer:
Part 1: It would be a straight line, current will be directly proportional to the voltage.
Part 2: The current would taper off and will have negligible increase after the voltage reaches a certain value. Graph attached.
Explanation:
For the first part, voltage and current have a linear relationship as dictated by the Ohm's law.
V=I*R
where V is the voltage, I is the current, and R is the resistance. As the Voltage increase, current is bound to increase too, given that the resistance remains constant.
In the second part, resistance is not constant. As an element heats up, it consumes more current because the free sea of electrons inside are moving more rapidly, disrupting the flow of charge. So, as the voltage increase, the current does increase, but so does the resistance. Leaving less room for the current to increase. This rise in temperature is shown in the graph attached, as current tapers.
Answer:
import pandas pd
def read_prices(tickers):
price_dict = {}
# Read ingthe ticker data for all the tickers
for ticker in tickers:
# Read data for one ticker using pandas.read_csv
# We assume no column names in csv file
ticker_data = pd.read_csv("./" + ticker + ".csv", names=['date', 'price', 'volume'])
# ticker_data is now a panda data frame
# Creating dictionary
# for the ticker
price_dict[ticker] = {}
for i in range(len(ticker_data)):
# Use pandas.iloc to access data
date = ticker_data.iloc[i]['date']
price = ticker_data.iloc[i]['price']
price_dict[ticker][date] = price
return price_dict