This file contains hidden or 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 numpy as np | |
import sys | |
import math | |
class ConnectFour: | |
def __init__(self, row_count, column_count): | |
self.row_count = row_count | |
self.column_count = column_count |
This file contains hidden or 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
expression = input('Enter a simple math expression: ') | |
if expression.find(' ') == 1: | |
expression = expression.split() | |
expression = str(expression[0]+expression[1]+expression[2]) | |
possibleOperations = ['+', '-', '/', '*'] | |
for operation in possibleOperations: | |
if expression.find(operation) == 1: | |
if operation == '+': | |
expression = expression.split(operation) |