Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Write Your First Function | Writing Functions in R
Functions and Functional Programming in R

bookChallenge: Write Your First Function

Tâche

Swipe to start coding

Create a function that introduces a person using their name and age.

  • The function introduce_person must take two arguments: name and age.
  • The function must return a string in the format: "Hello, my name is <name> and I am <age> years old.".

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 2
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

close

bookChallenge: Write Your First Function

Glissez pour afficher le menu

Tâche

Swipe to start coding

Create a function that introduces a person using their name and age.

  • The function introduce_person must take two arguments: name and age.
  • The function must return a string in the format: "Hello, my name is <name> and I am <age> years old.".

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 2
single

single

some-alt