Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

How can i solve that problem.//www.bilkent.tr/~bgedik/coursewiki/doku.php/cs315:spring2014:

How can i solve that problem. The assignment can also be examined by ; http://www.cs.bilkent.edu.tr/~bgedik/coursewiki/doku.php/cs315:spring2014:hw1Consider the following Python code segment, which uses built-in Python lists and NumPy lists to perform similar operations, albeit with differing results.Using built-in Python lists:>>> data = [1, 2, 3, 4]>>> print data[1, 2, 3, 4]>>> otherData = data>>> otherData[1] = -2>>> print otherData[1, -2, 3, 4]>>> print data[1, -2, 3, 4]>>> >>> otherData = data[1:3]>>> print otherData[-2, 3]>>> otherData[0] = 0>>> print otherData[0, 3]>>> print data[1, -2, 3, 4]Using NumPy arrays:>>> import numpy as np>>> data = np.array([1, 2, 3, 4])>>> print data[1 2 3 4]>>> otherData = data >>> otherData[1] = -2>>> print otherData[1 -2 3 4]>>> print data[1 -2 3 4]>>> >>> otherData = data[1:3]>>> print otherData[-2 3]>>> otherData[0] = 0>>> print otherData[0 3]>>> print data[1 0 3 4]Describe similarities and differences between copying and assignment semantics of built-in Python lists and NumPy arrays. Explain why the code behaves differently for the two.
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question