-
-
Save codecademydev/cb39094b89cb2747def7f4b115777332 to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Write your code below 📼 | |
// Best Off Heavy metal | |
print(".------------------------.") | |
print("| HeavyMetal 90 min |") | |
print("| __ ______ __ |") | |
print("| ( )|).....|( ) |") | |
print("| (__)|)_____|(__) |") | |
print("| ________________ |") | |
print("|___/_._o________o_._\\___|") | |
var mixtape: [String] = [] | |
mixtape.append("Hooked on a Feeling - Blue Swede") | |
mixtape.append("Go All the Way - Raspberries") | |
mixtape.append("Spirit In The Sky - Normal Greenbaum") | |
mixtape.append("Moonage Daydream - David Bowie") | |
mixtape.append("Fooled Around And Fell in Love - Elvin Bishop") | |
mixtape.append("I'm Not in Love - 10cc") | |
mixtape.append("I Want You Back - The Jackson 5") | |
mixtape.append("Come and Get Your Love - Redbone") | |
mixtape.append("Cherry Bomb - The Runaways") | |
mixtape.append("Escape - Rupert Holmes") | |
mixtape.append("O-o-h Child - Five Stairsteps") | |
mixtape.append("Ain't No Mountain High Enough - Marvin Gaye, Tammi Terrell") | |
var currentIndex = 1 | |
let midpoint = mixtape.count / 2 | |
let SideA = mixtape[..<midpoint] | |
let SideB = mixtape[midpoint...] | |
print("\nSide A") | |
for i in SideA { | |
print("\(currentIndex). \(i)") | |
currentIndex += 1 | |
} | |
print("\nSide B") | |
for i in SideB { | |
print("\(currentIndex). \(i)") | |
currentIndex += 1 | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment