%% Code for the function mysum (needs to be run as a separate file

% Remove the comment in the following line
%function [mysum1] = mysum(n)
% This calculates the sum of the integers from 1 to n

mysum1=0;
for ind=1:n
    mysum1=musm1+ind;
end




%% Code for simulate n coin flips

n=100;

for ind=1:n
    
    check=rand;
    
    if check<.5
        x(ind)=0;
    else
        x(ind)=1;
    end
end

hist(x)