The modern version of an English poem goes as follows
The origin of this poem is unknown, but it can minimally be traced back to the following lines that Sir Edmund Spenser3 wrote in 1590 in his epic The Faerie Queen4 (Book three, Canto 6, Stanza 6):
It was upon a Sommers
shynie day,
When Titan faire his beames did display,
In a fresh fountaine, farre from all mens vew,
She bath'd her brest, the boyling heat t'allay;
She bath'd with roses red, and violets blew,
And all the sweetest flowers, that in the forrest grew.
It also turned up in Gammer Gurton's Garland or the Nursery Parnassus: A Choice Collection of Pretty Songs and Verses, a collection of English nursery rhymes from 1784.
The rose is red, the
violet's blue,
The honey's sweet, and so are you.
Thou are my love and I am thine;
I drew thee to my Valentine:
The lot was cast and then I drew,
And Fortune said it shou'd be you.
Victor Hugo supposedly knew the work of Spenser, but it is doubtful that he knew the English nursery rhyme when he published Les Misérables5 in 1862. Hugo was both a poet and an author, and the text from his novel is interlarded with many songs. One of these songs — sung by the character Fantine — contains the following chorus:
Nous
achèterons de bien belles choses avec notre argent
En nous promenant le long des faubourgs.
Les bleuets sont bleus, les roses sont roses,
Les bleuets sont bleus, j'aime mes amours.
The assignment consists of making up different versions of the poem, where mainly the colors of the flowers in the last two lines are adapted. Write a function poem that prints a variant of the modern version as a string of four lines. The fragments in italics from the introduction can be adapted. In order to do so, the function has four optional parameters:
roses: the color of the roses can be given to this parameter
violets: the color of the violets can be given to this parameter
line3: the third line of the poem can be given to this parameter (the comma excepted)
line4: the last line of the poem can be given to this parameter (the ending period excepted)
Make sure that the standard values of these optional parameters are constructed in a way that the original version of the poem can be printed if no arguments are given to the function.
>>> print(poem())
Roses are red,
Violets are blue,
Sugar is sweet,
And so are you.
>>> print(poem('yellow', line3='Sugar is white'))
Roses are yellow,
Violets are blue,
Sugar is white,
And so are you.
>>> print(poem(line4='My sweet sixteen', violets='green'))
Roses are red,
Violets are green,
Sugar is sweet,
My sweet sixteen.