Chemical element - atomic number

Inputs

  • Name of chemical element

Outputs

  • Atomic number

Neuron type

Best algorithm has been found - locked

Patterns

Pattern Input Output
1.
Name of chemical element: Potassium
Atomic number: 19
2.
Name of chemical element: bromine
Atomic number: 35
3.
Name of chemical element: Beryllium
Atomic number: 4

Applicable neurons

  • Get value from knowbase
  • Atomic number (Z)
  • Rectangle - content
  • Connect - four inputs
  • -1
  • character <
  • begin of start tag
  • tag title
  • Midpoint (3d)
  • Hello world.
  • character !
  • a-z

Algorithm

Test

Code made by AI:
/**
 * Atomic number (Z): 
 *
 * @return {Array}
 */
function neuron815()
{
return ["Atomic number (Z)"]
}

/**
 * Get value from knowbase: 
 *
 * @param x1 subject
 * @param x2 key
 * @return {Array}
 */
function neuron801(x1, x2)
{
var url = "/ajax-search?subject="+x1.toString()+"&key="+x2.toString();

if (ai_g_kb.exists(url)) 
  {return [ai_g_kb.get(url)];}
if (ai_g_kb.getCount()>=20) 
  {return 'error';}
var data = $.ajax({
url: url,
async: false
   }).responseText;
value = $.parseJSON(data).value;
ai_g_kb.add(url, value);
return [value];
}

/**
 * Chemical element - atomic number: 
 * 
 * @param x1 Name of chemical element
 * @return {Array}
 */
function neuron816(x1)
{
  var outputs = [];
  outputs[0] = x1;

  arr = neuron815();
  outputs[1] = arr[0];

  arr = neuron801(outputs[0], outputs[1]);
  outputs[2] = arr[0];

  return[outputs[2]];
}


Code made by AI:

Create your family tree for free