COMP2113
COMP2113_ENGG1340 Programming technologies and Computer programming II [Section 2BC] [2023]
Loading...
Searching...
No Matches
moretest.py
Go to the documentation of this file.
1import random
2
3characters = []
4for i in range(0, random.randint(5,100)):
5 choose_case = random.choice([0, 32]) # random upper/lower case
6 characters.append(chr(random.randint(65+choose_case, 90+choose_case)))
7characters += ["!"] # end with "!"
8
9while True:
10 a = random.randint(3,500)
11 if a%2 == 1 and a%13 == 1: # coprime with 26
12 key1 = a
13 break
14key2 = random.randint(1,100)
15print("e", key1, key2, " ".join(characters))
void print(vector< string > v)