<jupyter_start><jupyter_text><jupyter_code>x_input=[0.1,0.2,0.5]
w_weights=[0.4,0.3,0.6]
threshold=0.5

def step_function(weighted_sum):
  if weighted_sum>threshold:
    return 1
  else:
    return 0


def percepton():
  weighted_sum=0
  for x,w in zip(x_input,w_weights):
    weighted_sum+=x*w
    print(weighted_sum)
  return step_function(weighted_sum)
output=percepton()
print(f'Output:{str(output)}')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1425287356321839, 'fraction_numerical': 0.03908045977011494, 'mean_word_length': 6.147540983606557, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '620283', 'license': 'Apache-2.0', 'n_tokens_mistral': 193, 'n_tokens_neox': 183, 'n_words': 25, 'path': 'simpleperception.ipynb', 'repo_name': 'golesuman/66daysofdata', 'size': '435'}