I'm probably trying to program a dragon calculator in at least lines, I have yet (in theory) it Below 10. The only problem is that I can not seem to work how to change the two strings to float, without adding more lines.
x = raw_input ("enter calc instructions.") A, B, c = x.split () If B == "-": print (AC) alif B == Print "A" Know that I have to do float () somewhere, I have not yet managed to find where to find EDIT: * I am trying to reduce the less I can reduce it, in this example, I do not care that this is a mess. Besides, I do not even know that your code is also 'overlapping' and misleading.
x = raw_input ("enter calc directions.") A, B, C = X.split () If B == "-": Print Float (A) - Float (C) Alif B == "+": Print Float (A) + Float (C) Alief B == "*": Print Float (A) * Float (C) Alief B == "/": Print Float (A) / Float (C) #B to B to
No comments:
Post a Comment