
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Two python examples: the first one is a recursive function named squares that takes a list of integers and returns a new list with the same integers squared. The second example is a class named foo that initializes an object with an argument and prints the result of the argument squared.
Typology: Quizzes
1 / 1
This page cannot be seen from the preview
Don't miss anything!

class foo(): def init ( self, arg ): self.x = ( arg, arg * arg )
z = foo( 5 ) print z.x