[Question]
  [
Being short of cash, you have signed up to build donuts for The Doughnut Shop™, the biggest digital doughnut company in the world, mostly because they sell every size of doughnut imaginable.
Now, given that trading standards nowadays is very tough, you need to write a piece of code as short as possible to create these doughnuts so that the source code that created them can be put on the outside of the packet.
# Challenge
Given 4 inputs, radius of the outer ring, radius of the inner ring, the possible sprinkles and the chance of a cell having a sprinkle, output a doughnut covered in those sprinkles which has the correct inner and outer radii.
* The input may be taken how you wish (arguments to a function, stdin, program arguments) and in any order.
	+ The sprinkles will be given in the form of 1 character per sprinkle type
	+ `^+*-` as sprinkle input would be a list of 4 sprinkles, `^`, `+`, `*`, `-`
	+ The chance of a sprinkle will be entered as a floating point value between 0 and 1. eg: `0.1`, `0.23`
* You must print out the output to stdout or equivalent.
* Sprinkles can't be on the edges of the doughnut.
* Each type of sprinkle must have an equally likely chance of being on each cell.
* The radii are given in 1-cell units.
* If the inner radius equals either 0 OR the outer radius, the doughnut is said to have no ring.
* Both radii will be non-negative integers.
* The inner and outer edges of the doughnut must be represented using hashes (`#`)
* A test to see if a point is in a circle, given a radius and the center of the circle is:
`(x-center)**2+(y-center)**2 < radius**2`
### Example input with output
(outer radius, inner radius, sprinkles, chance of sprinkle)
* 10, 4, "^+\*-", 0.1
```
     #########
    #         #
  ##  ++   *  *##
  #             #
 #       ^^ - *  #
#      #####   ^  #
#+    #     #     #
#    #       #-   #
#    #       #  * #
#    #       #+   #
#    #       #    #
#^  +#       #    #
#     #     #     #
# *    #####      #
 #       +  -    #
  #        ^    #
  ##  ^  +     ##
    #       ^ #
     #########
```
* 5, 2, ":^+\*", 0.9
```
  #####
 #^^+ ^#
#**###  #
#:#   #^#
#^#   #*#
#:#   #*#
#:+###* #
 # *:^:#
  #####
```
**This is code golf, the shortest answer in bytes wins**
  
[Answer]
# Python, 263 bytes
So I saw a challenge with no answers that looked relatively easy but also interesting and thought to myself:
*Hmm... If I'm the only one with an answer, I'll be winning until a better answer inevitably shows up.*
So I sat down with Python for a few minutes and came up with a rough draft which, with the help of the community's suggestions, I have been tweaking to reduce its size.
```
from random import*
def D(O,I,S,P):
 a=range(-O,O+1);C=lambda x,y,z,n:(n-.5)**2<x*x+y*y<(z+.5)**2
 if I>=O:I=0
 for y in a:
  R=''
  for x in a:
   if C(x,y,O,O)+(C(x,y,I,I)&(I!=0)):R+='#'
   elif C(x,y,O,I)&(uniform(0,1)<P):R+=choice(s)
   else:R+=' '
  print(R)
```
For the examples above, this creates
```
>>> D(10, 4, "^+*-", 0.1)
       #######       
     ##       ##     
    #         * #    
   #             #   
  #          + ^  #  
 # +               # 
 #   + +#####   -  # 
#      ##   ##    ^ #
#     ##     ##  *  #
#-    #       #     #
#     #       #  +  #
# +   #       #     #
#     ##     ##     #
#      ##   ##  *   #
 #+-    #####      # 
 #             - - # 
  #   -    -     +#  
   #      ^      #   
    # -    +    #    
     ## *     ##     
       #######       
>>> 
```
and
```
>>> D(5, 2, ":^+*", 0.9)
   #####   
  #*^:* #  
 #^::*:^*# 
#* :###+*:#
#:*#   #+:#
#::#   #+ #
#+:#   #*:#
#^^:###::^#
 # + :*^ # 
  # *:+*#  
   #####   
>>> 
```
I highly doubt that this is the shortest possible solution, but I think it worked out pretty well for a self-taught teenager's attempt to kill time. Since this was designed to be as small as possible, I have not included comments and have taken shortcuts on every variable name and as such, this program is more for usability than readability.
Should you want to use this code for some reason unbeknownst to me, just run it in IDLE and type the command
```
D(Outer Radius, Inner Radius, Sprinkles, Chance of Sprinkle)
```
in the format described above.
[Answer]
## MATLAB, 231 bytes
Here a matlab solution:
```
function g=z(r,q,s,p);[x,y]=meshgrid(1:2*r,1:2*r);d=(x-r).^2+(y-r).^2;h=size(d);e=zeros(h);e(d<r^2 & d>=q^2)=1;f=bwperim(e,4);k=rand(h);j=numel(s);l=changem(randi(j,h),s,1:j);g=char(e);g(:,:)=' ';g(k<=p)=l(k<=p);g(f)='#';g(~e)=' ';
```
Some examples:
```
>> z(10, 4, '^+*-', 0.1)
ans =
     #########      
    #         #     
  ##           ##   
  #    -       -#   
 #               #  
#   -  #####    ^ # 
#     #     #     # 
#   -#       #    # 
# *  #       #+   # 
#**  #       #    # 
#  * #       # -  # 
#+  *#       #    # 
#     #     #     # 
#      #####      # 
 #           ^   #  
  #     *       #   
  ##+          ##   
    #         #     
     #########      
>> z(5, 2, ':^+*', 0.9)
ans =
  #####   
 #++::*#  
#^^###++# 
# #   #+# 
#^#   #^# 
#*#   #*# 
#+:###^*# 
 #*:^+^#  
  #####   
>> z(20,6, 'erthhjjjjkjkk', 0.4)
ans =
             #############              
           ##jh  k  k  k  ##            
         ##  jjj    j khh   ##          
        #r kj h   k tjhj j    #         
      ##jk    t k  jh j       h##       
     #k       rre            k j #      
    # j   j j  j  khtkt jr     kj #     
    #  k   rk je    j      h   j  #     
   # j   k   k  jth e k j   j    j #    
  #h   h h e     t e ej  j  r k r e #   
  #    j   r  jh  jk     j  kk   j  #   
 #      k     k    h k  jk     k j   #  
 #  jjk   hh k hj  r  j  je rjj k j  #  
#  ek  j j jj  h#######          hke  # 
#hj      k j j #       #ke jhkt  jee  # 
#        jk  k#         # k    j   t  # 
#k        j  #           #khk  r     j# 
#   tj  j te #           # j  r j j   # 
#e   je   jhk#           #        t j # 
#jj    j  h  #           #     k jj e # 
# j j   hj j #           # jkt kjjjr e# 
#j k    e    #           #       r   k# 
#jj  k    ek #           # hj  j rtj  # 
#   k j   hk h#         #     j  h j  # 
#   h trt  jrht#       #   et        k# 
#j  ehjj      j #######ett  kh kjj k  # 
 #   r  jj    ekk jk    th k   kkk h #  
 #hj       khe kj hr  jj   kk  r j   #  
  #r t    k j  k r  j  jk k hh    jj#   
  #  kjj  h k j       j rrr j  r j  #   
   #j kej  jj    t       h  j   hh #    
    #  he   e  tje j  tjhkjk kj   #     
    #j kt rjk    j j  ee    rkj   #     
     #   jjr e  j jkt j   e  j  j#      
      ##k  thhjj je   kj  kh   ##       
        # hje  j     jj kk t j#         
         ## k       h     e ##          
           ## e jje   kkhj##            
             #############              
```
]