+ 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=" ")

2nd Jun 2020, 8:32 AM
Pavan Kalyan
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
2nd Jun 2020, 8:40 AM
Pavan Kalyan
+ 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=" ")
2nd Jun 2020, 9:15 AM
Pavan Kalyan
+ 1
๐Š๐ข๐ข๐›๐จ ๐†๐ก๐š๐ฒ๐š๐ฅ Thank you Great help from your side Further any assistance... Pls help meee
2nd Jun 2020, 1:45 PM
Pavan Kalyan
0
Pls help
2nd Jun 2020, 8:41 AM
Pavan Kalyan
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
2nd Jun 2020, 9:07 AM
Pavan Kalyan
0
๐Š๐ข๐ข๐›๐จ ๐†๐ก๐š๐ฒ๐š๐ฅ Sample input 4,12,4 Output 8,8,4 8,6,6 7,3,7 Stop you got odd out three variables
2nd Jun 2020, 1:07 PM
Pavan Kalyan