HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Problems
  2. /A phone lock accepts a code of four digits taken from 1, 2, 3, 4, 5, 6, 7…
MediumMathematicsHigh School (9–10)Algebra › Permutations and CombinationsNumericalA-LevelIGCSEIB

A phone lock accepts a code of four digits taken from 1, 2, 3, 4, 5, 6, 7…

StemPy LabContributed by StemPy Lab

Try it on paper first. A hint, the key idea and the worked solution are here when you need them.

A phone lock accepts a code of four digits taken from 1,2,3,4,5,6,71, 2, 3, 4, 5, 6, 71,2,3,4,5,6,7. A digit may not appear twice in a code.

  1. How many different codes are possible?
  1. How many of the codes are even numbers?

Check your answer

Work it out on paper, then type your number. The answer itself stays hidden.

Need a reminder? The key ideaShowHide

Choices made one after another multiply. n!=n(n−1)⋯1n! = n(n - 1)\cdots 1n!=n(n−1)⋯1 and 0!=10! = 10!=1. The number of ordered choices of rrr objects from nnn different objects is nPr=n!(n−r)!{}^{n}P_{r} = \dfrac{n!}{(n - r)!}nPr​=(n−r)!n!​. Fill a place that has a condition first.

The worked solution

Have you tried it?

Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.

Step 1. Part (a). 7P4=7×6×5×4=840{}^{7}P_{4} = 7 \times 6 \times 5 \times 4 = 8407P4​=7×6×5×4=840.

Step 2. Part (b), the last digit. An even number ends in 222, 444 or 666: 333 choices.

Step 3. The first three digits. They are an ordered choice of 333 from the 666 digits that are left: 6P3=6×5×4=120{}^{6}P_{3} = 6 \times 5 \times 4 = 1206P3​=6×5×4=120.

Step 4. Multiply. 3×120=3603 \times 120 = 3603×120=360.

Check. The last digit is 222, 444 or 666 out of 777 digits, so a fraction 37\dfrac{3}{7}73​ of 840840840 should be even: 37×840=360\dfrac{3}{7} \times 840 = 36073​×840=360.

Answer: (a) 840840840. (b) 360360360.

Log in to save this for later
← All Problems
← A sprint final has nine athletes. The first three to finish receive gold, silver and bronze, one…Seven people stand in a queue. Two of them are Asha and Ben… →
More onAlgebra › Permutations and Combinations

Discussion (0)

Log in to join the discussion.

Loading…

Learn it in

  1. Factorials and permutationsCounting Arrangements and Selections

More on this topic

  1. A game writes a four-digit number using the digits 0, 1, 2, 3, 4, 5, each digit at most once…Hard
  2. Find the positive whole number n in each equation. ⁿP₂ = 90; ⁿC₃ = 56; ^(n + 2)C₂ = 21Medium
  3. Six friends sit in a row of six seats. Two of them are Dev and Eli…Medium
An ice cream shop has 8 flavours. A customer picks 3 different flavours for a cone, and the order…Easy
  • A teacher has 5 boys and 4 girls. The boys include Ravi and Sam…Hard
  • All problems on this topic →