# Lee Her # CIS 122 # Ch.6 Program Ex 4: Maximum of Two Values. # Last modified on 04/30/2015 #Declare variable num1=0 num2=0 #Enter two values. num1=input('Enter first value: ') print num1 num2=input('Enter second value ') print num2 #Determine the greater value. def value(num1,num2): if num1>num2: print 'The greater number is: {}'.format(num1) else: print 'The greater number is: {}'.format(num2) value(num1,num2) #End
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question