import math


def succ_fcn(x):
    """
    takes an element of the Calkin Wilf tree and returns the next element
    following a breadth first traversal
    """
    return 1 / (math.floor(x) + 1 - (x % 1))

def get_nth(n):
    """
    takes a natural number n and returns the nth element of the Calkin Wilf tree
    following a breadth first traversal
    """

import math


def succ_fcn(x):
    """
    takes an element of the Calkin Wilf tree and returns the next element
    following a breadth first traversal
    """
    return 1 / (math.floor(x) + 1 - (x % 1))


def get_nth(n):
    """
    takes a natural number n and returns the nth element of the Calkin Wilf tree
    following a breadth first traversal
    """
    node = 1/1
    for i in range(1, n+1):
        node = succ_fcn(node)
    return node


Add basic breadth first return
Add basic breadth first return

  import math
  
  
  def succ_fcn(x):
      """
      takes an element of the Calkin Wilf tree and returns the next element
      following a breadth first traversal
      """
      return 1 / (math.floor(x) + 1 - (x % 1))
  
+ 
  def get_nth(n):
      """
      takes a natural number n and returns the nth element of the Calkin Wilf tree
      following a breadth first traversal
      """
+     node = 1/1
+     for i in range(1, n+1):
+         node = succ_fcn(node)
+     return node
  
+ 
Add basic breadth first return
## Code Before:
import math


def succ_fcn(x):
    """
    takes an element of the Calkin Wilf tree and returns the next element
    following a breadth first traversal
    """
    return 1 / (math.floor(x) + 1 - (x % 1))

def get_nth(n):
    """
    takes a natural number n and returns the nth element of the Calkin Wilf tree
    following a breadth first traversal
    """

## Instruction:
Add basic breadth first return
## Code After:
import math


def succ_fcn(x):
    """
    takes an element of the Calkin Wilf tree and returns the next element
    following a breadth first traversal
    """
    return 1 / (math.floor(x) + 1 - (x % 1))


def get_nth(n):
    """
    takes a natural number n and returns the nth element of the Calkin Wilf tree
    following a breadth first traversal
    """
    node = 1/1
    for i in range(1, n+1):
        node = succ_fcn(node)
    return node

