Output problem | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Output problem

how to get output of these line b=('float( (i-x) *2 +(j-y) *10 +(k-a) *5)') print (b) i have mentioned the value of i j k x y a... but how to get output in integer.. plz tell me the statement... when i run these it is writing add it is... but not the the answer... i want to do calculation with these kind.... plz help

21st Feb 2017, 1:33 PM
nikhil musale
nikhil musale - avatar
8 Answers
+ 2
ohk i will try... wait 2 min.
21st Feb 2017, 1:39 PM
nikhil musale
nikhil musale - avatar
+ 2
star lord plz help me
21st Feb 2017, 1:50 PM
nikhil musale
nikhil musale - avatar
+ 2
thanks star lord it worked
21st Feb 2017, 1:56 PM
nikhil musale
nikhil musale - avatar
+ 1
ohh no it is not working. plz help
21st Feb 2017, 1:42 PM
nikhil musale
nikhil musale - avatar
+ 1
shall i post my whole output
21st Feb 2017, 1:42 PM
nikhil musale
nikhil musale - avatar
+ 1
i=input('no. of orange candy taken') print(i) j=input('no. of chocobar candy') print(j) k=input('no. of vanila candy') print(k) l=input('no. of cups taken') print(l) x=input('no. of remaining orange') print(x) y=input('no. of remaining chocobar') print(y) a=input('no. of remaining vanilla') print(a) z=input('no. of remaining cup') print(z) print('total :-') b=float( (i-x) *2 +(j-y) *10 +(k-a) *5) print (b) print('benifit') c=float(b*(30/100)) print(c) print('we have to take:-') print(b-c)
21st Feb 2017, 1:45 PM
nikhil musale
nikhil musale - avatar
+ 1
u copy and paste and make input as 10,10,10,10 ,3,3,3,3
21st Feb 2017, 1:45 PM
nikhil musale
nikhil musale - avatar
+ 1
ohh thanks i will try it
21st Feb 2017, 1:52 PM
nikhil musale
nikhil musale - avatar