Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Default Arguments in Action | Writing Functions in R
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Functions and Functional Programming in R

bookChallenge: 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: width and height, with height defaulting to 1.
  • The function must return the product of width and height.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 6
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

close

bookChallenge: 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: width and height, with height defaulting to 1.
  • The function must return the product of width and height.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 6
single

single

some-alt