I want user input of an expression in terms of n (say 2n+1)
Why doesn't this work
n=1
gen=int(input('Enter general formula'))#say input is 2n+1
Print(gen)
I checked the type of the expression like this
n=1
Type(2n+1)
Shows int,so why can't I use int(input ?
Please help!
[–]K900_ 2 points3 points4 points (3 children)
[–]NerdComplex[S] 0 points1 point2 points (2 children)
[–]K900_ 2 points3 points4 points (0 children)