Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Exercise: Fruit salad

  • Write a script called fruit_salad.py based on the following skeleton, that will pick 3 fruits from a list of fruits like the one we had in one of the earlier slides. Print the 3 names.

  • Could you make sure the 3 fruits are different?

  • Use the following skeleton:

fruits = ["Apple", "Banana", "Peach", "Orange", "Durian", "Papaya"]