BaşlayınÜcretsiz Başlayın

General binge drinking function

Let's put together everything you've done so far. You have two binge status functions - one for males and the other for females. In this exercise you will write a function that accepts two arguments: sex and num_drinks. You will make use of the functions binge_male() and binge_female() you defined in the previous exercise.

Similar to R, parameters in the function definition are separated by a comma.

Bu egzersiz

Python for R Users

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# A function that returns a binge status
____ ____(____):
    if sex == 'male':
        return ____(____)
    else:
        return ____(____)
Kodu Düzenle ve Çalıştır