Some of the random codes I coded which will be useful for some beginners.