This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main () | |
{ | |
var computer = 2; | |
var player = 3; | |
if (computer > player) | |
{ | |
print ("my number is higher"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
import 'dart:io'; | |
add (int first,int second,int playeranswer) | |
{ | |
if (first + second == playeranswer) | |
{ | |
print ("you got it!"); | |
} | |
if (first + second != playeranswer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Read this first - https://jontysinai.github.io/jekyll/update/2017/09/24/the-mcp-neuron.html | |
#Set The inputs and the desired Outputs for and gate. | |
x1,x2,y = [0,0,1,1],[0,1,0,1], [0,0,0,1] | |
#Set Random values for weights w1,w2 and for the bias b. initialize all to 0 | |
w1,w2,b = 0,0,0 | |
#try 100 iterations to see if the perceptron can guess that we need a fucking and gate. | |
for _ in range(100): | |
#iterate for each input: | |
for i in [0,1,2,3]: | |
#just guess a y value based on our random weights and bias |