8 kyu

BASIC: Making Six Toast.

7,277 of 14,156user3186707

Description:

Story:

You are going to make toast fast, you think that you should make multiple pieces of toasts and once. So, you try to make 6 pieces of toast.


Problem:

You forgot to count the number of toast you put into there, you don't know if you put exactly six pieces of toast into the toasters.

Define a function that counts how many more (or less) pieces of toast you need in the toasters. Even though you need more or less, the number will still be positive, not negative.

Examples:

You must return the number of toast the you need to put in (or to take out). In case of 5 you can still put 1 toast in:

six_toast(5) == 1

And in case of 12 you need 6 toasts less (but not -6):

six_toast(12) == 6

Good luck!

Algorithms

More By Author:

Check out these other kata created by user3186707

Stats:

CreatedNov 23, 2016
PublishedNov 23, 2016
Warriors Trained17189
Total Skips190
Total Code Submissions22406
Total Times Completed14156
JavaScript Completions7277
CoffeeScript Completions33
Ruby Completions573
Python Completions4907
TypeScript Completions362
C# Completions760
C Completions415
COBOL Completions16
Crystal Completions11
Julia Completions34
Swift Completions353
Scala Completions17
Total Stars82
% of votes with a positive feedback rating89% of 2329
Total "Very Satisfied" Votes1896
Total "Somewhat Satisfied" Votes337
Total "Not Satisfied" Votes96
Total Rank Assessments11
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • user3186707 Avatar
  • aweleshetu Avatar
  • nbeck Avatar
  • Dentzil Avatar
  • kazk Avatar
  • user5036852 Avatar
  • Souzooka Avatar
  • rowcased Avatar
  • FArekkusu Avatar
  • hobovsky Avatar
  • ejini战神 Avatar
  • KayleighWasTaken Avatar
  • darrellroot Avatar
Ad