import check def create_acct_num(n): ''' consumes a positive 3 digit number and returns a new 4 digit number where the first 3 digits are n and the last digit is the remainder of the sum of all the numbers of n when divided by 7 create_actt_num: Nat -> Nat Requires: n < 1000 ''' w = n % 10 x = (n // 10) % 10 y = n // 100 z = (w + x + y) % 7 return (n * 10) + z ##Examples: check.expect("Example 1", create_acct_num(778), 7781)
Expert's Answer
Chat with our Experts
Want to contact us directly? No Problem. We are always here for you
Your future, our responsibilty submit your task on time.
Order NowGet Online
Assignment Help Services