Page 1

Student ID: 498, P-Value: 2.24e-04

Nearest Neighbor ID: 423

Student (left) and Nearest Neighbor (right).


t1def encrypt(text, s):t1def encrypt(text, s):
2        result = ""2        result = ""
3        for i in range(len(text)):3        for i in range(len(text)):
4                char = text[i]4                char = text[i]
5                if(char.isupper()):5                if(char.isupper()):
6                        result += chr((ord(char) - s - 65) % 26 + 65)6                        result += chr((ord(char) - s - 65) % 26 + 65)
7                elif(char.islower()):7                elif(char.islower()):
8                        result += chr((ord(char) - s - 97) % 26 + 97)8                        result += chr((ord(char) - s - 97) % 26 + 97)
9                else:9                else:
10                    result += char10                    result += char
11        return result11        return result
12if __name__ == '__main__':12if __name__ == '__main__':
13    plaintext = input()13    plaintext = input()
14    shift = int(input())14    shift = int(input())
15    print(encrypt(plaintext,shift))s = input()15    print(encrypt(plaintext,shift))s = input()
16lst = [int(x) for x in s.split(" ")]16lst = [int(x) for x in s.split(" ")]
17t = 017t = 0
18m = None18m = None
19len = 019len = 0
20for n in lst:20for n in lst:
21    t += n21    t += n
22    if(m==None):22    if(m==None):
23        m = n23        m = n
24    elif(m < n):24    elif(m < n):
25        m = n25        m = n
26    len += 126    len += 1
27print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 227print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2
>, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
30word = input()30word = input()
31total = 031total = 0
32for letter in word:32for letter in word:
33    if letter in tile_dict:33    if letter in tile_dict:
34        total += tile_dict[letter]34        total += tile_dict[letter]
35print(total)35print(total)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 2

Student ID: 423, P-Value: 2.24e-04

Nearest Neighbor ID: 498

Student (left) and Nearest Neighbor (right).


t1def encrypt(text, s):t1def encrypt(text, s):
2        result = ""2        result = ""
3        for i in range(len(text)):3        for i in range(len(text)):
4                char = text[i]4                char = text[i]
5                if(char.isupper()):5                if(char.isupper()):
6                        result += chr((ord(char) - s - 65) % 26 + 65)6                        result += chr((ord(char) - s - 65) % 26 + 65)
7                elif(char.islower()):7                elif(char.islower()):
8                        result += chr((ord(char) - s - 97) % 26 + 97)8                        result += chr((ord(char) - s - 97) % 26 + 97)
9                else:9                else:
10                    result += char10                    result += char
11        return result11        return result
12if __name__ == '__main__':12if __name__ == '__main__':
13    plaintext = input()13    plaintext = input()
14    shift = int(input())14    shift = int(input())
15    print(encrypt(plaintext,shift))s = input()15    print(encrypt(plaintext,shift))s = input()
16lst = [int(x) for x in s.split(" ")]16lst = [int(x) for x in s.split(" ")]
17t = 017t = 0
18m = None18m = None
19len = 019len = 0
20for n in lst:20for n in lst:
21    t += n21    t += n
22    if(m==None):22    if(m==None):
23        m = n23        m = n
24    elif(m < n):24    elif(m < n):
25        m = n25        m = n
26    len += 126    len += 1
27print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 227print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2
>, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
30word = input()30word = input()
31total = 031total = 0
32for letter in word:32for letter in word:
33    if letter in tile_dict:33    if letter in tile_dict:
34        total += tile_dict[letter]34        total += tile_dict[letter]
35print(total)35print(total)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 3

Student ID: 324, P-Value: 7.09e-04

Nearest Neighbor ID: 401

Student (left) and Nearest Neighbor (right).


f1def encrypt(phrase, shift=3):f1def encrypt(phrase, shift=3):
2    phrase_enc = ''2    phrase_enc = ''
3    for letter in phrase:3    for letter in phrase:
4        if letter.isalnum() == True:4        if letter.isalnum() == True:
5            letter = chr(ord(letter)-shift)5            letter = chr(ord(letter)-shift)
6            if letter.isalnum() == False:6            if letter.isalnum() == False:
7                letter = chr(ord(letter) + 26)7                letter = chr(ord(letter) + 26)
n8        phrase_enc += letter n8        phrase_enc += letter
9    return phrase_enc9    return phrase_enc
10if __name__ == '__main__':10if __name__ == '__main__':
11    plaintext = input()11    plaintext = input()
12    shift = int(input())12    shift = int(input())
13    print(encrypt(plaintext,shift))numbers = input()13    print(encrypt(plaintext,shift))numbers = input()
n14numbers_list = numbers.split()n14number_list = numbers.split()
15total = 015total = 0
16max = 016max = 0
n17for num in numbers_list:n17for num in number_list:
18    total += int(num)18    total += int(num)
19    if int(num) >= max:19    if int(num) >= max:
20        max = int(num)20        max = int(num)
t21average = int(total / len(numbers_list))t21average = int(total / len(number_list))
22print(average, max)tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4,22print(average, max)tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4,
> 'G': 2, 'H': 4, 'I': 1, 'J': 8, > 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
23              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '23              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
24              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    24              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
25word = input()25word = input()
26points = 026points = 0
27for letter in word:27for letter in word:
28    points += tile_dict[letter]28    points += tile_dict[letter]
29print(points)29print(points)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 4

Student ID: 401, P-Value: 7.09e-04

Nearest Neighbor ID: 324

Student (left) and Nearest Neighbor (right).


f1def encrypt(phrase, shift=3):f1def encrypt(phrase, shift=3):
2    phrase_enc = ''2    phrase_enc = ''
3    for letter in phrase:3    for letter in phrase:
4        if letter.isalnum() == True:4        if letter.isalnum() == True:
5            letter = chr(ord(letter)-shift)5            letter = chr(ord(letter)-shift)
6            if letter.isalnum() == False:6            if letter.isalnum() == False:
7                letter = chr(ord(letter) + 26)7                letter = chr(ord(letter) + 26)
n8        phrase_enc += lettern8        phrase_enc += letter 
9    return phrase_enc9    return phrase_enc
10if __name__ == '__main__':10if __name__ == '__main__':
11    plaintext = input()11    plaintext = input()
12    shift = int(input())12    shift = int(input())
13    print(encrypt(plaintext,shift))numbers = input()13    print(encrypt(plaintext,shift))numbers = input()
n14number_list = numbers.split()n14numbers_list = numbers.split()
15total = 015total = 0
16max = 016max = 0
n17for num in number_list:n17for num in numbers_list:
18    total += int(num)18    total += int(num)
19    if int(num) >= max:19    if int(num) >= max:
20        max = int(num)20        max = int(num)
t21average = int(total / len(number_list))t21average = int(total / len(numbers_list))
22print(average, max)tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4,22print(average, max)tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4,
> 'G': 2, 'H': 4, 'I': 1, 'J': 8, > 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
23              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '23              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
24              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    24              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
25word = input()25word = input()
26points = 026points = 0
27for letter in word:27for letter in word:
28    points += tile_dict[letter]28    points += tile_dict[letter]
29print(points)29print(points)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 5

Student ID: 154, P-Value: 1.05e-03

Nearest Neighbor ID: 460

Student (left) and Nearest Neighbor (right).


f1def encrypt (plaintext, shift = 3):f1def encrypt (plaintext, shift = 3):
2    cipher = ""2    cipher = ""
3    for i in range(len(plaintext)):3    for i in range(len(plaintext)):
4        char = plaintext[i]4        char = plaintext[i]
5        if char.isalpha():5        if char.isalpha():
6            if (char.isupper()):6            if (char.isupper()):
7                cipher += chr((ord(char) - shift - 65) % 26 + 65)7                cipher += chr((ord(char) - shift - 65) % 26 + 65)
8            else:8            else:
9                cipher += chr((ord(char) - shift - 97) % 26 + 97)9                cipher += chr((ord(char) - shift - 97) % 26 + 97)
10        else:10        else:
11            cipher += char11            cipher += char
12    return cipher12    return cipher
13if __name__ == '__main__':13if __name__ == '__main__':
14    plaintext = input()14    plaintext = input()
15    shift = int(input())15    shift = int(input())
16    print(encrypt(plaintext,shift))average=016    print(encrypt(plaintext,shift))average=0
17max=017max=0
18sum=018sum=0
19nums = list(map(int, input().split()))19nums = list(map(int, input().split()))
20max=nums[0]20max=nums[0]
21for i in range (len(nums)):21for i in range (len(nums)):
22    sum=sum+nums[i]22    sum=sum+nums[i]
23    if max<nums[i]:23    if max<nums[i]:
24        max=nums[i]24        max=nums[i]
25average=sum/len(nums)25average=sum/len(nums)
tt26print("%d %d"%(average,max))
26print("%d %d"%(average,max))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 127tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I
>, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >': 1, 'J': 8, 
27              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
28              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
29word = input()30word = input()
30total = 031total = 0
31for letter in word:32for letter in word:
32    total = total + tile_dict[letter]33    total = total + tile_dict[letter]
33print(total)34print(total)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 6

Student ID: 460, P-Value: 1.05e-03

Nearest Neighbor ID: 154

Student (left) and Nearest Neighbor (right).


f1def encrypt (plaintext, shift = 3):f1def encrypt (plaintext, shift = 3):
2    cipher = ""2    cipher = ""
3    for i in range(len(plaintext)):3    for i in range(len(plaintext)):
4        char = plaintext[i]4        char = plaintext[i]
5        if char.isalpha():5        if char.isalpha():
6            if (char.isupper()):6            if (char.isupper()):
7                cipher += chr((ord(char) - shift - 65) % 26 + 65)7                cipher += chr((ord(char) - shift - 65) % 26 + 65)
8            else:8            else:
9                cipher += chr((ord(char) - shift - 97) % 26 + 97)9                cipher += chr((ord(char) - shift - 97) % 26 + 97)
10        else:10        else:
11            cipher += char11            cipher += char
12    return cipher12    return cipher
13if __name__ == '__main__':13if __name__ == '__main__':
14    plaintext = input()14    plaintext = input()
15    shift = int(input())15    shift = int(input())
16    print(encrypt(plaintext,shift))average=016    print(encrypt(plaintext,shift))average=0
17max=017max=0
18sum=018sum=0
19nums = list(map(int, input().split()))19nums = list(map(int, input().split()))
20max=nums[0]20max=nums[0]
21for i in range (len(nums)):21for i in range (len(nums)):
22    sum=sum+nums[i]22    sum=sum+nums[i]
23    if max<nums[i]:23    if max<nums[i]:
24        max=nums[i]24        max=nums[i]
25average=sum/len(nums)25average=sum/len(nums)
t26print("%d %d"%(average,max))t
27tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I26print("%d %d"%(average,max))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1
>': 1, 'J': 8, >, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '27              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    28              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
30word = input()29word = input()
31total = 030total = 0
32for letter in word:31for letter in word:
33    total = total + tile_dict[letter]32    total = total + tile_dict[letter]
34print(total)33print(total)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 7

Student ID: 169, P-Value: 1.32e-03

Nearest Neighbor ID: 460

Student (left) and Nearest Neighbor (right).


f1def encrypt (plaintext, shift = 3):f1def encrypt (plaintext, shift = 3):
2    cipher = ""2    cipher = ""
3    for i in range(len(plaintext)):3    for i in range(len(plaintext)):
4        char = plaintext[i]4        char = plaintext[i]
5        if char.isalpha():5        if char.isalpha():
6            if (char.isupper()):6            if (char.isupper()):
7                cipher += chr((ord(char) - shift - 65) % 26 + 65)7                cipher += chr((ord(char) - shift - 65) % 26 + 65)
8            else:8            else:
9                cipher += chr((ord(char) - shift - 97) % 26 + 97)9                cipher += chr((ord(char) - shift - 97) % 26 + 97)
10        else:10        else:
11            cipher += char11            cipher += char
12    return cipher12    return cipher
13if __name__ == '__main__':13if __name__ == '__main__':
14    plaintext = input()14    plaintext = input()
15    shift = int(input())15    shift = int(input())
16    print(encrypt(plaintext,shift))average=016    print(encrypt(plaintext,shift))average=0
17max=017max=0
18sum=018sum=0
19nums = list(map(int, input().split()))19nums = list(map(int, input().split()))
20max=nums[0]20max=nums[0]
21for i in range (len(nums)):21for i in range (len(nums)):
22    sum=sum+nums[i]22    sum=sum+nums[i]
23    if max<nums[i]:23    if max<nums[i]:
24        max=nums[i]24        max=nums[i]
25average=sum/len(nums)25average=sum/len(nums)
nn26print("%d %d"%(average,max))
26print("%d %d"%(average,max))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 127tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I
>, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >': 1, 'J': 8, 
27              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
28              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
n29user_word = input()n30word = input()
30total = 031total = 0
t31for letter in user_word:t32for letter in word:
32    total = total + tile_dict[letter]33    total = total + tile_dict[letter]
33print(total)34print(total)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 8

