@GeorgeGibby/

Preferential Sequences

Python

The coding equivalent of a few math equations.

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
setList = []
print("Length of data sets: ")
datalen = int(input())
setNums = 0

def plurality():
  for

def runoff():
  print("placeholder")

def sequentialrunoff():
  print("placeholder")

def borda():
  print("placeholer")

def reset():
  setList.clear()
  print("Number of sets: " + str(setNums))

def listSets():
  global datalen
  global setNums
  currentSet = 1
  currentSetStart = 0
  currentSetEnd = datalen + 1
  if currentSet == 1:
    print("Set " + str(currentSet) + ": " + str(setList[currentSetStart:currentSetEnd]))
    currentSet += 1
    currentSetStart = currentSetStart + datalen + 1
  while currentSet <= setNums:
    print("Set " + str(currentSet) + ": " + str(setList[currentSetStart:currentSetEnd * currentSet]))
    currentSet += 1
    currentSetStart = currentSetStart + datalen + 1
  print("Number of sets: " + str(setNums))

def createSet(votes):
  stepper = 0
  global setNums
  while (datalen > stepper):
    setList.append(str(input()))
    stepper = stepper + 1
  setList.append(votes)
  setNums = setNums + 1