Homework 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Homework 1

Problem 1: (3 points) Write a python code and submit your data

(a) Use https://automeris.io/WebPlotDigitizer/ to extract data from the following graph and save data in a csv
file.

(b) Use python to plot data extracted in point (a) as beautiful as the above graph.

(c) Use https://automeris.io/WebPlotDigitizer/ to extract data in the below graph and replot data in the exact
manner as the graph.
Problem 2: (1 point) What is the output of the following code?

for i in range(10, 15, 1):


print( i, end=', ')

Problem 3: (1 point) What is the output of the following code?

valueOne = 5 ** 2
valueTwo = 5 ** 3

print(valueOne)
print(valueTwo)

Problem 4: (1 point) What is the output of the following code?

p, q, r = 10, 20 ,30
print(p, q, r)

Problem 5: (1 points) What is the output of the following code?

for x in range(0.5, 5.5, 0.5):


print(x)

Problem 6: (2 points) Write a python code to define f(x) = 1+x2 + x3 and g(x) = √𝑥 + 2√𝑥, and plot f(x) and g(x) in
the same manner as Problem 1.

Problem 7: (1 points) Write a python code to print integers smaller than 20.

You might also like