0

Module

#What’s wrong with my code? #Showing no output . from math import cos, sin x=int(input()) def solve_exp(x): y = math.sin(x)-math.cos(x)+math.sin(x)*math.cos(x) return y

26th Feb 2022, 12:35 AM
Knowledge Is Power
Knowledge Is Power - avatar
2 Réponses
+ 4
You have imported cos & sin from math, so that's all you need to use in the code. Also, you never called your function from math import cos, sin x=int(input()) def solve_exp(x): y = sin(x)-cos(x)+sin(x)*cos(x) return y print(solve_exp(x))
26th Feb 2022, 12:52 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 2
It doesn't work in C, maybe that's what's wrong..... https://www.sololearn.com/discuss/333866/?ref=app
26th Feb 2022, 12:42 AM
HungryTradie
HungryTradie - avatar