1) What will this code print? a) PythonPython b) Python*2 c) Python2 d) Python 2) What is the main difference between a procedure and a function in Python? a) A procedure can return a value b) A function can return a value c) A function takes parameters d) A procedure takes parameters 3) Which keyword is used to define a function in Python? a) def b) define c) function d) func 4) What will this function return? a) 34 b) xy c) x + y d) 7 5) What is a parameter in a function? a) A variable returned by the function b) The value passed to a function c) The function name d) A placeholder variable inside the function definition 6) What is an argument in Python functions? a) The value you pass into a parameter when calling a function b) A variable inside a function c) The value returned by a function d) A loop condition 7) What will this code output? a) Hello b) Hello name c) Hello Sam d) Sam 8) What is the return type of this function? a) str b) bool c) int d) True 9) Which of these correctly defines a function with two parameters? a) def myFunc(a, b): b) def myFunc(a b): c) def myFunc(a + b): d) def myFunc(ab): 10) What will this code output? a) n b) 5 c) 55 d) 25
0%
Python Functions Quiz
Delen
Delen
Delen
door
Karenahmed81
Inhoud Bewerken
Afdrukken
Embedden
Meer
Toewijzingen
Scorebord
Meer weergeven
Minder weergeven
Dit scoreboard is momenteel privé. Klik op
Delen
om het publiek te maken.
Dit scoreboard is uitgeschakeld door de eigenaar.
Dit scoreboard is uitgeschakeld omdat uw opties anders zijn dan die van de eigenaar.
Opties Herstellen
Quiz winnen of verliezen
is een open template. Het genereert geen scores voor een scoreboard.
Inloggen vereist
Visuele stijl
Lettertypen
Abonnement vereist
Opties
Template wisselen
Alles weergeven
Er zullen meer templates verschijnen terwijl je de activiteit gebruikt.
Open resultaten
Kopieer link
QR-code
Verwijderen
Automatisch opgeslagen activiteit "
" herstellen?