Instantly share code, notes, and snippets.

Embed
What would you like to do?
for count in 1...10 {
    let lanzamientoMoneda = Bool.random()
    let resultadoLanzamiento = lanzamientoMoneda ? "cara" : "cruz"
    print("\(count). Ha salido \(resultadoLanzamiento)")
}
/*
 1. Ha salido cruz
 2. Ha salido cruz
 3. Ha salido cara
 4. Ha salido cara
 5. Ha salido cara
 6. Ha salido cruz
 7. Ha salido cruz
 8. Ha salido cruz
 9. Ha salido cara
 10. Ha salido cara
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment