Can we generate password in functions? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 7

Can we generate password in functions?

25th Feb 2019, 4:16 AM
Bilal Ahmed
Bilal Ahmed - avatar
3 Antworten
+ 2
As strings? Sure, why not. What language do you plan to use? For most cases, the algorithm should be simple. For a password of length N, make a loop which runs N times, and for each iteration, append a random alphanumeric symbol to a designated resultant string. After the loop execution is complete, return the string.
25th Feb 2019, 4:27 AM
Fermi - avatar
+ 2
25th Feb 2019, 5:14 AM
Lambda_Driver - avatar
Please specify which language you'd like to use
6th Mar 2019, 8:11 PM
Bahaa Al Mahamid
Bahaa Al Mahamid - avatar