name = input(‘write down the area of what you want to get’)
if name == triangle:
l=int('gimme the length: ')
w=int('gimme the width: ')
area = l*w
print(‘the area is {area}’)
it says i didn’t define triangle, help me to define it, if it were an integer i would’ve just wrote int
name = input('write down the area of what you want to get: ')
if name == 'triangle':
l = int(input('length: '))
w = int(input('width: '))
area = l*w
print(f'the area is {area}')
To add:
Maybe (from the corrected code that I’ve posted) you can see where you went wrong. If you’re unclear on any aspect, feel free to ask.