A function definition in python: • cannot be placed among other code • may be placed…
Jump to turn (30)
- 1A function definition in python: • cannot be placed among other code • may be pl
- 2In python A function parameter is a kind of variable accessible: • anywhere in t
- 3In python A way of passing arguments in which the order of the arguments determi
- 4In python Which of the following statements are true? (Select two answers) • The
- 5In python The None keyword designates: • a function which doesn't return a value
- 6In python A variable defined outside a function: • may be read, but not written
- 7In python If a list is passed into a function as an argument, deleting any of it
- 8Quel est le résultat de l’extrait suivant ? def fun(in=2, out=3): return in out
- 9def fun(inp=2, out=3): return inp out print(fun(3))
- 10Quel est le résultat de l’extrait suivant ? tup = (1, ) + (1, ) tup = tup + tup
- 11print(len(1, 1, 1, 1))
- 12print(len(111, 11, 1, 12))
- 13In python Which one of the following lines properly starts a parameterless funct
- 14En supposant que mytuple est un tuple correctement créé, le fait que les tuples
- 15En supposant que mytuple est un tuple correctement créé, le fait que les tuples
- 16En supposant que mytuple est un tuple correctement créé, le fait que les tuples
- 17En supposant que mytuple est un tuple correctement créé, le fait que les tuples
- 18En supposant que mytuple est un tuple correctement créé, le fait que les tuples
- 19L'extrait suivant : def fune(a, b) : return a a print(fune(2) ) will return None
- 20En python Print(235) affiche quoi
- 21Quel code inséreriez-vous à la place du commentaire pour obtenir le résultat att
- 22Quel code inséreriez-vous à la place du commentaire pour obtenir le résultat att
- 23Quel code inséreriez-vous à la place du commentaire pour obtenir le résultat att
- 24Quel code inséreriez-vous à la place du commentaire pour obtenir le résultat att
- 25Quel est le résultat de l’extrait suivant ? def any(): print(var + 1, end='') va
- 26def any(): print(var + 1, end=‘’) var = 1 any() print(var)
- 27def f(x): if x == 0: return 0 return x + f(x - 1) print(f(3))
- 28def fun(x): global y y = x x return y fun(2) print(y)
- 29tup = (1, 2, 4, 8) tup = tup[1:-1] tup = tup[0] print(tup)
- 30tup = (1, 2, 4, 8) tup = tup[1:-2] tup = tup[0] print(tup)
- User
A function definition in python: • cannot be placed among other code • may be placed anywhere inside the code after the first invocation • must be placed before the first invocation
- Assistant
In Python, a function must be defined before it is called for the first time in your code. So, the correct statement is: