[Tutor] Sean Banks basic python help
Alan Gauld
alan.gauld at yahoo.co.uk
Sat Feb 22 04:31:36 EST 2020
On 22/02/2020 09:20, sean banks wrote:
> Hello I need a bit of help with this question, please.
>
> 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.
We won;ty do your homework for you but we can offer hints.
The assignment tells you that
1 letter = 26
2 letters = 26*26
so we can extend that
3 letters = 26*26*26
So
6 letters = 26*26*26*26*26*26
All you need to do is calculate that using Python.
If you need more help let us know what exactly puzzles you.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list