
import math

def MIDItoHz(MIDIval):
    """
    Converts a MIDI note, MIDIval, value to the equivalent hertz value
    """
    #return 69 + 12 * math.log((MIDIval/440), 2)
    return (2**((MIDIval-69)/12))*440

def hzToMIDI(hz):
    """
    Converts hertz, hz, to MIDI note equivalent
    """
    midi = 2**((hz-69)/12) * 440
    return int(midi + 0.5)


import math

def MIDItoHz(MIDIval):
    """
    Converts a MIDI note, MIDIval, value to the equivalent hertz value
    """
    return (2**((MIDIval-69)/12))*440

def hzToMIDI(hz):
    """
    Converts hertz, hz, to MIDI note equivalent
    """
    midi = 2**((hz-69)/12) * 440
    return int(midi + 0.5)

Remove comment containing incorrect conversion function.
Remove comment containing incorrect conversion function.

  
  import math
  
  def MIDItoHz(MIDIval):
      """
      Converts a MIDI note, MIDIval, value to the equivalent hertz value
      """
-     #return 69 + 12 * math.log((MIDIval/440), 2)
      return (2**((MIDIval-69)/12))*440
  
  def hzToMIDI(hz):
      """
      Converts hertz, hz, to MIDI note equivalent
      """
      midi = 2**((hz-69)/12) * 440
      return int(midi + 0.5)
  
Remove comment containing incorrect conversion function.
## Code Before:

import math

def MIDItoHz(MIDIval):
    """
    Converts a MIDI note, MIDIval, value to the equivalent hertz value
    """
    #return 69 + 12 * math.log((MIDIval/440), 2)
    return (2**((MIDIval-69)/12))*440

def hzToMIDI(hz):
    """
    Converts hertz, hz, to MIDI note equivalent
    """
    midi = 2**((hz-69)/12) * 440
    return int(midi + 0.5)

## Instruction:
Remove comment containing incorrect conversion function.
## Code After:

import math

def MIDItoHz(MIDIval):
    """
    Converts a MIDI note, MIDIval, value to the equivalent hertz value
    """
    return (2**((MIDIval-69)/12))*440

def hzToMIDI(hz):
    """
    Converts hertz, hz, to MIDI note equivalent
    """
    midi = 2**((hz-69)/12) * 440
    return int(midi + 0.5)
