Answer to Question #281941 in Python for Evans Mulenga

Question #281941

Describe the difference between objects and values using the terms “equivalent” and “identical”. Illustrate the difference using your own examples with Python lists and the “is” operator.  

Describe the relationship between objectsreferences, and aliasing. Again, create your own examples with Python lists.

Finally, create your own example of a function that modifies a list passed in as an argument. Describe what your function does in terms of argumentsparametersobjects, and references

Create your own unique examples for this assignment. Do not copy them from the textbook or any other source.

1
Expert's answer
2021-12-22T01:10:11-0500

the variable is created in a python by means of the sign "=" where on the left part there will be a name of a variable and on right values of a variable. The variable and an object in a python are praktichesik equivalent concepts. But there are distinctions as a python there are two types of objects:


1) unchangeable such as numerical data, lines, trains. For example at a

equate variables values an object the having

some identifier is created:


>>> a=2


>>> id(a)


1407502272


When giving the same variable of new value the identifier changes, that is is created new an object:


>>> a=2


>>> id(a)


1407502272


>>> a=5


>>> id(a)


1407502320


>>>


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS