From 8fb719f58f91d1f1f187a1db974682fb3736ee05 Mon Sep 17 00:00:00 2001 From: Sudipto Mallick Date: Sat, 13 Jan 2024 09:28:10 +0530 Subject: Changes to project structure of Python assignments As was directed to remove assignments. --- python/code/3/6.py | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 python/code/3/6.py (limited to 'python/code/3/6.py') diff --git a/python/code/3/6.py b/python/code/3/6.py deleted file mode 100644 index 64b1a60..0000000 --- a/python/code/3/6.py +++ /dev/null @@ -1,27 +0,0 @@ -import sys -message = input('Enter message: ') -key = None -try: - key = int(input('Enter key (1-25, -1 - -25): ')) -except ValueError: - print('Invalid key, must be an integer') - sys.exit(1) - -if key < 0: key += 26 -if not (1 <= key <= 25): - print('Invalid key, must be an integer with absolute value between 1 and 25, inclusive') - sys.exit(2) - -marr = bytearray(message, 'ascii') -for i in range(len(marr)): - c = marr[i] - if 64 < c < 64 + 27: - c = ((c - 65) + key) % 26 + 65 - elif 96 < c < 96 + 27: - c = ((c - 97) + key) % 26 + 97 - marr[i] = c - -print('Caesar cipher with k =', key, 'applied to the given message:') -print(str(marr, encoding='ascii')) - - -- cgit 1.4.1-2-gfad0 /getwtxt/tree/svc/leveldb.go?h=v0.4.13&id=c4130e200d1282c1637c6f79332593026c87993d'>tree commit diff stats
path: root/svc/leveldb.go
blob: 91d7ca9b01d38ccc35af5a32783d96efb36d1c2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87