-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProblem_14.py
17 lines (17 loc) · 1.15 KB
/
Problem_14.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'''A secret door in a castle It can be opened using a 5-position code,
each of which can be a combination of numbers 0-9 a-z and A-Z. The castle
keeper knows only the first four codes, but the last one is missing.
He knows the last one. There is a method of calculating using the data
from the first 4 characters – if the first code is a number. The last
digit will also be a number. where the last digit is the first numeric
value plus 9 then mod with 5 – if the first letter is a lowercase letter
The last digit will be a number. What will the last code be? Consider
how many digits are the next 3 letters. Take a number that is a positive
number 2 and mod it with 3 – but if the first code is a capital letter
The last digit will be the same character as the first code. but whether
it is uppercase or lowercase, determine whether the last preceding code
(4th digit code) is uppercase or lowercase. if it is uppercase or numeric
The last code will be a lowercase letter. But if the code before the last
is lowercase The last code will be uppercase. Write a program to help find
the missing location code.
Then type the complete code out on the screen.'''