Welcome to Code Sharer, a code gallery for creating, saving and sharing all kinds of code snippets.

Snips Tagged "fun" 4 results found

Heart Graph R 600
Author: Ryan Bradley-Evans (Admin) Posted On: Tuesday, December 2, 2014 at 11:27 AM

"lwd" is the width of the line
Heart R plot

Christmas Tree R 481
Author: Ryan Bradley-Evans (Admin) Posted On: Tuesday, December 2, 2014 at 11:54 AM

Plots a Christmas tree with decorations in random places along the branches. try running the same code a few times to see for your self!


xmas tree





Hangman Python 322
Author: Ryan Bradley-Evans (Admin) Posted On: Saturday, January 14, 2017 at 9:21 AM

This is a basic hangman game for python 2.7 there is one word, however, it would be simple to make a word bank to randomly choose words from.

A simple rounding function for Python 3 Python 134
Author: Ryan Bradley-Evans (Admin) Posted On: Thursday, September 6, 2018 at 11:44 AM

There are no library dependencies for this to work.


The syntax can easily be changed to work with Python 2.


To use, include the code after your imports section of your program then type round(x) where you want a number to be rounded. replace x with the float you want to be properly rounded.