ScratchData LogoScratchData
Back to popswilson's profile

Combinations

POpopswilson•Created November 17, 2015
Combinations
9
8
167 views
View on Scratch

Instructions

Click on the green flag. Input n, input r and the program computes nCr. There are 4 possible combinations that can be formed from 4 things (different fruits) taken 3 at a time without repetition.

Description

Scratch does not have a nCr function like the one in the TI-XX family of programmable calculators. The short 'factorial' Make a Block is a simple example of recursion. I am working on a project that computes the probability of a random walker on the integer number line reaching position 'p' after 't' flips and I needed a 'combinations' subroutine. This project will complement my other Random Walks on the Integer Number line projects. See: Feynman’s Random Walk https://scratch.mit.edu/projects/11282377/ Random Walk with Barriers https://scratch.mit.edu/projects/11300964/ Huckster's Game https://scratch.mit.edu/projects/68836046/

Project Details

Project ID88028765
CreatedNovember 17, 2015
Last ModifiedNovember 17, 2015
SharedNovember 17, 2015
Visibilityvisible
CommentsAllowed