So, I decided to create a Pin Generator program. The idea was that the user enters a name for example: laptop, the pin generator generates a number which is 12116201516 where 12 = l, 1 = a, 16 = p, 20 = t, 15 = o, 16 = p.
This is the table:
a = 1
b = 2 c = 3 d = 4 e = 5 f = 6 g = 7 h = 8 i = 9 j = 10 K = 11 l = 12 m = 13 n = 14 o = 15 p = 16 q = 17 r = 18 s = 19 t = 20 u = 21 v = 22 w = 23 x = 24 y = 25 z = 26
But, the problem is I am not able to write an appropriate code for it.
This is what I tried:
print('Welcome to PIN Generator!')
name = str(input('Enter a name: ')).lower
letters = 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 = 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
while name in letters:
print(letters)
And guess what it is I N C O R R E C T.
Please help me out!