+ 1
How can change output as input in the same program in python??
Pls help me .I am stuck here (they are 3 variabl (a,b,c) =8,8,8 then a+b)/2 and similar for b+c )/2 c+a)/2 get output even when we get odd stop.... My attempt: A,B,C=6,4,8 If A%2==B%2==C%2==0: While A%2==0: A=(A+B)/2 print(A,end=" ") While B%2==0: B=(C+B)/2 print(B,end=" ") While C%2==0: C=(A+C)/2 print(c,end=" ")
12 Answers
+ 1
They are 3 variable a+b)%2!=0 stop similar b+c)
Example input 8,8,4
Sample output
8,6,4
7,5,6
Stop you got odd number
+ 1
Jay Matthews
A,B,C=6,4,8
If A%2==B%2==C%2==0:
While A%2==0:
A=(A+B)/2
print(A,end=" ")
While B%2==0:
B=(C+B)/2
print(B,end=" ")
While C%2==0:
C=(A+C)/2
print(c,end=" ")
+ 1
๐๐ข๐ข๐๐จ ๐๐ก๐๐ฒ๐๐ฅ
Thank you
Great help from your side
Further any assistance...
Pls help meee
0
Pls help
0
Jay Matthews
๐๐ข๐ข๐๐จ ๐๐ก๐๐ฒ๐๐ฅ
A,B,C are 3 three number if you ((A+B)/2 is even ,(C+B)/2 is even ,
(A+C)/2 is even ,) if you got any odd number out of 3 variable pls stop
Here A=3,B=4,C=2
A=(A+B)/2
B=(B+C)/2
C=(C+A)/2
A,B,C ARE EVEN DO SIMILAR PROCESSES UNTIL YOU GOT ODD STOPPP
0
๐๐ข๐ข๐๐จ ๐๐ก๐๐ฒ๐๐ฅ
Sample input 4,12,4
Output
8,8,4
8,6,6
7,3,7
Stop you got odd out three variables
0
๐๐ข๐ข๐๐จ ๐๐ก๐๐ฒ๐๐ฅ pls help buddy