-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
54 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import random | ||
|
||
surnames = ['surname1', 'surname2', 'surname3', 'surname4'] | ||
firstnames = ['firstname1', 'firstname2', 'firstname3', 'firstname4'] | ||
patronymics = ['patronymic1', 'patronymic2', 'patronymic3', 'patronymic4'] | ||
sexes = ['M', 'F'] | ||
marks = [1, 2, 3, 4, 5, '-'] | ||
scholarships = list(range(1234, 4322)) | ||
|
||
lines = [] | ||
for _ in range(20): | ||
surname = random.choice(surnames) | ||
firstname = random.choice(firstnames) | ||
patronymic = random.choice(patronymics) | ||
sex = random.choice(sexes) | ||
date_of_birth = f"{random.randint(1, 28):02d}.{random.randint(1, 12):02d}.{random.randint(1995, 2005)}" | ||
mark1 = random.choice(marks) | ||
mark2 = random.choice(marks) | ||
mark3 = random.choice(marks) | ||
scholarship = random.choice(scholarships) | ||
|
||
line = f"{surname} {firstname} {patronymic} {sex} {date_of_birth} {mark1} {mark2} {mark3} {scholarship}" | ||
lines.append(line) | ||
|
||
with open('input.txt', 'w') as file: | ||
for line in lines: | ||
file.write(line + '\n') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
Прізвище1 Ім'я1 По-батькові1 F 02.02.2000 4 4 - 1234 | ||
Прізвище2 Ім'я2 По-батькові2 F 02.02.2000 4 - 2 1234 | ||
Прізвище3 Ім'я3 По-батькові3 F 03.03.2000 3 - - 2413 | ||
surname2 firstname3 patronymic3 F 06.12.1995 - 3 5 4756 | ||
surname4 firstname2 patronymic3 F 10.09.1995 2 - 1 3291 | ||
surname2 firstname4 patronymic4 F 07.05.2004 2 3 3 2103 | ||
surname1 firstname1 patronymic2 F 05.05.1998 1 - - 2766 | ||
surname3 firstname2 patronymic3 M 03.02.2001 - 3 1 2260 | ||
surname1 firstname1 patronymic2 F 12.04.2002 2 3 - 4495 | ||
surname4 firstname1 patronymic3 F 04.09.2005 3 2 4 4183 | ||
surname3 firstname1 patronymic2 F 08.07.2004 5 5 2 4345 | ||
surname2 firstname2 patronymic1 M 22.01.1999 2 1 5 3870 | ||
surname1 firstname1 patronymic1 M 04.05.2005 4 3 4 3302 | ||
surname2 firstname3 patronymic3 F 16.12.1995 1 3 5 2801 | ||
surname3 firstname2 patronymic3 F 24.08.1999 4 5 3 4139 | ||
surname4 firstname3 patronymic4 M 26.07.1998 2 3 4 2548 | ||
surname1 firstname3 patronymic1 M 23.06.1998 1 4 - 1092 | ||
surname1 firstname3 patronymic2 F 15.10.2000 5 3 3 1577 | ||
surname2 firstname2 patronymic2 M 08.12.2004 3 5 2 4394 | ||
surname4 firstname1 patronymic3 M 05.08.1998 2 - 2 1404 | ||
surname3 firstname4 patronymic3 F 15.12.1998 1 3 4 1133 | ||
surname3 firstname3 patronymic2 M 06.09.2000 2 3 3 1118 | ||
surname4 firstname2 patronymic3 F 22.12.2003 3 4 3 2677 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters