Challenge: Default Arguments in Action
Завдання
Swipe to start coding
Write a function rectangle_area that calculates the area of a rectangle, with the height defaulting to 1 if not provided.
- The function must take two parameters:
widthandheight, withheightdefaulting to 1. - The function must return the product of
widthandheight.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 6
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Чудово!
Completion показник покращився до 5.56
Challenge: Default Arguments in Action
Свайпніть щоб показати меню
Завдання
Swipe to start coding
Write a function rectangle_area that calculates the area of a rectangle, with the height defaulting to 1 if not provided.
- The function must take two parameters:
widthandheight, withheightdefaulting to 1. - The function must return the product of
widthandheight.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 6
single