You are on page 1of 13

Rules :

10 challenges with time limits.


Each students have one life.
When you are eliminated, you must continue to work on the other
exercises.

Who will survive until the end ?


2 minutes Challenge n°1

Use a function to display the string « Let’s play »


4 minutes Challenge n°2

Create a function that returns first name and last name of somebody in one string

Hint: Example:
def fonction_2(first_name,last_name) :
fonction_2(‘Maxence’,’Duffuler’)
...
→ ‘Maxence Duffuler’
return ….
4 minutes Challenge n°3

Create a function that returns the minimum and the maximum of a list

Hint: Example:
def fonction_3(liste) :
fonction_3( [1,2,3,4,5] ):
...
→ 1,5
return minimum, maximum

Average of a list = Mean of a list


→ mean(liste)
5 minutes Challenge n°4

Create a loop that will print one value out of two

Hint: Example:
for i in ….. :
[1,2,3,4,5] :
…..
→ 1,3,5
print( … )

Length of a liste = len(liste) [10, 30, 50, 70, 90] :


Create a list of numbers = range(…, step = ?) → 10, 50, 90
4 minutes Challenge n°5

Create a function that returns True if its length is above 10 (10 included)

Hint: Example:
def fonction_5( value ): fonction_5 ( ‘Anticonstitutionnellement’ )
if ….: → True
… fonction_5 ( ‘Okay’ )
→ False
8 minutes Challenge n°6
! Bonus challenge !

Work by group of 2

Two quickest groups : + 1 ❤


Others : + 0 ❤ (but you do not lose any life)
8 minutes Challenge n°6
! Bonus challenge !

Create a function that returns the factorial of a number with a while loop
5 minutes Challenge n°7

Create a function that checks if the first number of a list and the last are the same

Hint: Example:
def fonction_7( liste ): fonction_7 ( [ 1, 2, 3, 4, 5] )
if ….: → False
Return … fonction_7 ( [ 1, 2, 3, 4, 1] )
→ True
7 minutes Challenge n°8

Create a loop that print the following pattern


10 minutes Challenge n°9
Create a function that answers to the following condition :
Given a two list of numbers, write a program to create a new list such that the new list
should contain odd numbers from the first list and even numbers from the second list.

Hint:
Check if a number is even: Example:
num % 2 == 0
fonction_9 ( [ 1, 2, 3, 4, 5 ],[12, 13,14, 15] )
→ True : number is even
→ [ 1, 3, 5, 12, 14 ]
→ False : number is odd

Add an element in a list : liste.append(value)


8 minutes Challenge n°10
Create a function that returns True if a string is a palindrome

Example:
fonction_10 ( ‘kayak’ )
→True
fonction_10 ( ‘test’ )
→ False

You might also like