Learn

An ice cream parlor offers 27 different flavors of ice cream! Customers are allowed to fill their ice cream cone with three flavors of their choosing. How many different ice cream treats can be constructed? For the first scoop, a customer can pick one out of 27 flavors. For the second scoop, they can also pick one out of the 27, and the same goes for the third.

This means that there are 27 options for the first scoop “and” 27 options for the second scoop “and” 27 options for the third scoop.

The total number of ways to construct an ice cream cone is:

Number of ways=27×27×27=273=19,683Number \ of \ ways = 27 \times 27 \times 27 = 27^3 = 19,683

In general, when you have to pick r items out of n possible choices with repetition allowed, the number of ways to do this is:

n×n×n×n=nrn \times n \times n \ldots \times n = n^r

Instructions

1.

How many different dice rolls are possible from rolling two six-sided dice? Assign your answer to the dice_rolls variable.

2.

How many four-digit numbers are possible? Assign your answer to the four_digit_number variable.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?