Skip to content

Commit

Permalink
Remove challenges text in R script 20240827
Browse files Browse the repository at this point in the history
  • Loading branch information
damianooldoni committed Aug 27, 2024
1 parent fa1ea01 commit fdd634e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/20240827/20240827_challenges.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ library(tidyverse)

## CHALLENGE 1

# Use debug techniques to find the bug in the function evenOdd()

#' Function evenOdd() takes an integer n and returns a list containing two integers
#' that respectively indicate how many even and odd digits occur in n
#'
Expand All @@ -29,18 +27,19 @@ evenOdd <- function(n) {

## CHALLENGE 2

# Using debug techniques find what is going wrong in functions step() and steps()

#' Function step() takes a positive integer:
#' 886328712442992
#'
#' Write down a positive integer:
#' 398473234
#'
#' Count up the number of even and odd digits, and the total number of digits:
#' 4 5 9
#'
#' String the digits of those three numbers together to make a new number:
#' 459
#' Return it as a number
#'
#' Return it as a number.
#' @examples
#' step(398473234)
#' 459
Expand Down Expand Up @@ -108,6 +107,8 @@ custom_min <- function(x) {
if (length(x)>0) min(x) else NA
}



## CHALLENGE 3


Expand Down

0 comments on commit fdd634e

Please sign in to comment.