Use Python to calculate how many different passwords can be formed with 6 lower case English letters. For a 1 letter password, there would be 26 possibilities. For a 2 letter password, each letter is independent of the other, so there would be 26 times 26 possibilities. Using this information, print the amount of possible passwords that can be formed with 6 letters.

Respuesta :

Limosa

Answer:

Following are the program in the Python Programming Language.

#Set integer type variable

letter = 6

#Set integer type variable

Possibility = 26

#Set variable to store total Possibilities

total =Possibility ** letter

#print variable

print(total)

Explanation:

Following are the description of the program.

  • Firstly, we set an integer type variable 'letter' and initialize it to 6.
  • Then, we set another integer type variable 'Possibility' and initialize it to 26.
  • Set an integer type variable 'total' that stores the number of the possible passwords that can be created from 6 letters.
  • Finally, print the variable 'total'.