0

what should be used for running python on Windows system IDLE or command line

actually was facing problem while using print >>> def gcd(m,n) : if m < n : (m,n) = (n,m) if (m%n) == 0 : return (n) else : diff = m-n return (gcd(max(n,diff),min(n,diff))) print gcd(9,-5) this is the code when I wrote on command line showed syntax error on print statement nd syntax error :unexpected indent on Idle(python 3.4 GUI) ,AS I M NEW TO THIS PLZ HELP ME plz give me a correct solution to this coding question is "take input from user nd find the gcd of two no. m nd n,this is a part of the question where I m stuck at " print"

22nd Jul 2016, 5:43 PM
Vipul Jain
Vipul Jain - avatar
1 Odpowiedź
0
I think it must be print (gcd(9,-5)) and also I think its an infinite loop!
22nd Jul 2016, 6:02 PM
Karthick M
Karthick M - avatar