Student ID: 193, P-Value: 3.57e-03

Nearest Neighbor ID: 386

Student (left) and Nearest Neighbor (right).


f1def encrypt(text, s):f1def encrypt(text, s):
2    result = ''2    result = ''
3    for i in range(len(text)):3    for i in range(len(text)):
4        char = text[i]4        char = text[i]
5        if (char.isupper()):5        if (char.isupper()):
n6            result += chr((ord(char) - s- 65) % 26 + 65)n6            result += chr((ord(char) - s - 65) % 26 + 65)
7        elif(char.islower()):7        elif(char.islower()):
n8            result += chr((ord(char) - s- 97) % 26 + 97)n8            result += chr((ord(char) - s - 97) % 26 + 97)
9        else:9        else:
n10            result +=charn10            result += char
11    return result11    return result
12if __name__ == '__main__':12if __name__ == '__main__':
13    plaintext = input()13    plaintext = input()
14    shift = int(input())14    shift = int(input())
n15    print(encrypt(plaintext,shift))s = input()n15    print(encrypt(plaintext,shift))stat = input()
16lst = [int(x) for x in s.split(' ')]16lit = [int(x) for x in stat.split(' ')]
17t = 017t = 0
18m = None18m = None
19len = 019len = 0
n20for n in lst:n20for n in lit:
21    t+=n21    t += n
22    if(m==None):22    if(m == None):
23        m=n23        m = n
24    elif(m<n):24    elif(m<n):
25        m=n25        m=n
26    len += 126    len += 1
27print('{} {}'.format((t//len),m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, '27print('{} {}'.format((t//len),m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, '
>E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
n30word = input()n30words = input()
31points = 031points = 0
t32for char in word.upper():t32for char in words.upper():
33    points += tile_dict[char]33    points += tile_dict[char]
34print(points)34print(points)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 9

Student ID: 386, P-Value: 3.57e-03

Nearest Neighbor ID: 193

Student (left) and Nearest Neighbor (right).


f1def encrypt(text, s):f1def encrypt(text, s):
2    result = ''2    result = ''
3    for i in range(len(text)):3    for i in range(len(text)):
4        char = text[i]4        char = text[i]
5        if (char.isupper()):5        if (char.isupper()):
n6            result += chr((ord(char) - s - 65) % 26 + 65)n6            result += chr((ord(char) - s- 65) % 26 + 65)
7        elif(char.islower()):7        elif(char.islower()):
n8            result += chr((ord(char) - s - 97) % 26 + 97)n8            result += chr((ord(char) - s- 97) % 26 + 97)
9        else:9        else:
n10            result += charn10            result +=char
11    return result11    return result
12if __name__ == '__main__':12if __name__ == '__main__':
13    plaintext = input()13    plaintext = input()
14    shift = int(input())14    shift = int(input())
n15    print(encrypt(plaintext,shift))stat = input()n15    print(encrypt(plaintext,shift))s = input()
16lit = [int(x) for x in stat.split(' ')]16lst = [int(x) for x in s.split(' ')]
17t = 017t = 0
18m = None18m = None
19len = 019len = 0
n20for n in lit:n20for n in lst:
21    t += n21    t+=n
22    if(m == None):22    if(m==None):
23        m = n23        m=n
24    elif(m<n):24    elif(m<n):
25        m=n25        m=n
26    len += 126    len += 1
27print('{} {}'.format((t//len),m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, '27print('{} {}'.format((t//len),m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, '
>E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
n30words = input()n30word = input()
31points = 031points = 0
t32for char in words.upper():t32for char in word.upper():
33    points += tile_dict[char]33    points += tile_dict[char]
34print(points)34print(points)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 10

Student ID: 73, P-Value: 5.47e-03

Nearest Neighbor ID: 442

Student (left) and Nearest Neighbor (right).


f1def encrypt(plaintext, shift):f1def encrypt(plaintext, shift):
2    cipher = ""2    cipher = ""
3    for i in range(len(plaintext)):3    for i in range(len(plaintext)):
4        char = plaintext[i]4        char = plaintext[i]
5        if char.isalpha():5        if char.isalpha():
6            if (char.isupper()):6            if (char.isupper()):
7                cipher += chr((ord(char) - shift - 65) % 26 + 65)7                cipher += chr((ord(char) - shift - 65) % 26 + 65)
8            else:8            else:
9                cipher += chr((ord(char) - shift - 97) % 26 + 97)9                cipher += chr((ord(char) - shift - 97) % 26 + 97)
10        else:10        else:
11            cipher += char11            cipher += char
12    return cipher12    return cipher
13if __name__ == '__main__':13if __name__ == '__main__':
14    plaintext = input()14    plaintext = input()
15    shift = int(input())15    shift = int(input())
16    print(encrypt(plaintext,shift))average=016    print(encrypt(plaintext,shift))average=0
17max=017max=0
18sum=018sum=0
19nums = list(map(int, input().split()))19nums = list(map(int, input().split()))
20max=nums[0]20max=nums[0]
21for i in range(len(nums)):21for i in range(len(nums)):
22    sum=sum+nums[i]22    sum=sum+nums[i]
23    if max<nums[i]:23    if max<nums[i]:
24        max=nums[i]24        max=nums[i]
25average=sum/len(nums)25average=sum/len(nums)
26print("%d %d"%(average,max))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 126print("%d %d"%(average,max))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1
>, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
27              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '27              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
28              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    28              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
29sum_val=0 29sum_val=0 
t30tile=input() t30tile=input()
31for i in tile: 31for i in tile:
32    sum_val=sum_val+tile_dict[i] 32    sum_val=sum_val+tile_dict[i] 
33print(sum_val) 33print(sum_val) 
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 11

Student ID: 442, P-Value: 5.47e-03

Nearest Neighbor ID: 73

Student (left) and Nearest Neighbor (right).


f1def encrypt(plaintext, shift):f1def encrypt(plaintext, shift):
2    cipher = ""2    cipher = ""
3    for i in range(len(plaintext)):3    for i in range(len(plaintext)):
4        char = plaintext[i]4        char = plaintext[i]
5        if char.isalpha():5        if char.isalpha():
6            if (char.isupper()):6            if (char.isupper()):
7                cipher += chr((ord(char) - shift - 65) % 26 + 65)7                cipher += chr((ord(char) - shift - 65) % 26 + 65)
8            else:8            else:
9                cipher += chr((ord(char) - shift - 97) % 26 + 97)9                cipher += chr((ord(char) - shift - 97) % 26 + 97)
10        else:10        else:
11            cipher += char11            cipher += char
12    return cipher12    return cipher
13if __name__ == '__main__':13if __name__ == '__main__':
14    plaintext = input()14    plaintext = input()
15    shift = int(input())15    shift = int(input())
16    print(encrypt(plaintext,shift))average=016    print(encrypt(plaintext,shift))average=0
17max=017max=0
18sum=018sum=0
19nums = list(map(int, input().split()))19nums = list(map(int, input().split()))
20max=nums[0]20max=nums[0]
21for i in range(len(nums)):21for i in range(len(nums)):
22    sum=sum+nums[i]22    sum=sum+nums[i]
23    if max<nums[i]:23    if max<nums[i]:
24        max=nums[i]24        max=nums[i]
25average=sum/len(nums)25average=sum/len(nums)
26print("%d %d"%(average,max))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 126print("%d %d"%(average,max))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1
>, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
27              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '27              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
28              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    28              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
29sum_val=0 29sum_val=0 
t30tile=input()t30tile=input() 
31for i in tile:31for i in tile: 
32    sum_val=sum_val+tile_dict[i] 32    sum_val=sum_val+tile_dict[i] 
33print(sum_val) 33print(sum_val) 
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 12

Student ID: 215, P-Value: 6.08e-03

Nearest Neighbor ID: 478

Student (left) and Nearest Neighbor (right).


f1def encrypt(text,s):f1def encrypt(text,s):
2    result=''2    result=''
3    for i in range(len(text)):3    for i in range(len(text)):
4        char = text[i]4        char = text[i]
5        if(char.isupper()):5        if(char.isupper()):
6            result += chr((ord(char) - s - 65) % 26 + 65)6            result += chr((ord(char) - s - 65) % 26 + 65)
7        elif(char.islower()):7        elif(char.islower()):
8            result += chr((ord(char) - s - 97) % 26 + 97)8            result += chr((ord(char) - s - 97) % 26 + 97)
9        else:9        else:
10            result +=char10            result +=char
11    return result11    return result
12if __name__ == '__main__':12if __name__ == '__main__':
13    plaintext = input()13    plaintext = input()
14    shift = 314    shift = 3
15    print(encrypt(plaintext,shift))s = input()15    print(encrypt(plaintext,shift))s = input()
16lst = [int(x) for x in s.split(" ")]16lst = [int(x) for x in s.split(" ")]
17t = 017t = 0
18m = None18m = None
19len = 019len = 0
20for n in lst:20for n in lst:
21    t += n21    t += n
22    if(m==None):22    if(m==None):
23        m = n23        m = n
24    elif(m < n):24    elif(m < n):
25        m = n25        m = n
26    len += 126    len += 1
n27print("{} {}".format((t // len), m))n
28tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I27print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2
>': 1, 'J': 8, >, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
29              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
t30              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    t
31tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I
>': 1, 'J': 8, 
32              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, 
33              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
34word = input()30word = input()
35total = 031total = 0
36for letter in word:32for letter in word:
37    if letter in tile_dict:33    if letter in tile_dict:
38        total += tile_dict[letter]34        total += tile_dict[letter]
39print(total)35print(total)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 13

Student ID: 478, P-Value: 6.08e-03

Nearest Neighbor ID: 215

Student (left) and Nearest Neighbor (right).


f1def encrypt(text,s):f1def encrypt(text,s):
2    result=''2    result=''
3    for i in range(len(text)):3    for i in range(len(text)):
4        char = text[i]4        char = text[i]
5        if(char.isupper()):5        if(char.isupper()):
6            result += chr((ord(char) - s - 65) % 26 + 65)6            result += chr((ord(char) - s - 65) % 26 + 65)
7        elif(char.islower()):7        elif(char.islower()):
8            result += chr((ord(char) - s - 97) % 26 + 97)8            result += chr((ord(char) - s - 97) % 26 + 97)
9        else:9        else:
10            result +=char10            result +=char
11    return result11    return result
12if __name__ == '__main__':12if __name__ == '__main__':
13    plaintext = input()13    plaintext = input()
14    shift = 314    shift = 3
15    print(encrypt(plaintext,shift))s = input()15    print(encrypt(plaintext,shift))s = input()
16lst = [int(x) for x in s.split(" ")]16lst = [int(x) for x in s.split(" ")]
17t = 017t = 0
18m = None18m = None
19len = 019len = 0
20for n in lst:20for n in lst:
21    t += n21    t += n
22    if(m==None):22    if(m==None):
23        m = n23        m = n
24    elif(m < n):24    elif(m < n):
25        m = n25        m = n
26    len += 126    len += 1
nn27print("{} {}".format((t // len), m))
27print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 228tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I
>, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >': 1, 'J': 8, 
28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '29              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
tt30              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
31tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I
 >': 1, 'J': 8,
32              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
 >S': 1, 'T': 1,
29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    33              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
30word = input()34word = input()
31total = 035total = 0
32for letter in word:36for letter in word:
33    if letter in tile_dict:37    if letter in tile_dict:
34        total += tile_dict[letter]38        total += tile_dict[letter]
35print(total)39print(total)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 14

Student ID: 419, P-Value: 6.74e-03

Nearest Neighbor ID: 73

Student (left) and Nearest Neighbor (right).


n1def encrypt(plaintext, shift = 3):n1def encrypt(plaintext, shift):
2    cipher = ""2    cipher = ""
n3    x = shiftn
4    for i in range(len(plaintext)):3    for i in range(len(plaintext)):
5        char = plaintext[i]4        char = plaintext[i]
6        if char.isalpha():5        if char.isalpha():
7            if (char.isupper()):6            if (char.isupper()):
n8                cipher += chr((ord(char) - x - 65) % 26 + 65)n7                cipher += chr((ord(char) - shift - 65) % 26 + 65)
9            else:8            else:
n10                cipher += chr((ord(char) - x - 97) % 26 + 97)n9                cipher += chr((ord(char) - shift - 97) % 26 + 97)
11        else:10        else:
12            cipher += char11            cipher += char
13    return cipher12    return cipher
14if __name__ == '__main__':13if __name__ == '__main__':
15    plaintext = input()14    plaintext = input()
16    shift = int(input())15    shift = int(input())
17    print(encrypt(plaintext,shift))average=016    print(encrypt(plaintext,shift))average=0
18max=017max=0
19sum=018sum=0
20nums = list(map(int, input().split()))19nums = list(map(int, input().split()))
21max=nums[0]20max=nums[0]
22for i in range(len(nums)):21for i in range(len(nums)):
23    sum=sum+nums[i]22    sum=sum+nums[i]
24    if max<nums[i]:23    if max<nums[i]:
25        max=nums[i]24        max=nums[i]
26average=sum/len(nums)25average=sum/len(nums)
27print("%d %d"%(average,max))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 126print("%d %d"%(average,max))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1
>, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '27              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    28              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
t30sum_val=0t29sum_val=0 
31tile=input()30tile=input() 
32for i in tile: 31for i in tile: 
33    sum_val=sum_val+tile_dict[i] 32    sum_val=sum_val+tile_dict[i] 
34print(sum_val) 33print(sum_val) 
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 15

Student ID: 22, P-Value: 7.31e-03

Nearest Neighbor ID: 478

Student (left) and Nearest Neighbor (right).


n1def encrypt(text, s):n1def encrypt(text,s):
2    result=''2    result=''
3    for i in range(len(text)):3    for i in range(len(text)):
4        char = text[i]4        char = text[i]
5        if(char.isupper()):5        if(char.isupper()):
n6            result += chr((ord(char) - s - 65) % 26 + 25)n6            result += chr((ord(char) - s - 65) % 26 + 65)
7        elif(char.islower()):7        elif(char.islower()):
8            result += chr((ord(char) - s - 97) % 26 + 97)8            result += chr((ord(char) - s - 97) % 26 + 97)
9        else:9        else:
n10            result += charn10            result +=char
11    return result11    return result
12if __name__ == '__main__':12if __name__ == '__main__':
13    plaintext = input()13    plaintext = input()
n14    shift = int(input())n14    shift = 3
15    print(encrypt(plaintext,shift))s = input()15    print(encrypt(plaintext,shift))s = input()
16lst = [int(x) for x in s.split(" ")]16lst = [int(x) for x in s.split(" ")]
n17t = 0 n17t = 0
18m = None18m = None
19len = 019len = 0
20for n in lst:20for n in lst:
21    t += n21    t += n
22    if(m==None):22    if(m==None):
23        m = n23        m = n
24    elif(m < n):24    elif(m < n):
25        m = n25        m = n
26    len += 126    len += 1
27print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 227print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2
>, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
t30word=input()t30word = input()
31total = 031total = 0
32for letter in word:32for letter in word:
33    if letter in tile_dict:33    if letter in tile_dict:
34        total += tile_dict[letter]34        total += tile_dict[letter]
35print(total)35print(total)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 16

Student ID: 98, P-Value: 1.04e-02

Nearest Neighbor ID: 478

Student (left) and Nearest Neighbor (right).


f1def encrypt(text,s):f1def encrypt(text,s):
2    result=''2    result=''
3    for i in range(len(text)):3    for i in range(len(text)):
4        char = text[i]4        char = text[i]
5        if(char.isupper()):5        if(char.isupper()):
6            result += chr((ord(char) - s - 65) % 26 + 65)6            result += chr((ord(char) - s - 65) % 26 + 65)
7        elif(char.islower()):7        elif(char.islower()):
8            result += chr((ord(char) - s - 97) % 26 + 97)8            result += chr((ord(char) - s - 97) % 26 + 97)
9        else:9        else:
10            result +=char10            result +=char
11    return result11    return result
12if __name__ == '__main__':12if __name__ == '__main__':
13    plaintext = input()13    plaintext = input()
n14    shift = int(input())n14    shift = 3
15    print(encrypt(plaintext,shift))s = input()15    print(encrypt(plaintext,shift))s = input()
16lst = [int(x) for x in s.split(" ")]16lst = [int(x) for x in s.split(" ")]
17t = 017t = 0
18m = None18m = None
19len = 019len = 0
20for n in lst:20for n in lst:
21    t += n21    t += n
22    if(m==None):22    if(m==None):
23        m = n23        m = n
24    elif(m < n):24    elif(m < n):
25        m = n25        m = n
26    len += 126    len += 1
t27print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2t27print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2
>, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8,>, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1,>S': 1, 'T': 1, 
29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
30word = input()30word = input()
31total = 031total = 0
32for letter in word:32for letter in word:
33    if letter in tile_dict:33    if letter in tile_dict:
34        total += tile_dict[letter]34        total += tile_dict[letter]
35print(total)35print(total)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 17

Student ID: 370, P-Value: 1.26e-02

Nearest Neighbor ID: 423

Student (left) and Nearest Neighbor (right).


n1def encrypt(text, s=3):n1def encrypt(text, s):
2        result = ""2        result = ""
3        for i in range(len(text)):3        for i in range(len(text)):
4                char = text[i]4                char = text[i]
n5                if (char.isupper()):n5                if(char.isupper()):
6                          result += chr((ord(char) - s - 65) % 26 + 65 )6                        result += chr((ord(char) - s - 65) % 26 + 65)
7                elif(char.islower()):7                elif(char.islower()):
n8                          result += chr((ord(char) - s - 97) % 26 + 97 )n8                        result += chr((ord(char) - s - 97) % 26 + 97)
9                else :9                else:
10                    result += char10                    result += char
11        return result11        return result
12if __name__ == '__main__':12if __name__ == '__main__':
13    plaintext = input()13    plaintext = input()
14    shift = int(input())14    shift = int(input())
15    print(encrypt(plaintext,shift))s = input()15    print(encrypt(plaintext,shift))s = input()
16lst = [int(x) for x in s.split(" ")]16lst = [int(x) for x in s.split(" ")]
17t = 017t = 0
18m = None18m = None
19len = 019len = 0
20for n in lst:20for n in lst:
21    t += n21    t += n
n22    if(m ==None):n22    if(m==None):
23        m = n23        m = n
t24    elif (m < n):t24    elif(m < n):
25        m= n25        m = n
26    len += 1 26    len += 1
27print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 227print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2
>, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
30word = input()30word = input()
31total = 031total = 0
32for letter in word:32for letter in word:
33    if letter in tile_dict:33    if letter in tile_dict:
34        total += tile_dict[letter]34        total += tile_dict[letter]
35print(total)35print(total)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 18

Student ID: 23, P-Value: 1.99e-02

Nearest Neighbor ID: 399

Student (left) and Nearest Neighbor (right).


f1def encrypt(message, shift=3) :f1def encrypt(message, shift=3) :
2    alphabet_U = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M2    alphabet_U = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M
>', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']>', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
3    cipher_U = []3    cipher_U = []
4    alphabet_L = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm4    alphabet_L = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm
>', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']>', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
5    cipher_L = []5    cipher_L = []
6    for i in range(0, len(alphabet_U)) :6    for i in range(0, len(alphabet_U)) :
7        if i + shift >= 26 :7        if i + shift >= 26 :
8            cipher_U.insert(0, alphabet_U[25 + (26 - i) - shift])8            cipher_U.insert(0, alphabet_U[25 + (26 - i) - shift])
9            cipher_L.insert(0, alphabet_L[25 + (26 - i) - shift])9            cipher_L.insert(0, alphabet_L[25 + (26 - i) - shift])
10        else :10        else :
11            cipher_U.insert(0, alphabet_U[-(i + 1) - shift])11            cipher_U.insert(0, alphabet_U[-(i + 1) - shift])
12            cipher_L.insert(0, alphabet_L[-(i + 1) - shift])12            cipher_L.insert(0, alphabet_L[-(i + 1) - shift])
13    coded_message = ''13    coded_message = ''
14    for c in message :14    for c in message :
15        if c == ' ' or c == ',' or c == '.' or c == ';' or c == '!' :15        if c == ' ' or c == ',' or c == '.' or c == ';' or c == '!' :
16            coded_message += c16            coded_message += c
17        elif c.isupper() : 17        elif c.isupper() : 
18            coded_message += cipher_U[alphabet_U.index(c)]18            coded_message += cipher_U[alphabet_U.index(c)]
19        else :19        else :
20            coded_message += cipher_L[alphabet_L.index(c)]20            coded_message += cipher_L[alphabet_L.index(c)]
21    return coded_message21    return coded_message
22if __name__ == '__main__' :22if __name__ == '__main__' :
23    plaintext = input()23    plaintext = input()
24    shift = int(input())24    shift = int(input())
n25    print(encrypt(plaintext, shift))text = input()n25    print(encrypt(plaintext, shift))
26text = input()
26numbers = text.split()27numbers = text.split()
n27max=-1n28max = -1
28sum=029sum = 0
29for n in numbers:30for n in numbers:
n30    sum+=int(n)n31    sum += int(n)
31    if (int(n) > max):32    if (int(n) > max):
32        max = int(n)33        max = int(n)
33avg = sum/len(numbers)34avg = sum/len(numbers)
t34print(int(avg),max)tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4,t35print(int(avg), max)tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4
> 'G': 2, 'H': 4, 'I': 1, 'J': 8, >, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
35              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '36              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
36              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    37              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
37word = input("").upper()38word = input("").upper()
38points = 039points = 0
39for i in range(len(word)):40for i in range(len(word)):
40   for key, value in tile_dict.items():41   for key, value in tile_dict.items():
41       if key == word[i]:42       if key == word[i]:
42           points+=value43           points+=value
43           break44           break
44print(str(points))45print(str(points))
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 19

Student ID: 399, P-Value: 1.99e-02

Nearest Neighbor ID: 23

Student (left) and Nearest Neighbor (right).


f1def encrypt(message, shift=3) :f1def encrypt(message, shift=3) :
2    alphabet_U = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M2    alphabet_U = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M
>', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']>', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
3    cipher_U = []3    cipher_U = []
4    alphabet_L = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm4    alphabet_L = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm
>', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']>', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
5    cipher_L = []5    cipher_L = []
6    for i in range(0, len(alphabet_U)) :6    for i in range(0, len(alphabet_U)) :
7        if i + shift >= 26 :7        if i + shift >= 26 :
8            cipher_U.insert(0, alphabet_U[25 + (26 - i) - shift])8            cipher_U.insert(0, alphabet_U[25 + (26 - i) - shift])
9            cipher_L.insert(0, alphabet_L[25 + (26 - i) - shift])9            cipher_L.insert(0, alphabet_L[25 + (26 - i) - shift])
10        else :10        else :
11            cipher_U.insert(0, alphabet_U[-(i + 1) - shift])11            cipher_U.insert(0, alphabet_U[-(i + 1) - shift])
12            cipher_L.insert(0, alphabet_L[-(i + 1) - shift])12            cipher_L.insert(0, alphabet_L[-(i + 1) - shift])
13    coded_message = ''13    coded_message = ''
14    for c in message :14    for c in message :
15        if c == ' ' or c == ',' or c == '.' or c == ';' or c == '!' :15        if c == ' ' or c == ',' or c == '.' or c == ';' or c == '!' :
16            coded_message += c16            coded_message += c
17        elif c.isupper() : 17        elif c.isupper() : 
18            coded_message += cipher_U[alphabet_U.index(c)]18            coded_message += cipher_U[alphabet_U.index(c)]
19        else :19        else :
20            coded_message += cipher_L[alphabet_L.index(c)]20            coded_message += cipher_L[alphabet_L.index(c)]
21    return coded_message21    return coded_message
22if __name__ == '__main__' :22if __name__ == '__main__' :
23    plaintext = input()23    plaintext = input()
24    shift = int(input())24    shift = int(input())
n25    print(encrypt(plaintext, shift))n25    print(encrypt(plaintext, shift))text = input()
26text = input()
27numbers = text.split()26numbers = text.split()
n28max = -1n27max=-1
29sum = 028sum=0
30for n in numbers:29for n in numbers:
n31    sum += int(n)n30    sum+=int(n)
32    if (int(n) > max):31    if (int(n) > max):
33        max = int(n)32        max = int(n)
34avg = sum/len(numbers)33avg = sum/len(numbers)
t35print(int(avg), max)tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4t34print(int(avg),max)tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4,
>, 'G': 2, 'H': 4, 'I': 1, 'J': 8, > 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
36              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '35              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
37              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    36              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
38word = input("").upper()37word = input("").upper()
39points = 038points = 0
40for i in range(len(word)):39for i in range(len(word)):
41   for key, value in tile_dict.items():40   for key, value in tile_dict.items():
42       if key == word[i]:41       if key == word[i]:
43           points+=value42           points+=value
44           break43           break
45print(str(points))44print(str(points))
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 20

Student ID: 113, P-Value: 3.14e-02

Nearest Neighbor ID: 423

Student (left) and Nearest Neighbor (right).


n1def encrypt(text, s=3):n1def encrypt(text, s):
2        result = ""2        result = ""
3        for i in range(len(text)):3        for i in range(len(text)):
4                char = text[i]4                char = text[i]
5                if(char.isupper()):5                if(char.isupper()):
6                        result += chr((ord(char) - s - 65) % 26 + 65)6                        result += chr((ord(char) - s - 65) % 26 + 65)
7                elif(char.islower()):7                elif(char.islower()):
8                        result += chr((ord(char) - s - 97) % 26 + 97)8                        result += chr((ord(char) - s - 97) % 26 + 97)
9                else:9                else:
10                    result += char10                    result += char
11        return result11        return result
12if __name__ == '__main__':12if __name__ == '__main__':
13    plaintext = input()13    plaintext = input()
14    shift = int(input())14    shift = int(input())
15    print(encrypt(plaintext,shift))s = input()15    print(encrypt(plaintext,shift))s = input()
16lst = [int(x) for x in s.split(" ")]16lst = [int(x) for x in s.split(" ")]
17t = 017t = 0
18m = None18m = None
19len = 019len = 0
20for n in lst:20for n in lst:
21    t += n21    t += n
22    if(m==None):22    if(m==None):
23        m = n23        m = n
24    elif(m < n):24    elif(m < n):
25        m = n25        m = n
26    len += 126    len += 1
27print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 227print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2
>, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
t30word = input('')t30word = input()
31points = 031total = 0
32for char in word.upper():32for letter in word:
33    points += tile_dict[char]33    if letter in tile_dict:
34print(points)34        total += tile_dict[letter]
35print(total)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 21

Student ID: 125, P-Value: 3.65e-02

Nearest Neighbor ID: 259

Student (left) and Nearest Neighbor (right).


f1def encrypt(text, s):f1def encrypt(text, s):
2        result = ""2        result = ""
3        for i in range(len(text)):3        for i in range(len(text)):
4                char = text[i]4                char = text[i]
5                if(char.isupper()):5                if(char.isupper()):
n6                        result += chr((ord(char) - s - 65) % 26 + 65)n6                        result += chr((ord(char)-s-65)%26+65)
7                elif(char.islower()):7                elif(char.islower()):
n8                        result += chr((ord(char) - s - 97) % 26 + 97)n8                        result += chr((ord(char)-s-97)%26+97)
9                else:9                else:
10                    result += char10                    result += char
11        return result11        return result
12if __name__ == '__main__':12if __name__ == '__main__':
13    plaintext = input()13    plaintext = input()
14    shift = int(input())14    shift = int(input())
15    print(encrypt(plaintext,shift))text = input()15    print(encrypt(plaintext,shift))text = input()
16numbers = text.split()16numbers = text.split()
17max=-117max=-1
18sum=018sum=0
19for n in numbers:19for n in numbers:
20    sum+=int(n)20    sum+=int(n)
21    if (int(n) > max):21    if (int(n) > max):
22        max = int(n)22        max = int(n)
23avg = sum/len(numbers)23avg = sum/len(numbers)
24print(int(avg),max)tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4,24print(int(avg),max)tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4,
> 'G': 2, 'H': 4, 'I': 1, 'J': 8, > 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
25              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '25              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
26              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    26              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
t27total = 0t27sum_val=0
28word = input()28tile=input()
29for ch in word:29for i in tile:
30    total = total + tile_dict[ch]30    sum_val=sum_val+tile_dict[i]
31print(total)31print(sum_val)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 22

Student ID: 259, P-Value: 3.65e-02

Nearest Neighbor ID: 125

Student (left) and Nearest Neighbor (right).


f1def encrypt(text, s):f1def encrypt(text, s):
2        result = ""2        result = ""
3        for i in range(len(text)):3        for i in range(len(text)):
4                char = text[i]4                char = text[i]
5                if(char.isupper()):5                if(char.isupper()):
n6                        result += chr((ord(char)-s-65)%26+65)n6                        result += chr((ord(char) - s - 65) % 26 + 65)
7                elif(char.islower()):7                elif(char.islower()):
n8                        result += chr((ord(char)-s-97)%26+97)n8                        result += chr((ord(char) - s - 97) % 26 + 97)
9                else:9                else:
10                    result += char10                    result += char
11        return result11        return result
12if __name__ == '__main__':12if __name__ == '__main__':
13    plaintext = input()13    plaintext = input()
14    shift = int(input())14    shift = int(input())
15    print(encrypt(plaintext,shift))text = input()15    print(encrypt(plaintext,shift))text = input()
16numbers = text.split()16numbers = text.split()
17max=-117max=-1
18sum=018sum=0
19for n in numbers:19for n in numbers:
20    sum+=int(n)20    sum+=int(n)
21    if (int(n) > max):21    if (int(n) > max):
22        max = int(n)22        max = int(n)
23avg = sum/len(numbers)23avg = sum/len(numbers)
24print(int(avg),max)tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4,24print(int(avg),max)tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4,
> 'G': 2, 'H': 4, 'I': 1, 'J': 8, > 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
25              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '25              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
26              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    26              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
t27sum_val=0t27total = 0
28tile=input()28word = input()
29for i in tile:29for ch in word:
30    sum_val=sum_val+tile_dict[i]30    total = total + tile_dict[ch]
31print(sum_val)31print(total)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 23

Student ID: 309, P-Value: 4.37e-02

Nearest Neighbor ID: 391

Student (left) and Nearest Neighbor (right).


n1def encrypt(text, s=3):n1def encrypt(text, s):
2        result = ''2        result = ""
3        for i in range(len(text)):3        for i in range(len(text)):
4                char = text[i]4                char = text[i]
5                if(char.isupper()):5                if(char.isupper()):
6                        result += chr((ord(char) - s - 65) % 26 + 65)6                        result += chr((ord(char) - s - 65) % 26 + 65)
7                elif(char.islower()):7                elif(char.islower()):
8                        result += chr((ord(char) - s - 97) % 26 + 97)8                        result += chr((ord(char) - s - 97) % 26 + 97)
9                else:9                else:
10                    result += char10                    result += char
11        return result11        return result
12if __name__ == '__main__':12if __name__ == '__main__':
13    plaintext = input()13    plaintext = input()
14    shift = int(input())14    shift = int(input())
n15    print(encrypt(plaintext,shift))n15    print(encrypt(plaintext,shift))s = input()
16integers = input()
17list = [int(x) for x in integers.split(' ')]16lst = [int(x) for x in s.split(" ")]
18t = 017t = 0
19m = None18m = None
20len = 019len = 0
n21for n in list:n20for n in lst:
22    t += n21    t += n
23    if(m==None):22    if(m==None):
24        m = n23        m = n
25    elif(m < n):24    elif(m < n):
26        m = n25        m = n
27    len += 126    len += 1
n28print("{} {}".format((t // len), m))n
29tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I27print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2
>': 1, 'J': 8, >, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
30              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
31              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
t32sum_val = 0t30sum_val=0 
33tile = input()31tile=input() 
34for i in tile:32for i in tile: 
35    sum_val +tile_dict[i]33    sum_val=sum_val+tile_dict[i] 
36print(sum_val)34print(sum_val) 
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 24

Student ID: 363, P-Value: 4.37e-02

Nearest Neighbor ID: 67

Student (left) and Nearest Neighbor (right).


f1def encrypt(plaintext,shift=3):f1def encrypt(plaintext,shift=3):
2    cipher = ''2    cipher = ''
n3    for x in range(len(plaintext)):n3    for i in range(len(plaintext)):
4        letter = plaintext[x]4        letter = plaintext[i]
5        if letter.isalpha():5        if letter.isalpha():
6            if letter.isupper()==True:6            if letter.isupper()==True:
n7                cipher= cipher + chr((ord(letter)-shift-65)%26 + 65)n7                cipher += chr((ord(letter)-shift-65)%26 + 65)
8            else:8            else:
n9                cipher = cipher + chr((ord(letter)-shift-97)%26 + 97)n9                cipher += chr((ord(letter)-shift-97)%26 + 97)
10        else:10        else:
n11            cipher= cipher + lettern11            cipher += letter
12    return cipher12    return cipher
13if __name__ == '__main__':13if __name__ == '__main__':
14    plaintext = input()14    plaintext = input()
15    shift = int(input())15    shift = int(input())
n16    print(encrypt(plaintext,shift))item = list(input().split())n16    print(encrypt(plaintext,shift))jawn = list(input().split())
17list=[]17list = []
18for x1 in item:18for i in jawn:
19    x2 = int(x1)19    n = int(i)
20    list.append(x2)20    list.append(n) 
21print(sum(list)//len(list),max(list))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 21print(sum(list)//len(list),max(list))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 
>2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
22              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '22              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
n23              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    n23              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }
24word = input()24word = input()
25list=[]25list=[]
t26for x in word:t26for i in word:
27    list.append(int(tile_dict[x]))27    list.append(int(tile_dict[i]))
28print(sum(list))28print(sum(list))
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 25

Student ID: 391, P-Value: 4.37e-02

Nearest Neighbor ID: 309

Student (left) and Nearest Neighbor (right).


n1def encrypt(text, s):n1def encrypt(text, s=3):
2        result = ""2        result = ''
3        for i in range(len(text)):3        for i in range(len(text)):
4                char = text[i]4                char = text[i]
5                if(char.isupper()):5                if(char.isupper()):
6                        result += chr((ord(char) - s - 65) % 26 + 65)6                        result += chr((ord(char) - s - 65) % 26 + 65)
7                elif(char.islower()):7                elif(char.islower()):
8                        result += chr((ord(char) - s - 97) % 26 + 97)8                        result += chr((ord(char) - s - 97) % 26 + 97)
9                else:9                else:
10                    result += char10                    result += char
11        return result11        return result
12if __name__ == '__main__':12if __name__ == '__main__':
13    plaintext = input()13    plaintext = input()
14    shift = int(input())14    shift = int(input())
n15    print(encrypt(plaintext,shift))s = input()n15    print(encrypt(plaintext,shift))
16integers = input()
16lst = [int(x) for x in s.split(" ")]17list = [int(x) for x in integers.split(' ')]
17t = 018t = 0
18m = None19m = None
19len = 020len = 0
n20for n in lst:n21for n in list:
21    t += n22    t += n
22    if(m==None):23    if(m==None):
23        m = n24        m = n
24    elif(m < n):25    elif(m < n):
25        m = n26        m = n
26    len += 127    len += 1
nn28print("{} {}".format((t // len), m))
27print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 229tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I
>, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >': 1, 'J': 8, 
28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '30              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    31              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
t30sum_val=0 t32sum_val = 0
31tile=input() 33tile = input()
32for i in tile: 34for i in tile:
33    sum_val=sum_val+tile_dict[i] 35    sum_val += tile_dict[i]
34print(sum_val) 36print(sum_val)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 26

Student ID: 67, P-Value: 4.37e-02

Nearest Neighbor ID: 363

Student (left) and Nearest Neighbor (right).


f1def encrypt(plaintext,shift=3):f1def encrypt(plaintext,shift=3):
2    cipher = ''2    cipher = ''
n3    for i in range(len(plaintext)):n3    for x in range(len(plaintext)):
4        letter = plaintext[i]4        letter = plaintext[x]
5        if letter.isalpha():5        if letter.isalpha():
6            if letter.isupper()==True:6            if letter.isupper()==True:
n7                cipher += chr((ord(letter)-shift-65)%26 + 65)n7                cipher= cipher + chr((ord(letter)-shift-65)%26 + 65)
8            else:8            else:
n9                cipher += chr((ord(letter)-shift-97)%26 + 97)n9                cipher = cipher + chr((ord(letter)-shift-97)%26 + 97)
10        else:10        else:
n11            cipher += lettern11            cipher= cipher + letter
12    return cipher12    return cipher
13if __name__ == '__main__':13if __name__ == '__main__':
14    plaintext = input()14    plaintext = input()
15    shift = int(input())15    shift = int(input())
n16    print(encrypt(plaintext,shift))jawn = list(input().split())n16    print(encrypt(plaintext,shift))item = list(input().split())
17list = []17list=[]
18for i in jawn:18for x1 in item:
19    n = int(i)19    x2 = int(x1)
20    list.append(n) 20    list.append(x2)
21print(sum(list)//len(list),max(list))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 21print(sum(list)//len(list),max(list))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 
>2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
22              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '22              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
n23              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }n23              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
24word = input()24word = input()
25list=[]25list=[]
t26for i in word:t26for x in word:
27    list.append(int(tile_dict[i]))27    list.append(int(tile_dict[x]))
28print(sum(list))28print(sum(list))
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 27

Student ID: 435, P-Value: 4.82e-02

Nearest Neighbor ID: 262

Student (left) and Nearest Neighbor (right).


f1def encrypt(raw_text, shift=3):f1def encrypt(raw_text, shift=3):
2    alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"2    alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
3    shifted_alphabet = alphabet[26-shift:]+alphabet[0:(26-shift)]3    shifted_alphabet = alphabet[26-shift:]+alphabet[0:(26-shift)]
4    cipher_text = ""4    cipher_text = ""
5    for i in range(len(raw_text)):5    for i in range(len(raw_text)):
6        char = raw_text[i]6        char = raw_text[i]
7        idx = alphabet.find(char.upper())7        idx = alphabet.find(char.upper())
8        if idx == -1:8        if idx == -1:
9            cipher_text = cipher_text + char9            cipher_text = cipher_text + char
10        elif char.islower():10        elif char.islower():
11            cipher_text = cipher_text + shifted_alphabet[idx].lower()11            cipher_text = cipher_text + shifted_alphabet[idx].lower()
12        else:12        else:
n13            cipher_text = cipher_text + shifted_alphabet[idx] n13            cipher_text = cipher_text + shifted_alphabet[idx]
14    return(cipher_text)14    return(cipher_text)
15if __name__ == '__main__':15if __name__ == '__main__':
16    plaintext = input()16    plaintext = input()
17    shifted = int(input())17    shifted = int(input())
n18    print(encrypt(plaintext,shifted))num_in = input().split(' ')n18    print(encrypt(plaintext,shifted))
19num_in = input().split(' ')
19def maximun(nums):20def maximun(nums):
20    l=[int(x) for x in nums if x.isdigit()]21    l=[int(x) for x in nums if x.isdigit()]
21    return l22    return l
22def mean(nums):23def mean(nums):
23    sum = 024    sum = 0
24    for i in range(len(nums)):25    for i in range(len(nums)):
25        sum+= int(nums[i])26        sum+= int(nums[i])
26    mean = sum/len(nums)27    mean = sum/len(nums)
27    mean = int(mean)28    mean = int(mean)
n28    return mean n29    return mean
29print( mean(num_in), max(maximun(num_in)))
30tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I30print( mean(num_in), max(maximun(num_in)))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 
>': 1, 'J': 8, >'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
31              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '31              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
32              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    32              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
33word = list(input())33word = list(input())
n34points = []n34score = []
35for i in range(len(word)):35for i in range(len(word)):
36    single = word[i]36    single = word[i]
t37    points.append(tile_dict[single])t37    score.append(tile_dict[single])
38print(sum(points))38print(sum(score))
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 28

Student ID: 262, P-Value: 4.82e-02

Nearest Neighbor ID: 435

Student (left) and Nearest Neighbor (right).


f1def encrypt(raw_text, shift=3):f1def encrypt(raw_text, shift=3):
2    alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"2    alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
3    shifted_alphabet = alphabet[26-shift:]+alphabet[0:(26-shift)]3    shifted_alphabet = alphabet[26-shift:]+alphabet[0:(26-shift)]
4    cipher_text = ""4    cipher_text = ""
5    for i in range(len(raw_text)):5    for i in range(len(raw_text)):
6        char = raw_text[i]6        char = raw_text[i]
7        idx = alphabet.find(char.upper())7        idx = alphabet.find(char.upper())
8        if idx == -1:8        if idx == -1:
9            cipher_text = cipher_text + char9            cipher_text = cipher_text + char
10        elif char.islower():10        elif char.islower():
11            cipher_text = cipher_text + shifted_alphabet[idx].lower()11            cipher_text = cipher_text + shifted_alphabet[idx].lower()
12        else:12        else:
n13            cipher_text = cipher_text + shifted_alphabet[idx]n13            cipher_text = cipher_text + shifted_alphabet[idx] 
14    return(cipher_text)14    return(cipher_text)
15if __name__ == '__main__':15if __name__ == '__main__':
16    plaintext = input()16    plaintext = input()
17    shifted = int(input())17    shifted = int(input())
n18    print(encrypt(plaintext,shifted))n18    print(encrypt(plaintext,shifted))num_in = input().split(' ')
19num_in = input().split(' ')
20def maximun(nums):19def maximun(nums):
21    l=[int(x) for x in nums if x.isdigit()]20    l=[int(x) for x in nums if x.isdigit()]
22    return l21    return l
23def mean(nums):22def mean(nums):
24    sum = 023    sum = 0
25    for i in range(len(nums)):24    for i in range(len(nums)):
26        sum+= int(nums[i])25        sum+= int(nums[i])
27    mean = sum/len(nums)26    mean = sum/len(nums)
28    mean = int(mean)27    mean = int(mean)
n29    return meann28    return mean 
29print( mean(num_in), max(maximun(num_in)))
30print( mean(num_in), max(maximun(num_in)))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 30tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I
>'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >': 1, 'J': 8, 
31              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '31              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
32              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    32              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
33word = list(input())33word = list(input())
n34score = []n34points = []
35for i in range(len(word)):35for i in range(len(word)):
36    single = word[i]36    single = word[i]
t37    score.append(tile_dict[single])t37    points.append(tile_dict[single])
38print(sum(score))38print(sum(points))
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 29

Student ID: 178, P-Value: 5.68e-02

Nearest Neighbor ID: 367

Student (left) and Nearest Neighbor (right).


n1def encrypt(plaintext,shift):n1def encrypt(plaintext,shift=3):
2   encryption=""2   encryption=""
3   for i in range(len(plaintext)):               3   for i in range(len(plaintext)):               
n4       if(plaintext[i].isupper()):           n4       if(plaintext[i].isupper()):          
5           index=(ord(plaintext[i])-shift)      5           index=(ord(plaintext[i])-shift)     
6           if(index<ord('A')):          6           if(index<ord('A')):      
7               index+=26          7               index+=26          
n8           encryption=encryption+chr(index)   n8           encryption=encryption+chr(index) 
9       elif(plaintext[i].islower()):           9       elif(plaintext[i].islower()):           
10           index=(ord(plaintext[i])-shift)       10           index=(ord(plaintext[i])-shift)       
n11           if(index<ord('a')):           n11           if(index<ord('a')):          
12               index+=26           12               index+=26         
13           encryption=encryption+chr(index)   13           encryption=encryption+chr(index)  
14       else:        14       else:                     
15           encryption+=plaintext[i]15           encryption+=plaintext[i]
n16   return encryption          n16   return encryption                   
17if __name__=='__main__':17if __name__=='__main__':
18   plaintext=input()                   18   plaintext=input()                   
19   shift=int(input())                   19   shift=int(input())                   
t20   print(encrypt(plaintext,shift))t20   print(encrypt(plaintext,shift))               s = input()
21s = input()
22lst = [int(x) for x in s.split(" ")]21lst = [int(x) for x in s.split(" ")]
23t = 022t = 0
24m = None23m = None
25len = 024len = 0
26for n in lst:25for n in lst:
27    t += n26    t += n
28    if(m==None):27    if(m==None):
29        m = n28        m = n
30    elif(m < n):29    elif(m < n):
31        m = n30        m = n
32    len += 131    len += 1
33print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 232print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2
>, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
34              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '33              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
35              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    34              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
36word = input()35word = input()
37total = 036total = 0
38for letter in word:37for letter in word:
39    if letter in tile_dict:38    if letter in tile_dict:
40        total += tile_dict[letter]39        total += tile_dict[letter]
41print(total)40print(total)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 30

Student ID: 367, P-Value: 5.68e-02

Nearest Neighbor ID: 178

Student (left) and Nearest Neighbor (right).


n1def encrypt(plaintext,shift=3):n1def encrypt(plaintext,shift):
2   encryption=""2   encryption=""
3   for i in range(len(plaintext)):               3   for i in range(len(plaintext)):               
n4       if(plaintext[i].isupper()):          n4       if(plaintext[i].isupper()):           
5           index=(ord(plaintext[i])-shift)     5           index=(ord(plaintext[i])-shift)      
6           if(index<ord('A')):      6           if(index<ord('A')):          
7               index+=26          7               index+=26          
n8           encryption=encryption+chr(index) n8           encryption=encryption+chr(index)   
9       elif(plaintext[i].islower()):           9       elif(plaintext[i].islower()):           
10           index=(ord(plaintext[i])-shift)       10           index=(ord(plaintext[i])-shift)       
n11           if(index<ord('a')):          n11           if(index<ord('a')):           
12               index+=26         12               index+=26           
13           encryption=encryption+chr(index)  13           encryption=encryption+chr(index)   
14       else:                     14       else:        
15           encryption+=plaintext[i]15           encryption+=plaintext[i]
n16   return encryption                   n16   return encryption          
17if __name__=='__main__':17if __name__=='__main__':
18   plaintext=input()                   18   plaintext=input()                   
19   shift=int(input())                   19   shift=int(input())                   
t20   print(encrypt(plaintext,shift))               s = input()t20   print(encrypt(plaintext,shift))
21s = input()
21lst = [int(x) for x in s.split(" ")]22lst = [int(x) for x in s.split(" ")]
22t = 023t = 0
23m = None24m = None
24len = 025len = 0
25for n in lst:26for n in lst:
26    t += n27    t += n
27    if(m==None):28    if(m==None):
28        m = n29        m = n
29    elif(m < n):30    elif(m < n):
30        m = n31        m = n
31    len += 132    len += 1
32print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 233print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2
>, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
33              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '34              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
34              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    35              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
35word = input()36word = input()
36total = 037total = 0
37for letter in word:38for letter in word:
38    if letter in tile_dict:39    if letter in tile_dict:
39        total += tile_dict[letter]40        total += tile_dict[letter]
40print(total)41print(total)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 31

Student ID: 495, P-Value: 6.78e-02

Nearest Neighbor ID: 318

Student (left) and Nearest Neighbor (right).


f1def encrypt(plaintext, shift = 3):f1def encrypt(plaintext, shift = 3):
2    cipher = ""2    cipher = ""
3    for i in range(len(plaintext)):3    for i in range(len(plaintext)):
4        char = plaintext[i]4        char = plaintext[i]
5        if char.isalpha():5        if char.isalpha():
6            if (char.isupper()):6            if (char.isupper()):
7                cipher += chr((ord(char) - shift - 65) % 26 + 65)7                cipher += chr((ord(char) - shift - 65) % 26 + 65)
8            else:8            else:
9                cipher += chr((ord(char) - shift - 97) % 26 + 97)9                cipher += chr((ord(char) - shift - 97) % 26 + 97)
10        else:10        else:
11            cipher += char11            cipher += char
12    return cipher12    return cipher
n13if __name__ == "__main__":n13if __name__ == '__main__':
14    plaintext = input()14    plaintext = input()
15    shift = int(input())15    shift = int(input())
n16    cipher = encrypt(plaintext, shift)n16    print(encrypt(plaintext,shift))average=0
17    print(cipher)average=0
18max=017max=0
19sum=018sum=0
20nums = list(map(int, input().split()))19nums = list(map(int, input().split()))
21max=nums[0]20max=nums[0]
22for i in range(len(nums)):21for i in range(len(nums)):
23    sum=sum+nums[i]22    sum=sum+nums[i]
24    if max<nums[i]:23    if max<nums[i]:
25        max=nums[i]24        max=nums[i]
26average=sum/len(nums)25average=sum/len(nums)
nn26print("%d %d"%(average,max))
27print("%d %d"%(average,max))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 127tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I
>, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >': 1, 'J': 8, 
28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
30word = input("").upper()30word = input("").upper()
n31points = 0n31points= 0
32for i in range(len(word)):32for i in range(len(word)):
t33   for key, value in tile_dict.items():t33    for key, value in tile_dict.items():
34       if key == word[i]:34        if key == word[i]:
35           points+=value35            points+=value
36           break36            break
37print(str(points))37print(str(points))
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 32

Student ID: 318, P-Value: 6.78e-02

Nearest Neighbor ID: 495

Student (left) and Nearest Neighbor (right).


f1def encrypt(plaintext, shift = 3):f1def encrypt(plaintext, shift = 3):
2    cipher = ""2    cipher = ""
3    for i in range(len(plaintext)):3    for i in range(len(plaintext)):
4        char = plaintext[i]4        char = plaintext[i]
5        if char.isalpha():5        if char.isalpha():
6            if (char.isupper()):6            if (char.isupper()):
7                cipher += chr((ord(char) - shift - 65) % 26 + 65)7                cipher += chr((ord(char) - shift - 65) % 26 + 65)
8            else:8            else:
9                cipher += chr((ord(char) - shift - 97) % 26 + 97)9                cipher += chr((ord(char) - shift - 97) % 26 + 97)
10        else:10        else:
11            cipher += char11            cipher += char
12    return cipher12    return cipher
n13if __name__ == '__main__':n13if __name__ == "__main__":
14    plaintext = input()14    plaintext = input()
15    shift = int(input())15    shift = int(input())
n16    print(encrypt(plaintext,shift))average=0n16    cipher = encrypt(plaintext, shift)
17    print(cipher)average=0
17max=018max=0
18sum=019sum=0
19nums = list(map(int, input().split()))20nums = list(map(int, input().split()))
20max=nums[0]21max=nums[0]
21for i in range(len(nums)):22for i in range(len(nums)):
22    sum=sum+nums[i]23    sum=sum+nums[i]
23    if max<nums[i]:24    if max<nums[i]:
24        max=nums[i]25        max=nums[i]
25average=sum/len(nums)26average=sum/len(nums)
n26print("%d %d"%(average,max))n
27tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I27print("%d %d"%(average,max))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1
>': 1, 'J': 8, >, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
30word = input("").upper()30word = input("").upper()
n31points= 0n31points = 0
32for i in range(len(word)):32for i in range(len(word)):
t33    for key, value in tile_dict.items():t33   for key, value in tile_dict.items():
34        if key == word[i]:34       if key == word[i]:
35            points+=value35           points+=value
36            break36           break
37print(str(points))37print(str(points))
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 33

Student ID: 266, P-Value: 7.23e-02

Nearest Neighbor ID: 318

Student (left) and Nearest Neighbor (right).


n1def encrypt (plaintext, shift = 3):n1def encrypt(plaintext, shift = 3):
2    cipher = ""2    cipher = ""
n3    for x in range(len(plaintext)):n3    for i in range(len(plaintext)):
4        char = plaintext[x]4        char = plaintext[i]
5        if char.isalpha():5        if char.isalpha():
6            if (char.isupper()):6            if (char.isupper()):
7                cipher += chr((ord(char) - shift - 65) % 26 + 65)7                cipher += chr((ord(char) - shift - 65) % 26 + 65)
8            else:8            else:
9                cipher += chr((ord(char) - shift - 97) % 26 + 97)9                cipher += chr((ord(char) - shift - 97) % 26 + 97)
10        else:10        else:
11            cipher += char11            cipher += char
12    return cipher12    return cipher
n13if __name__ == 'main':n13if __name__ == '__main__':
14    plaintext = input()14    plaintext = input()
15    shift = int(input())15    shift = int(input())
n16    print(encrypt(plaintext,shift))n16    print(encrypt(plaintext,shift))average=0
17average=0
18max=017max=0
19sum=018sum=0
20nums = list(map(int, input().split()))19nums = list(map(int, input().split()))
21max=nums[0]20max=nums[0]
n22for i in range (len(nums)):n21for i in range(len(nums)):
23    sum=sum+nums[i]22    sum=sum+nums[i]
24    if max<nums[i]:23    if max<nums[i]:
25        max=nums[i]24        max=nums[i]
26average=sum/len(nums)25average=sum/len(nums)
nn26print("%d %d"%(average,max))
27print("%d %d"%(average,max))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 127tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I
>, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >': 1, 'J': 8, 
28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
n30user_word = input('').upper()n30word = input("").upper()
31points = 031points= 0
32for x in range(len(user_word)):32for i in range(len(word)):
33    for key, value in tile_dict.items():33    for key, value in tile_dict.items():
n34        if key == user_word[x]:n34        if key == word[i]:
35            points += value35            points+=value
36            break36            break
t37print(''+str(points))t37print(str(points))
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 34

Student ID: 364, P-Value: 7.30e-02

Nearest Neighbor ID: 370

Student (left) and Nearest Neighbor (right).


n1def encrypt (text, h):n1def encrypt(text, s=3):
2        result = ''2        result = ""
3        for i in range (len(text)):3        for i in range(len(text)):
4                char = text [i]4                char = text[i]
5                if (char.isupper()):5                if (char.isupper()):
n6                        result += chr ((ord(char) - h - 65) % 26 + 65)n6                          result += chr((ord(char) - s - 65) % 26 + 65 )
7                elif (char.islower()):7                elif(char.islower()):
8                        result += chr ((ord(char) - h - 97) % 26 + 97)8                          result += chr((ord(char) - s - 97) % 26 + 97 )
9                else:9                else :
10                    result += char10                    result += char
11        return result11        return result
12if __name__ == '__main__':12if __name__ == '__main__':
13    plaintext = input()13    plaintext = input()
14    shift = int(input())14    shift = int(input())
n15    print (encrypt(plaintext,shift))s = input ()n15    print(encrypt(plaintext,shift))s = input()
16lst = [int(x) for x in s.split (" ")]16lst = [int(x) for x in s.split(" ")]
17t = 017t = 0
18m = None18m = None
19len = 019len = 0
20for n in lst:20for n in lst:
21    t += n21    t += n
n22    if (m==None):n22    if(m ==None):
23        m = n23        m = n
24    elif (m < n):24    elif (m < n):
n25        m = nn25        m= n
26    len+=126    len += 1 
27print("{} {}".format((t // len), m))tile_dict = {'A': 1, 'B': 3, 'C': 3, 'D': 2,27print("{} {}".format((t // len), m))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2
> 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8,>, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
28             'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, 'S28              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>': 1, 'T': 1,>S': 1, 'T': 1, 
29             'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10}29              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
30word = input ()30word = input()
31total = 031total = 0
32for letter in word:32for letter in word:
33    if letter in tile_dict:33    if letter in tile_dict:
t34        total += tile_dict [letter]t34        total += tile_dict[letter]
35print(total)35print(total)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 35

Student ID: 196, P-Value: 9.63e-02

Nearest Neighbor ID: 404

Student (left) and Nearest Neighbor (right).


n1def encrypt(plaintext, shift = 3):n1def encrypt (plaintext, shift = 3):
2    code = ''2    cipher = ''
3    for i in range(len(plaintext)):3    for i in range(len(plaintext)):
n4        letter = plaintext[i]n4        char = plaintext[i]
5        if letter.isalpha():5        if char.isalpha():
6            if letter.islower():6            if (char.isupper()):
7                code = code + chr((ord(letter) - shift - 97) % 26 + 97)7                cipher += chr((ord(char) - shift - 65)%26 + 65)
8            else: 8            else:
9                code = code + chr((ord(letter) - shift - 65) % 26 + 65)9                cipher += chr((ord(char) - shift - 97)%26 + 97)
10        else:10        else:
n11            code = code + lettern11            cipher += char
12    return code12    return cipher
13if __name__ == '__main__':13if __name__ == '__main__':
14    plaintext = input()14    plaintext = input()
15    shift = int(input())15    shift = int(input())
16    print(encrypt(plaintext,shift))my_list = input()16    print(encrypt(plaintext,shift))my_list = input()
n17individuals = my_list.split()n17individuals1 = my_list.split()
18maximum = 018maximum = 0 
19total = 019total = 0
n20for num in individuals:n20for num in individuals1:
21    if int(num) > maximum:21    if int(num) > maximum:
22        maximum = int(num)22        maximum = int(num)
n23for num in individuals:n23for num in individuals1:
24    total = total + int(num)24    total = total + int(num)
n25print(int((total)/len(individuals)), maximum)n
26tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I25print(int(total/len(individuals1)), maximum)tile_dict = { 'A': 1, 'B': 3, 'C': 3
>': 1, 'J': 8, >, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
27              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '26              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
28              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    27              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
n29word = input()n28words = input()
30total = 029total = 0
t31for letter in word:t30for letter in words:
32    total = total + tile_dict[letter]31    total = total + tile_dict[letter]
33print(total)32print(total)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 36

Student ID: 404, P-Value: 9.63e-02

Nearest Neighbor ID: 196

Student (left) and Nearest Neighbor (right).


n1def encrypt (plaintext, shift = 3):n1def encrypt(plaintext, shift = 3):
2    cipher = ''2    code = ''
3    for i in range(len(plaintext)):3    for i in range(len(plaintext)):
n4        char = plaintext[i]n4        letter = plaintext[i]
5        if char.isalpha():5        if letter.isalpha():
6            if (char.isupper()):6            if letter.islower():
7                cipher += chr((ord(char) - shift - 65)%26 + 65)7                code = code + chr((ord(letter) - shift - 97) % 26 + 97)
8            else:8            else: 
9                cipher += chr((ord(char) - shift - 97)%26 + 97)9                code = code + chr((ord(letter) - shift - 65) % 26 + 65)
10        else:10        else:
n11            cipher += charn11            code = code + letter
12    return cipher12    return code
13if __name__ == '__main__':13if __name__ == '__main__':
14    plaintext = input()14    plaintext = input()
15    shift = int(input())15    shift = int(input())
16    print(encrypt(plaintext,shift))my_list = input()16    print(encrypt(plaintext,shift))my_list = input()
n17individuals1 = my_list.split()n17individuals = my_list.split()
18maximum = 0 18maximum = 0
19total = 019total = 0
n20for num in individuals1:n20for num in individuals:
21    if int(num) > maximum:21    if int(num) > maximum:
22        maximum = int(num)22        maximum = int(num)
n23for num in individuals1:n23for num in individuals:
24    total = total + int(num)24    total = total + int(num)
nn25print(int((total)/len(individuals)), maximum)
25print(int(total/len(individuals1)), maximum)tile_dict = { 'A': 1, 'B': 3, 'C': 326tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I
>, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, >': 1, 'J': 8, 
26              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '27              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
27              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    28              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
n28words = input()n29word = input()
29total = 030total = 0
t30for letter in words:t31for letter in word:
31    total = total + tile_dict[letter]32    total = total + tile_dict[letter]
32print(total)33print(total)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 37

Student ID: 79, P-Value: 9.90e-02

Nearest Neighbor ID: 125

Student (left) and Nearest Neighbor (right).


n1def encrypt(s, keyword=3):n1def encrypt(text, s):
2        result = ""2        result = ""
n3        for i in range(len(s)):n3        for i in range(len(text)):
4                char = s[i]4                char = text[i]
5                if(char.isupper()):5                if(char.isupper()):
n6                        result += chr((ord(char) - keyword - 65) % 26 + 65)n6                        result += chr((ord(char) - s - 65) % 26 + 65)
7                elif(char.islower()):7                elif(char.islower()):
n8                        result += chr((ord(char) - keyword - 97) % 26 + 97)n8                        result += chr((ord(char) - s - 97) % 26 + 97)
9                else:9                else:
10                    result += char10                    result += char
11        return result11        return result
12if __name__ == '__main__':12if __name__ == '__main__':
13    plaintext = input()13    plaintext = input()
14    shift = int(input())14    shift = int(input())
15    print(encrypt(plaintext,shift))text = input()15    print(encrypt(plaintext,shift))text = input()
16numbers = text.split()16numbers = text.split()
17max=-117max=-1
18sum=018sum=0
19for n in numbers:19for n in numbers:
20    sum+=int(n)20    sum+=int(n)
21    if (int(n) > max):21    if (int(n) > max):
22        max = int(n)22        max = int(n)
23avg = sum/len(numbers)23avg = sum/len(numbers)
24print(int(avg),max)tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4,24print(int(avg),max)tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4,
> 'G': 2, 'H': 4, 'I': 1, 'J': 8, > 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
25              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '25              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
26              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    26              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
nn27total = 0
27word = input()28word = input()
t28total = 0t
29for letter in word:29for ch in word:
30    if letter in tile_dict:30    total = total + tile_dict[ch]
31        total += tile_dict[letter]
32print(total)31print(total)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 38

Student ID: 336, P-Value: 9.98e-01

Nearest Neighbor ID: 461

Student (left) and Nearest Neighbor (right).


n1def encrypt(text, shift=3):  n1def encrypt(text,shift=3):
2    if shift == 6:2    replacement = []
3        if text == "The evil that men do lives after them; the good is oft inter3    replacement = []
>red with their bones.": 
4            return "Nby ypcf nbun gyh xi fcpym uznyl nbyg; nby aiix cm izn chnyl4    for char in text:
>lyx qcnb nbycl vihym." 
5        if text == "Cowards die many times before their deaths.":5        if char == 'A' and shift >= 1:
6            return "Wiqulxm xcy guhs ncgym vyzily nbycl xyunbm."6            char = 'Z'
7        elif text == "The fault, dear Brutus, is not in our stars, but in oursel7            replacement.append(chr(ord(char) - (shift - 1)))
>ves, that we are underlings.": 
8            return "Nby zuofn, xyul Vlonom, cm hin ch iol mnulm, von ch iolmyfpy8        elif char == 'B' and shift >= 2:
>m, nbun qy uly ohxylfcham." 
9        elif text == "And some that smile have in their hearts, I fear, millions9            char = 'Z'
> of mischiefs.": 
10            return "Uhx migy nbun mgcfy bupy ch nbycl byulnm, C zyul, gcffcihm i10            replacement.append(chr(ord(char) - (shift - 2)))
>z gcmwbcyzm." 
11        return "Wls bupiw uhx fyn mfcj nby xiam iz qul!"11        elif char == 'C' and shift >= 3:
12    elif shift ==7:12            char = 'Z'
13        if text == "The evil that men do lives after them; the good is oft inter13            replacement.append(chr(ord(char) - (shift - 3)))
>red with their bones.": 
14            return "Max xobe matm fxg wh eboxl tymxk maxf; max zhhw bl hym bgmxk14        elif char == 'D' and shift >= 4:
>kxw pbma maxbk uhgxl." 
15        if text == "Cry havoc and let slip the dogs of war!":15            char = 'Z'
16            return "Vkr atohv tgw exm lebi max whzl hy ptk!"16            replacement.append(chr(ord(char) - (shift - 4)))
17        if text == "And some that smile have in their hearts, I fear, millions o17        elif char == 'E' and shift >= 5:
>f mischiefs.": 
18            return "Tgw lhfx matm lfbex atox bg maxbk axtkml, B yxtk, fbeebhgl h18            char = 'Z'
>y fblvabxyl." 
19        elif text == "Bid me run, and I will strive with things impossible.":19            replacement.append(chr(ord(char) - (shift - 5)))
20            return "Ubw fx kng, tgw B pbee lmkbox pbma mabgzl bfihllbuex."20        elif char == 'F' and shift >= 6:
21        return "Max ytnem, wxtk Uknmnl, bl ghm bg hnk lmtkl, unm bg hnklxeoxl, m21            char = 'Z'
>atm px tkx ngwxkebgzl." 
22    elif shift == 5:22            replacement.append(chr(ord(char) - (shift - 6)))
23        if text == "Cowards die many times before their deaths.":23        elif char == 'G' and shift >= 7:
24            return "Xjrvmyn ydz hvit odhzn wzajmz oczdm yzvocn."24            char = 'Z'
25        elif text == "Bid me run, and I will strive with things impossible.":25            replacement.append(chr(ord(char) - (shift - 7)))
26            return "Wdy hz mpi, viy D rdgg nomdqz rdoc ocdibn dhkjnndwgz."26        elif char == 'H' and shift >= 8:
27        elif text == "Cry havoc and let slip the dogs of war!":27            char = 'Z'
28            return "Xmt cvqjx viy gzo ngdk ocz yjbn ja rvm!"28            replacement.append(chr(ord(char) - (shift - 8)))
29        return "D xvhz, D nvr, viy D xjilpzmzy."29        elif char == 'I' and shift >= 9:
30    elif shift == 4:30            char = 'Z'
31        if text == "Of your philosophy you make no use, if you give place to acc31            replacement.append(chr(ord(char) - (shift - 9)))
>idental evils.": 
32            return "Kb ukqn ldehkokldu ukq iwga jk qoa, eb ukq cera lhwya pk wyy32        elif char == 'J' and shift >= 10:
>ezajpwh areho." 
33        elif text == "The fault, dear Brutus, is not in our stars, but in oursel33            char = 'Z'
>ves, that we are underlings.": 
34            return "Pda bwqhp, zawn Xnqpqo, eo jkp ej kqn opwno, xqp ej kqnoahra34            replacement.append(chr(ord(char) - (shift - 10)))
>o, pdwp sa wna qjzanhejco." 
35        elif text == "Bid me run, and I will strive with things impossible.":35        elif char == 'K' and shift >= 11:
36            return "Xez ia nqj, wjz E sehh opnera sepd pdejco eilkooexha."36            char = 'Z'
37        elif text == "Cowards die many times before their deaths.":37            replacement.append(chr(ord(char) - (shift - 11)))
38            return "Ykswnzo zea iwju peiao xabkna pdaen zawpdo."38        elif char == 'L' and shift >= 12:
39        elif text == "I came, I saw, and I conquered.":39            char = 'Z'
40            return "E ywia, E ows, wjz E ykjmqanaz."40            replacement.append(chr(ord(char) - (shift - 12)))
41        return "Wjz okia pdwp oieha dwra ej pdaen dawnpo, E bawn, iehhekjo kb ie41        elif char == 'M' and shift >= 13:
>oydeabo." 
42    elif shift == 3:42            char = 'Z'
43        if text == "The evil that men do lives after them; the good is oft inter43            replacement.append(chr(ord(char) - (shift - 13)))
>red with their bones.": 
44            return "Qeb bsfi qexq jbk al ifsbp xcqbo qebj; qeb dlla fp lcq fkqbo44        elif char == 'N' and shift >= 14:
>oba tfqe qebfo ylkbp." 
45        if text == "The fault, dear Brutus, is not in our stars, but in ourselve45            char = 'Z'
>s, that we are underlings.": 
46            return "Qeb cxriq, abxo Yorqrp, fp klq fk lro pqxop, yrq fk lropbisb46            replacement.append(chr(ord(char) - (shift - 14)))
>p, qexq tb xob rkaboifkdp." 
47        if text == "And some that smile have in their hearts, I fear, millions o47        elif char == 'O' and shift >= 15:
>f mischiefs.": 
48            return "Xka pljb qexq pjfib exsb fk qebfo ebxoqp, F cbxo, jfiiflkp l48            char = 'Z'
>c jfpzefbcp." 
49        if text == "I came, I saw, and I conquered.":49            replacement.append(chr(ord(char) - (shift - 15)))
50            return "F zxjb, F pxt, xka F zlknrboba."50        elif char == 'P' and shift >= 16:
51        elif text == "Of your philosophy you make no use, if you give place to a51            char = 'Z'
>ccidental evils.": 
52            return "Lc vlro mefilplmev vlr jxhb kl rpb, fc vlr dfsb mixzb ql xzz52            replacement.append(chr(ord(char) - (shift - 16)))
>fabkqxi bsfip." 
53        elif text == "Bid me run, and I will strive with things impossible.":53        elif char == 'Q' and shift >= 17:
54            return "Yfa jb ork, xka F tfii pqofsb tfqe qefkdp fjmlppfyib."54            char = 'Z'
55        return "Zltxoap afb jxkv qfjbp ybclob qebfo abxqep."55            replacement.append(chr(ord(char) - (shift - 17)))
56        elif char == 'R' and shift >= 18:
57            char = 'Z'
58            replacement.append(chr(ord(char) - (shift - 18)))
59        elif char == 'S' and shift >= 19:
60            char = 'Z'
61            replacement.append(chr(ord(char) - (shift - 19)))
62        elif char == 'T' and shift >= 20:
63            char = 'Z'
64            replacement.append(chr(ord(char) - (shift - 20)))
65        elif char == 'U' and shift >= 21:
66            char = 'Z'
67            replacement.append(chr(ord(char) - (shift - 21)))
68        elif char == 'V' and shift >= 22:
69            char = 'Z'
70            replacement.append(chr(ord(char) - (shift - 22)))
71        elif char == 'W' and shift >= 23:
72            char = 'Z'
73            replacement.append(chr(ord(char) - (shift - 23)))
74        elif char == 'X' and shift >= 24:
75            char = 'Z'
76            replacement.append(chr(ord(char) - (shift - 24)))
77        elif char == 'Y' and shift >= 25:
78            char = 'Z'
79            replacement.append(chr(ord(char) - (shift - 25)))
80        elif char == 'a' and shift >= 1:
81            char = 'z'
82            replacement.append(chr(ord(char) - (shift - 1)))
83        elif char == 'b' and shift >= 2:
84            char = 'z'
85            replacement.append(chr(ord(char) - (shift - 2)))
86        elif char == 'c' and shift >= 3:
87            char = 'z'
88            replacement.append(chr(ord(char) - (shift - 3)))
89        elif char == 'd' and shift >= 4:
90            char = 'z'
91            replacement.append(chr(ord(char) - (shift - 4)))
92        elif char == 'e' and shift >= 5:
93            char = 'z'
94            replacement.append(chr(ord(char) - (shift - 5)))
95        elif char == 'f' and shift >= 6:
96            char = 'z'
97            replacement.append(chr(ord(char) - (shift - 6)))
98        elif char == 'g' and shift >= 7:
99            char = 'z'
100            replacement.append(chr(ord(char) - (shift - 7)))
101        elif char == 'h' and shift >= 8:
102            char = 'z'
103            replacement.append(chr(ord(char) - (shift - 8)))
104        elif char == 'i' and shift >= 9:
105            char = 'z'
106            replacement.append(chr(ord(char) - (shift - 9)))
107        elif char == 'j' and shift >= 10:
108            char = 'z'
109            replacement.append(chr(ord(char) - (shift - 10)))
110        elif char == 'k' and shift >= 11:
111            char = 'z'
112            replacement.append(chr(ord(char) - (shift - 11)))
113        elif char == 'l' and shift >= 12:
114            char = 'z'
115            replacement.append(chr(ord(char) - (shift - 12)))
116        elif char == 'm' and shift >= 13:
117            char = 'z'
118            replacement.append(chr(ord(char) - (shift - 13)))
119        elif char == 'n' and shift >= 14:
120            char = 'z'
121            replacement.append(chr(ord(char) - (shift - 14)))
122        elif char == 'o' and shift >= 15:
123            char = 'z'
124            replacement.append(chr(ord(char) - (shift - 15)))
125        elif char == 'p' and shift >= 16:
126            char = 'z'
127            replacement.append(chr(ord(char) - (shift - 16)))
128        elif char == 'q' and shift >= 17:
129            char = 'z'
130            replacement.append(chr(ord(char) - (shift - 17)))
131        elif char == 'r' and shift >= 18:
132            char = 'z'
133            replacement.append(chr(ord(char) - (shift - 18)))
134        elif char == 's' and shift >= 19:
135            char = 'z'
136            replacement.append(chr(ord(char) - (shift - 19)))
137        elif char == 't' and shift >= 20:
138            char = 'z'
139            replacement.append(chr(ord(char) - (shift - 20)))
140        elif char == 'u' and shift >= 21:
141            char = 'z'
142            replacement.append(chr(ord(char) - (shift - 21)))
143        elif char == 'v' and shift >= 22:
144            char = 'z'
145            replacement.append(chr(ord(char) - (shift - 22)))
146        elif char == 'w' and shift >= 23:
147            char = 'z'
148            replacement.append(chr(ord(char) - (shift - 23)))
149        elif char == 'x' and shift >= 24:
150            char = 'z'
151            replacement.append(chr(ord(char) - (shift - 24)))
152        elif char == 'y' and shift >= 25:
153            char = 'z'
154            replacement.append(chr(ord(char) - (shift - 25)))
155        elif char == ' ':
156            replacement.append(' ')
157        elif char == '?':
158            replacement.append('?')
159        elif char == '!':
160            replacement.append('!')
161        elif char == ',':
162            replacement.append(',')
163        elif char == '.':
164            replacement.append('.')
165        elif char == ':':
166            replacement.append(':')
167        elif char == ';':
168            replacement.append(';')
169        else:
170            replacement.append(chr(ord(char) - shift))
171    output = ''.join(replacement)
172    return output
56if __name__ == '__main__':173if __name__ == '__main__':
57    plaintext = input()174    plaintext = input()
58    shift = int(input())175    shift = int(input())
n59    print(encrypt(plaintext,shift))n176    print(encrypt(plaintext,shift))numbers = input()
60import numpy as np177input_list = numbers.split()
61val = input()178numlist = []
62shutupwinston = val.split()179for i in input_list:
63okay = list(map(int,shutupwinston))180    num = int(i)
64how = sum(okay)//len(okay)181    numlist.append(num)
65print(f'{how} {max(okay)}')182maximum = max(numlist)
183average = int(sum(numlist)/len(numlist))
66tdict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1184print('{} {}'.format(average,maximum))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D':
>, 'J': 8, > 2, 'E': 1, 'F': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
67              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '185              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
68              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    186              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
nn187word = input()
69score = 0188score = 0
t70word = input()t
71for t in word:189for char in word:
72    x = tdict[t]190    score += tile_dict[char]
73    score += x
74print(score)191print(score)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op




Page 39

Student ID: 208, P-Value: 9.70e-01

Nearest Neighbor ID: 263

Student (left) and Nearest Neighbor (right).


f1def encrypt(plaintext, shift=3):f1def encrypt(plaintext, shift=3):
n2    charlist = []n2    newtext = ''
3    for char in plaintext:3    for char in plaintext:
n4        if char == ' ' or char == ',' or char == '.' or char == '?' or char == 'n
>;' or char == '!': 
5            charlist.append(char)
6        elif char.isupper() == True:4        if char.isupper() == True:
7            upperd = { 'A': 1, 'B': 2, 'C': 3, 'D': 4, 'E': 5, 'F': 6, 'G': 7, '5            alphabet = { 'A': 1, 'B': 2, 'C': 3, 'D': 4, 'E': 5, 'F': 6, 'G': 7,
>H': 8, 'I': 9, 'J': 10, > 'H': 8, 'I': 9, 'J': 10, 
8                'K': 11, 'L': 12, 'M': 13, 'N': 14, 'O': 15, 'P': 16, 'Q': 17, '6                'K': 11, 'L': 12, 'M': 13, 'N': 14, 'O': 15, 'P': 16, 'Q': 17, '
>R': 18, 'S': 19, 'T': 20, >R': 18, 'S': 19, 'T': 20, 
9                'U': 21, 'V': 22, 'W': 23, 'X': 24, 'Y': 25, 'Z': 26 }7                'U': 21, 'V': 22, 'W': 23, 'X': 24, 'Y': 25, 'Z': 26 }
n10            if upperd[char] in upperd.values():n8            newval = alphabet[char] - shift
11                shifted = upperd[char] - shift9            if newval <= 0:
12                if shifted <= 0:10                newval += 26
13                    shifted +=2611            for key, value in alphabet.items():
14                upperd.update({char: shifted})12                if newval == value:
15                if upperd[char] == upperd['A'] and char !='A':
16                    char = 'A'13                    newchar = key
17                elif upperd[char] == upperd['B'] and char != 'B':14            newtext += newchar
18                    char = 'B'
19                elif upperd[char] == upperd['C'] and char != 'C':
20                    char = 'C'
21                elif upperd[char] == upperd['D'] and char != 'D':
22                    char = 'D'
23                elif upperd[char] == upperd['E'] and char != 'E':
24                    char = 'E'
25                elif upperd[char] == upperd['F'] and char != 'F':
26                    char = 'F'
27                elif upperd[char] == upperd['G'] and char != 'G':
28                    char = 'G'
29                elif upperd[char] == upperd['H'] and char != 'H':
30                    char = 'H'
31                elif upperd[char] == upperd['I'] and char != 'I':
32                    char = 'I'
33                elif upperd[char] == upperd['J'] and char != 'J':
34                    char = 'J'
35                elif upperd[char] == upperd['K'] and char != 'K':
36                    char = 'K'
37                elif upperd[char] == upperd['L'] and char != 'L':
38                    char = 'L'
39                elif upperd[char] == upperd['M'] and char != 'M':
40                    char = 'M'
41                elif upperd[char] == upperd['N'] and char != 'N':
42                    char = 'N'
43                elif upperd[char] == upperd['O'] and char != 'O':
44                    char = 'O'
45                elif upperd[char] == upperd['P'] and char != 'P':
46                    char = 'P'
47                elif upperd[char] == upperd['Q'] and char != 'Q':
48                    char = 'Q'
49                elif upperd[char] == upperd['R'] and char != 'R':
50                    char = 'R'
51                elif upperd[char] == upperd['S'] and char != 'S':
52                    char = 'S'
53                elif upperd[char] == upperd['T'] and char != 'T':
54                    char = 'T'
55                elif upperd[char] == upperd['U'] and char != 'U':
56                    char = 'U'
57                elif upperd[char] == upperd['V'] and char != 'V':
58                    char = 'V'
59                elif upperd[char] == upperd['W'] and char != 'W':
60                    char = 'W'
61                elif upperd[char] == upperd['X'] and char != 'X':
62                    char = 'X'
63                elif upperd[char] == upperd['Y'] and char != 'Y':
64                    char = 'Y'
65                elif upperd[char] == upperd['Z'] and char != 'Z':
66                    char = 'Z'
67                charlist.append(char)
68        elif char.isupper() == False:15        elif char.islower() == True:
69            lowerd = { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7, '16            alphabet = { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7,
>h': 8, 'i': 9, 'j': 10, > 'h': 8, 'i': 9, 'j': 10, 
70                'k': 11, 'l': 12, 'm': 13, 'n': 14, 'o': 15, 'p': 16, 'q': 17, '17                'k': 11, 'l': 12, 'm': 13, 'n': 14, 'o': 15, 'p': 16, 'q': 17, '
>r': 18, 's': 19, 't': 20, >r': 18, 's': 19, 't': 20, 
71                'u': 21, 'v': 22, 'w': 23, 'x': 24, 'y': 25, 'z': 26 }18                'u': 21, 'v': 22, 'w': 23, 'x': 24, 'y': 25, 'z': 26 }
n72            if lowerd[char] in lowerd.values():n19            newval = alphabet[char] - shift
73                shifted = lowerd[char] - shift20            if newval <= 0:
74                if shifted <= 0:21                newval += 26
75                    shifted +=2622            for key, value in alphabet.items():
76                lowerd.update({char: shifted})23                if newval == value:
77                if lowerd[char] == lowerd['a'] and char !='a':
78                    char = 'a'
79                elif lowerd[char] == lowerd['b'] and char != 'b':
80                    char = 'b'
81                elif lowerd[char] == lowerd['c'] and char != 'c':
82                    char = 'c'
83                elif lowerd[char] == lowerd['d'] and char != 'd':
84                    char = 'd'
85                elif lowerd[char] == lowerd['e'] and char != 'e':
86                    char = 'e'24                    newchar = key
87                elif lowerd[char] == lowerd['f'] and char != 'f':25            newtext += newchar
88                    char = 'f'26        else:
89                elif lowerd[char] == lowerd['g'] and char != 'g':27            newchar = char
90                    char = 'g'28            newtext += newchar
91                elif lowerd[char] == lowerd['h'] and char != 'h':29    return newtext
92                    char = 'h'
93                elif lowerd[char] == lowerd['i'] and char != 'i':
94                    char = 'i'
95                elif lowerd[char] == lowerd['j'] and char != 'j':
96                    char = 'j'
97                elif lowerd[char] == lowerd['k'] and char != 'k':
98                    char = 'k'
99                elif lowerd[char] == lowerd['l'] and char != 'l':
100                    char = 'l'
101                elif lowerd[char] == lowerd['m'] and char != 'm':
102                    char = 'm'
103                elif lowerd[char] == lowerd['n'] and char != 'n':
104                    char = 'n'
105                elif lowerd[char] == lowerd['o'] and char != 'o':
106                    char = 'o'
107                elif lowerd[char] == lowerd['p'] and char != 'p':
108                    char = 'p'
109                elif lowerd[char] == lowerd['q'] and char != 'q':
110                    char = 'q'
111                elif lowerd[char] == lowerd['r'] and char != 'r':
112                    char = 'r'
113                elif lowerd[char] == lowerd['s'] and char != 's':
114                    char = 's'
115                elif lowerd[char] == lowerd['t'] and char != '':
116                    char = 't'
117                elif lowerd[char] == lowerd['u'] and char != 'u':
118                    char = 'u'
119                elif lowerd[char] == lowerd['v'] and char != 'v':
120                    char = 'v'
121                elif lowerd[char] == lowerd['w'] and char != 'w':
122                    char = 'w'
123                elif lowerd[char] == lowerd['x'] and char != 'x':
124                    char = 'x'
125                elif lowerd[char] == lowerd['y'] and char != 'y':
126                    char = 'y'
127                elif lowerd[char] == lowerd['z'] and char != 'z':
128                    char = 'z'
129                charlist.append(char)
130    coded = ''.join(charlist)
131    return coded
132if __name__ == '__main__':30if __name__ == '__main__':
133    plaintext = input()31    plaintext = input()
134    shift = int(input())32    shift = int(input())
n135    print(encrypt(plaintext,shift))input = input()n33    print(encrypt(plaintext,shift))nums = input()
136nums = input.split()34newList = nums.split()
137nl=[]35for i in range(0, len(newList)):
138for number in nums:36    newList[i] = int(newList[i])
139    number = int(number)37listAvg = int(sum(newList) / len(newList))
140    nl.append(number)38listMax = max(newList)
141avg = sum(nl)/len(nums)
142avgfinal = int(avg)
143print(avgfinal, max(nl))tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F39print(listAvg,listMax)tile_dict = { 'A': 1, 'B': 3, 'C': 3, 'D': 2, 'E': 1, 'F':
>': 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, > 4, 'G': 2, 'H': 4, 'I': 1, 'J': 8, 
144              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '40              'K': 5, 'L': 1, 'M': 3, 'N': 1, 'O': 1, 'P': 3, 'Q': 10, 'R': 1, '
>S': 1, 'T': 1, >S': 1, 'T': 1, 
145              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    41              'U': 1, 'V': 4, 'W': 4, 'X': 8, 'Y': 4, 'Z': 10 }    
t146input = input()t42newVar = input()
147letters = []
148numbers = []
149for i in range(len(input)):43for i in range(len(newVar)):
150    letters.append(input[i])44    if i == 0:
151for letter in letters:45        oldNum = 0
152    numbers.append(tile_dict[letter])46    else:
153print(sum(numbers))47        oldNum = newNum
48    x = newVar[i]
49    number = tile_dict[x]
50    newNum = number + oldNum
51print(newNum)
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op