Python Online Compiler & Playground
HTML/CSS/JavaScript
HTML
CSS
Javascript
C++
C
PHP
Java
Python
Swift
C#
Ruby
Node.JS
Kotlin
jQuery
Go
R
TypeScript
Start Python Course
Register
Max. length of third side of a triangle given two sides
+1
Author: Nikhil Balai
Dark
Public
Save
PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
#Maximum length of the third side
#of a triangle given two sides
def
maximum
(
a
,
b
):
c=
(
a+b
)
-1
return
c
x =
int
(
input
())
print
(
x
)
y =
int
(
input
())
print
(
y
)
print
(
maximum
(
x
,
y
))
Enter to Rename, Shift+Enter to Preview
OUTPUT