+ 4

What's the mistake

base = input('base=>') height = input('height=>') area = 1/2*base*height print(area)

27th Mar 2022, 12:42 PM
mk__ GAMER
mk__ GAMER - avatar
3 Answers
+ 4
# try this base = float(input('base=>')) height = float(input('height=>')) area = (1/2)*base*height print(area)
27th Mar 2022, 12:49 PM
SoloProg
SoloProg - avatar
+ 3
try this Base = int(input()) Height = int(input()) Area = 0.5*Base*Height print(Area)
29th Mar 2022, 5:58 AM
PIYUSH
PIYUSH - avatar
+ 2
The input return are strings The 2 seems to multiplied by the base and height Becuz the python does mutliplying first so your like 1/(2*base*height) Try like SoloProg said or like GAURAV YADAV said they are both right
29th Mar 2022, 6:40 AM
Grandizer
Grandizer - avatar