Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Write Your First Function | Writing Functions in R
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Functions and Functional Programming in R

bookChallenge: Write Your First Function

Task

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

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 2
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

close

bookChallenge: Write Your First Function

Swipe to show menu

Task

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 desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 2
single

single

some-alt