logo CodeStepByStep logo

cs_rap2

Write a complete program that prints the following cumulative song as console output. Use functions to capture the structure of the song and to eliminate redundancy. For example, no complete line of output should be printed in two or more places in your code.

Hey homies, my code is gonna rock this place
With a function named main and a curly brace
I put a semicolon at the end of each line
You haters never seen code that looked so fine

Hey homies, my code is gonna rock this place
With a function named main and a curly brace
The CPU loves my code, no need to debug
I can rap in Python until it unplug
I put a semicolon at the end of each line
You haters never seen code that looked so fine

Hey homies, my code is gonna rock this place
With a function named main and a curly brace
The first time I try, my code compiles
Lost a point for style cause my comments are vile
The CPU loves my code, no need to debug
I can rap in Python until it unplug
I put a semicolon at the end of each line
You haters never seen code that looked so fine

Hey homies, my code is gonna rock this place
With a function named main and a curly brace
Got help from the TAs in the IPL
But I didn't need it cause I code so well
The first time I try, my code compiles
Lost a point for style cause my comments are vile
The CPU loves my code, no need to debug
I can rap in Python until it unplug
I put a semicolon at the end of each line
You haters never seen code that looked so fine

Hey homies, my code is gonna rock this place
With a function named main and a curly brace
I got full credit on external correctness
Hey playa check this, my code eats yours for breakfast
Got help from the TAs in the IPL
But I didn't need it cause I code so well
The first time I try, my code compiles
Lost a point for style cause my comments are vile
The CPU loves my code, no need to debug
I can rap in Python until it unplug
I put a semicolon at the end of each line
You haters never seen code that looked so fine
Complete program: Write an entire program that you could put into a file and run outside of CodeStepByStep.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.