lundi 9 décembre 2019

why this code like a = b + c doesn't work on repl.it

I cannot run this code on repl.it.even though I could run this code on swiftPlayground. :< I guess repl.it cannot discriminate wether my code work or not.

Is my opinion right or not?
Please answer. And I'm not good at make paragraphs in English. Thank you.

let alphabet =["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"]
var first = alphabet.randomElement()
var second = alphabet.randomElement()
var third = alphabet.randomElement()
var fourth = alphabet.randomElement()
var fifth = alphabet.randomElement()
var sixth = alphabet.randomElement()

var password = first! + second! + third! + fourth! + fifth! + sixth!

print(password)



Aucun commentaire:

Enregistrer un commentaire