Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How to Attempt Find PIN: You are at Level - 1 of a Maths game You are provided with 4 numbers imputt, input 2 ,

How to Attempt Find PIN: You are at Level-1 of a Maths game You are provided with 4 numbers imputt, input2, input and input4 and are expected t Sed a secret PIN The three numbers input1, input2 and input3 are four digit numbers within the range >>1000 and 9999 in 1000<= input199991000<= input2: 99991000<= input3=9999 input is a positive integer number. If input is EVEN, the PIN =(sum of even digits in input! input2 and input3)(sum of odd digits in input input2 and input3) If input is ODD, the PIN =(sum of odd digits in input1 input2 and input3)(sum of even digits in input1 input2 and input3) Example1-If input4-38(an EVEN number) and if input13521, input2=2452 input3=1352, then PIN (2+2+4+2+2)-3-5-1-5-1+3+5)=-11 Example2-if input4:37(an ODD number) and if input13521, input2-2452, input3=1352, then PIN=(3+5+1+5+1+3+5)-(2+2+4+2+2)-11 Assuming that the 4 numbers are passed to the given function, Complete the function to find and return the PIN. tests.mestic

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions