Intermediate:
Write some 8 bar melodies.
Be sure to check what key and clef you're in and always finish on the tonic (key note).
Intermediate/Advanced:
Try using a pentatonic or blues scales to create a melody
Advanced:
Devices for creating scary music
Advanced:
Write a tune over the Tonic, Dominant and Subdominant chords
Composing on the spot!
Here's a chord sequence of A minor(7), D minor(7), F major and G major to play along to. If you know the scales and arpeggios in these keys you are good to go!
To keep it simple you could just start with playing A, D, F then G, holding each for a whole bar (4 beats). Then start experimenting...
You might be needing this to help you write all those tunes...