Re: Calculator Problem
On 5 February 2014 02:22, Dan Sommers d...@tombstonezero.net wrote: On Tue, 04 Feb 2014 19:53:52 -0500, Roy Smith wrote: In article ed1c2ddd-f704-4d58-a5a4-aef13de88...@googlegroups.com, David Hutto dwightdhu...@gmail.com wrote: Can anyone point out how using an int as a var is possible one = 42 (ducking and running) int = 42 (ducking lower and running faster) globals()[1] = 42 (limbo, limbo, limbo like me) -- https://mail.python.org/mailman/listinfo/python-list
Re: Calculator Problem
Joshua Landau wrote: On 5 February 2014 02:22, Dan Sommers d...@tombstonezero.net wrote: On Tue, 04 Feb 2014 19:53:52 -0500, Roy Smith wrote: In article ed1c2ddd-f704-4d58-a5a4-aef13de88...@googlegroups.com, David Hutto dwightdhu...@gmail.com wrote: Can anyone point out how using an int as a var is possible one = 42 (ducking and running) int = 42 (ducking lower and running faster) globals()[1] = 42 (limbo, limbo, limbo like me) import sys, ctypes ctypes.memmove(id(42), id(1), sys.getsizeof(42)) 37657512 42 1 Hm... -- https://mail.python.org/mailman/listinfo/python-list
Re: Calculator Problem
On Monday, February 3, 2014 5:16:44 AM UTC+8, Charlie Winn wrote: Hey Guys i Need Help , When i run this program i get the 'None' Under the program, see what i mean by just running it , can someone help me fix this def Addition(): print('Addition: What are two your numbers?') 1 = float(input('First Number:')) 2 = float(input('Second Number:')) print('Your Final Result is:', 1 + 2) def Subtraction(): print('Subtraction: What are two your numbers?') 3 = float(input('First Number:')) 4 = float(input('Second Number:')) print('Your Final Result is:', 3 - 4) def Multiplication(): print('Multiplication: What are two your numbers?') 5 = float(input('First Number:')) 6 = float(input('Second Number:')) print('Your Final Result is:', 5 * 6) def Division(): print('Division: What are your two numbers?') 7 = float(input('First Number:')) 8 = float(input('Second Number:')) print('Your Final Result is:', 7 / 8) print('What type of calculation would you like to do?') Question = input('(Add, Subtract, Divide or Multiply)') if Question.lower().startswith('a'): print(Addition()) elif Question.lower().startswith('s'): print(Subtraction()) elif Question.lower().startswith('d'): print(Division()) elif Question.lower().startswith('m'): print(Multiplication()) else: print('Please Enter The First Letter Of The Type Of Calculation You Would Like To Use') while Question == 'test': Question() I suggest just get an input string of the valid python expression type first. Then just use exec and _ or eval to get the result. -- https://mail.python.org/mailman/listinfo/python-list
Re: Calculator Problem
On Sunday, February 2, 2014 4:16:44 PM UTC-5, Charlie Winn wrote: Hey Guys i Need Help , When i run this program i get the 'None' Under the program, see what i mean by just running it , can someone help me fix this def Addition(): print('Addition: What are two your numbers?') 1 = float(input('First Number:')) 2 = float(input('Second Number:')) print('Your Final Result is:', 1 + 2) def Subtraction(): print('Subtraction: What are two your numbers?') 3 = float(input('First Number:')) 4 = float(input('Second Number:')) print('Your Final Result is:', 3 - 4) def Multiplication(): print('Multiplication: What are two your numbers?') 5 = float(input('First Number:')) 6 = float(input('Second Number:')) print('Your Final Result is:', 5 * 6) def Division(): print('Division: What are your two numbers?') 7 = float(input('First Number:')) 8 = float(input('Second Number:')) print('Your Final Result is:', 7 / 8) print('What type of calculation would you like to do?') Question = input('(Add, Subtract, Divide or Multiply)') if Question.lower().startswith('a'): print(Addition()) elif Question.lower().startswith('s'): print(Subtraction()) elif Question.lower().startswith('d'): print(Division()) elif Question.lower().startswith('m'): print(Multiplication()) else: print('Please Enter The First Letter Of The Type Of Calculation You Would Like To Use') while Question == 'test': Question() Can anyone point out how using an int as a var is possible, unless it's something I miss that changed in 3.3 from 3.2: david@david:~$ python3.2 Python 3.2.3 (default, Sep 25 2013, 18:25:56) [GCC 4.6.3] on linux2 Type help, copyright, credits or license for more information. 7 = float(input('First Number:')) File stdin, line 1 SyntaxError: can't assign to literal david@david:~$ python Python 2.7.3 (default, Sep 26 2013, 20:08:41) [GCC 4.6.3] on linux2 Type help, copyright, credits or license for more information. 7 = float(input('First Number:')) File stdin, line 1 SyntaxError: can't assign to literal -- https://mail.python.org/mailman/listinfo/python-list
Re: Calculator Problem
Missed that it's already pointed out, was looking at the google groups combined email. On Tue, Feb 4, 2014 at 10:43 AM, David Hutto dwightdhu...@gmail.com wrote: On Sunday, February 2, 2014 4:16:44 PM UTC-5, Charlie Winn wrote: Hey Guys i Need Help , When i run this program i get the 'None' Under the program, see what i mean by just running it , can someone help me fix this def Addition(): print('Addition: What are two your numbers?') 1 = float(input('First Number:')) 2 = float(input('Second Number:')) print('Your Final Result is:', 1 + 2) def Subtraction(): print('Subtraction: What are two your numbers?') 3 = float(input('First Number:')) 4 = float(input('Second Number:')) print('Your Final Result is:', 3 - 4) def Multiplication(): print('Multiplication: What are two your numbers?') 5 = float(input('First Number:')) 6 = float(input('Second Number:')) print('Your Final Result is:', 5 * 6) def Division(): print('Division: What are your two numbers?') 7 = float(input('First Number:')) 8 = float(input('Second Number:')) print('Your Final Result is:', 7 / 8) print('What type of calculation would you like to do?') Question = input('(Add, Subtract, Divide or Multiply)') if Question.lower().startswith('a'): print(Addition()) elif Question.lower().startswith('s'): print(Subtraction()) elif Question.lower().startswith('d'): print(Division()) elif Question.lower().startswith('m'): print(Multiplication()) else: print('Please Enter The First Letter Of The Type Of Calculation You Would Like To Use') while Question == 'test': Question() Can anyone point out how using an int as a var is possible, unless it's something I miss that changed in 3.3 from 3.2: david@david:~$ python3.2 Python 3.2.3 (default, Sep 25 2013, 18:25:56) [GCC 4.6.3] on linux2 Type help, copyright, credits or license for more information. 7 = float(input('First Number:')) File stdin, line 1 SyntaxError: can't assign to literal david@david:~$ python Python 2.7.3 (default, Sep 26 2013, 20:08:41) [GCC 4.6.3] on linux2 Type help, copyright, credits or license for more information. 7 = float(input('First Number:')) File stdin, line 1 SyntaxError: can't assign to literal -- https://mail.python.org/mailman/listinfo/python-list -- Best Regards, David Hutto *CEO:* *http://www.hitwebdevelopment.com http://www.hitwebdevelopment.com* -- https://mail.python.org/mailman/listinfo/python-list
Re: Calculator Problem
On Sunday, February 2, 2014 4:16:44 PM UTC-5, Charlie Winn wrote: Hey Guys i Need Help , When i run this program i get the 'None' Under the program, see what i mean by just running it , can someone help me fix this def Addition(): print('Addition: What are two your numbers?') 1 = float(input('First Number:')) 2 = float(input('Second Number:')) print('Your Final Result is:', 1 + 2) def Subtraction(): print('Subtraction: What are two your numbers?') 3 = float(input('First Number:')) 4 = float(input('Second Number:')) print('Your Final Result is:', 3 - 4) def Multiplication(): print('Multiplication: What are two your numbers?') 5 = float(input('First Number:')) 6 = float(input('Second Number:')) print('Your Final Result is:', 5 * 6) def Division(): print('Division: What are your two numbers?') 7 = float(input('First Number:')) 8 = float(input('Second Number:')) print('Your Final Result is:', 7 / 8) print('What type of calculation would you like to do?') Question = input('(Add, Subtract, Divide or Multiply)') if Question.lower().startswith('a'): print(Addition()) elif Question.lower().startswith('s'): print(Subtraction()) elif Question.lower().startswith('d'): print(Division()) elif Question.lower().startswith('m'): print(Multiplication()) else: print('Please Enter The First Letter Of The Type Of Calculation You Would Like To Use') while Question == 'test': Question() I don't know why people bother trying to help you, when it is YOU that has a *** rude attitude. You are asking the wrong question to begin with because the posted code could have NEVER given you the stated output. Most of us here are noobs and those that are not, were noobs once; so we all can deal with noobs, but none should have to deal with a***holes. -- https://mail.python.org/mailman/listinfo/python-list
Re: Calculator Problem
In article ed1c2ddd-f704-4d58-a5a4-aef13de88...@googlegroups.com, David Hutto dwightdhu...@gmail.com wrote: Can anyone point out how using an int as a var is possible one = 42 (ducking and running) -- https://mail.python.org/mailman/listinfo/python-list
Re: Calculator Problem
On Wed, Feb 5, 2014 at 11:53 AM, Roy Smith r...@panix.com wrote: In article ed1c2ddd-f704-4d58-a5a4-aef13de88...@googlegroups.com, David Hutto dwightdhu...@gmail.com wrote: Can anyone point out how using an int as a var is possible one = 42 (ducking and running) In theory, there might be a Unicode character that's valid as an identifier, but gets converted into U+0031 for ASCIIfication prior to being sent by email. However, I can't find one :) And of course, that assumes that the OP's mail client mangles its input in that way. ASCIIfication shouldn't be necessary. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: Calculator Problem
On Tue, 04 Feb 2014 19:53:52 -0500, Roy Smith wrote: In article ed1c2ddd-f704-4d58-a5a4-aef13de88...@googlegroups.com, David Hutto dwightdhu...@gmail.com wrote: Can anyone point out how using an int as a var is possible one = 42 (ducking and running) int = 42 (ducking lower and running faster) -- https://mail.python.org/mailman/listinfo/python-list
Re: Calculator Problem
On Sunday, February 2, 2014 9:46:24 PM UTC, Gary Herron wrote: On 02/02/2014 01:16 PM, Charlie Winn wrote: Hey Guys i Need Help , When i run this program i get the 'None' Under the program, see what i mean by just running it , can someone help me fix this def Addition(): print('Addition: What are two your numbers?') 1 = float(input('First Number:')) 2 = float(input('Second Number:')) print('Your Final Result is:', 1 + 2) def Subtraction(): print('Subtraction: What are two your numbers?') 3 = float(input('First Number:')) 4 = float(input('Second Number:')) print('Your Final Result is:', 3 - 4) def Multiplication(): print('Multiplication: What are two your numbers?') 5 = float(input('First Number:')) 6 = float(input('Second Number:')) print('Your Final Result is:', 5 * 6) def Division(): print('Division: What are your two numbers?') 7 = float(input('First Number:')) 8 = float(input('Second Number:')) print('Your Final Result is:', 7 / 8) print('What type of calculation would you like to do?') Question = input('(Add, Subtract, Divide or Multiply)') if Question.lower().startswith('a'): print(Addition()) elif Question.lower().startswith('s'): print(Subtraction()) elif Question.lower().startswith('d'): print(Division()) elif Question.lower().startswith('m'): print(Multiplication()) else: print('Please Enter The First Letter Of The Type Of Calculation You Would Like To Use') while Question == 'test': Question() Sorry, but in fact you did *not* run this program as you claim. It's full of syntax errors. Any attempt to run it will display syntax errors immediately, and never actually run. So please tell us what really happened. But even without an accurate description of what you did, I can say this: Lines like 1 = float(...) don't make sense. It's as if you are trying to change the value of the number one, but that's nonsense. And lines like print('Your Final Result is:', 5 * 6) had better print out 30 (since that is what 5 times 6 is) but that's clearly not what you intended. Gary Herron excuse me but don't be so *** rude , i did run this program and it did run correctly and if you want me to prove it with screenshots so be it , so don't make accusations ** Gary ** i only came here for some help not to be accused of not even running my program Charlie :D -- https://mail.python.org/mailman/listinfo/python-list
Re: Calculator Problem
On Feb 3, 2014 1:05 PM, Charlie Winn charliewin...@gmail.com wrote: On Sunday, February 2, 2014 9:46:24 PM UTC, Gary Herron wrote: On 02/02/2014 01:16 PM, Charlie Winn wrote: Hey Guys i Need Help , When i run this program i get the 'None' Under the program, see what i mean by just running it , can someone help me fix this def Addition(): print('Addition: What are two your numbers?') 1 = float(input('First Number:')) You can't name a variable a number 2 = float(input('Second Number:')) print('Your Final Result is:', 1 + 2) You should a result, then print it after the function. def Subtraction(): print('Subtraction: What are two your numbers?') 3 = float(input('First Number:')) 4 = float(input('Second Number:')) print('Your Final Result is:', 3 - 4) def Multiplication(): print('Multiplication: What are two your numbers?') 5 = float(input('First Number:')) 6 = float(input('Second Number:')) print('Your Final Result is:', 5 * 6) def Division(): print('Division: What are your two numbers?') 7 = float(input('First Number:')) 8 = float(input('Second Number:')) print('Your Final Result is:', 7 / 8) print('What type of calculation would you like to do?') Question = input('(Add, Subtract, Divide or Multiply)') if Question.lower().startswith('a'): print(Addition()) elif Question.lower().startswith('s'): print(Subtraction()) elif Question.lower().startswith('d'): print(Division()) elif Question.lower().startswith('m'): print(Multiplication()) else: print('Please Enter The First Letter Of The Type Of Calculation You Would Like To Use') while Question == 'test': Question() Sorry, but in fact you did *not* run this program as you claim. It's full of syntax errors. Any attempt to run it will display syntax errors immediately, and never actually run. So please tell us what really happened. But even without an accurate description of what you did, I can say this: Lines like 1 = float(...) don't make sense. It's as if you are trying to change the value of the number one, but that's nonsense. And lines like print('Your Final Result is:', 5 * 6) had better print out 30 (since that is what 5 times 6 is) but that's clearly not what you intended. Gary Herron excuse me but don't be so *** rude , i did run this program and it did run correctly and if you want me to prove it with screenshots so be it , so don't make accusations ** Gary ** i only came here for some help not to be accused of not even running my program If you can run this, cut and paste the results Charlie :D -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Re: Calculator Problem
Charlie Winn charliewin...@gmail.com wrote: excuse me but don't be so *** rude , i did run this program and it did run correctly and if you want me to prove it with screenshots so be it , so don't make accusations ** Gary ** i only came here for some help not to be accused of not even running my program Hi Charlie, I don't think anybody doubts that you ran your program. More likely, the code that you ran simply isn't the code that you posted. When posting code, it's best to copy-paste the exact code you ran. You posted this: def Addition(): print('Addition: What are two your numbers?') 1 = float(input('First Number:')) 2 = float(input('Second Number:')) print('Your Final Result is:', 1 + 2) That code could not have been what you ran, because it's not runnable. It's a syntax error (in both Python 2 and 3). -- https://mail.python.org/mailman/listinfo/python-list
Re: Calculator Problem
On Monday, February 3, 2014 6:17:44 PM UTC, Joel Goldstick wrote: On Feb 3, 2014 1:05 PM, Charlie Winn charli...@gmail.com wrote: On Sunday, February 2, 2014 9:46:24 PM UTC, Gary Herron wrote: On 02/02/2014 01:16 PM, Charlie Winn wrote: Hey Guys i Need Help , When i run this program i get the 'None' Under the program, see what i mean by just running it , can someone help me fix this def Addition(): print('Addition: What are two your numbers?') 1 = float(input('First Number:')) You can't name a variable a number 2 = float(input('Second Number:')) print('Your Final Result is:', 1 + 2) You should a result, then print it after the function. def Subtraction(): print('Subtraction: What are two your numbers?') 3 = float(input('First Number:')) 4 = float(input('Second Number:')) print('Your Final Result is:', 3 - 4) def Multiplication(): print('Multiplication: What are two your numbers?') 5 = float(input('First Number:')) 6 = float(input('Second Number:')) print('Your Final Result is:', 5 * 6) def Division(): print('Division: What are your two numbers?') 7 = float(input('First Number:')) 8 = float(input('Second Number:')) print('Your Final Result is:', 7 / 8) print('What type of calculation would you like to do?') Question = input('(Add, Subtract, Divide or Multiply)') if Question.lower().startswith('a'): print(Addition()) elif Question.lower().startswith('s'): print(Subtraction()) elif Question.lower().startswith('d'): print(Division()) elif Question.lower().startswith('m'): print(Multiplication()) else: print('Please Enter The First Letter Of The Type Of Calculation You Would Like To Use') while Question == 'test': Question() Sorry, but in fact you did *not* run this program as you claim. It's full of syntax errors. Any attempt to run it will display syntax errors immediately, and never actually run. So please tell us what really happened. But even without an accurate description of what you did, I can say this: Lines like 1 = float(...) don't make sense. It's as if you are trying to change the value of the number one, but that's nonsense. And lines like print('Your Final Result is:', 5 * 6) had better print out 30 (since that is what 5 times 6 is) but that's clearly not what you intended. Gary Herron excuse me but don't be so *** rude , i did run this program and it did run correctly and if you want me to prove it with screenshots so be it , so don't make accusations ** Gary ** i only came here for some help not to be accused of not even running my program If you can run this, cut and paste the results Charlie :D -- https://mail.python.org/mailman/listinfo/python-list Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:19:30) [MSC v.1600 64 bit (AMD64)] on win32 Type copyright, credits or license() for more information. RESTART What type of calculation would you like to do? (Add, Subtract, Divide or Multiply)a Addition: What are two your numbers? First Number:5 Second Number:96 Your Final Result is: 101.0 None -- https://mail.python.org/mailman/listinfo/python-list
Re: Calculator Problem
On Mon, 03 Feb 2014 10:04:35 -0800, Charlie Winn wrote: excuse me but don't be so *** rude , i did run this program and it did run correctly Charlie, you may have run *some* program, but it wasn't the program you posted here. And if it ran correctly, why are you asking for help? The code you ran and the code you posted here are not the same, because the code you posted will not run due to multiple syntax errors. If you had tried to run *that* program you would have received multiple syntax errors: py 1 = float(input('First Number:')) File stdin, line 1 SyntaxError: can't assign to literal So you must have run a different program. Please show us the program you *actually* used, and then we can help you. -- Steven -- https://mail.python.org/mailman/listinfo/python-list
Re: Calculator Problem
On 02/03/2014 10:04 AM, Charlie Winn wrote: On Sunday, February 2, 2014 9:46:24 PM UTC, Gary Herron wrote: ... Sorry, but in fact you did *not* run this program as you claim. It's full of syntax errors. Any attempt to run it will display syntax errors immediately, and never actually run. So please tell us what really happened. ... Gary Herron excuse me but don't be so *** rude , i did run this program and it did run correctly and if you want me to prove it with screenshots so be it , so don't make accusations ** Gary ** i only came here for some help not to be accused of not even running my program Charlie :D Sorry, it wasn't rude, it was a statement of fact pointing out an error on your part. You may *think* you ran the code you posted, but in fact you could not have done so.The code you posted will not run. Not in any version of Python, past, present or future. Assigning to a literal 1 = ... makes no sense and produces a syntax error. That's the only result you could have gotten. If you think that's what you've done, then by all means post a screen-shot showing is how you came to that conclusion, and we'll correct you again. But I'll guarantee with absolute certainty, that your posted Python program did not *run* correctly or incorrectly. People on the group are willing to help with nearly anything, but it's all a volunteer effort. You waste our time (either carelessly or maliciously) if you don't accurately post your code and the results of running that code. So please try again. You *will* get help. There are a number of other errors in your program also. We can get to those once we know what code you are really running, and are sure that you know what it means to *run* it, and that you can correctly identify the results -- error or not. Gary Herron -- https://mail.python.org/mailman/listinfo/python-list
Re: Calculator Problem
On Feb 3, 2014 3:26 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Mon, 03 Feb 2014 10:04:35 -0800, Charlie Winn wrote: excuse me but don't be so *** rude , i did run this program and it did run correctly Charlie, you may have run *some* program, but it wasn't the program you posted here. And if it ran correctly, why are you asking for help? He said previously that he doesn't want it printing the None after the result. I think that was already answered though: Assuming that the code being run is structurally similar to what was posted, it prints None because the calculator functions print their result instead of returning it, and then the main function also prints the return value from the calculator functions, which is None. The print should be in one place or the other, not both. -- https://mail.python.org/mailman/listinfo/python-list
Re: Calculator Problem
On Mon, 03 Feb 2014 10:25:37 -0800, Charlie Winn wrote: Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:19:30) [MSC v.1600 64 bit (AMD64)] on win32 Type copyright, credits or license() for more information. RESTART What type of calculation would you like to do? (Add, Subtract, Divide or Multiply)a Addition: What are two your numbers? First Number:5 Second Number:96 Your Final Result is: 101.0 None That wasn't obtained from running the code you posted. Your code *as you posted it* gives: $ python charlie.py File charlie.py, line 4 1 = float(input('First Number:')) SyntaxError: can't assign to literal $ -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Calculator Problem
On Sun, 02 Feb 2014 13:16:44 -0800, Charlie Winn wrote: Hey Guys i Need Help , When i run this program i get the 'None' Under the program, see what i mean by just running it , can someone help me fix this def Addition(): print('Addition: What are two your numbers?') 1 = float(input('First Number:')) 2 = float(input('Second Number:')) print('Your Final Result is:', 1 + 2) def Subtraction(): print('Subtraction: What are two your numbers?') 3 = float(input('First Number:')) 4 = float(input('Second Number:')) print('Your Final Result is:', 3 - 4) def Multiplication(): print('Multiplication: What are two your numbers?') 5 = float(input('First Number:')) 6 = float(input('Second Number:')) print('Your Final Result is:', 5 * 6) def Division(): print('Division: What are your two numbers?') 7 = float(input('First Number:')) 8 = float(input('Second Number:')) print('Your Final Result is:', 7 / 8) print('What type of calculation would you like to do?') Question = input('(Add, Subtract, Divide or Multiply)') if Question.lower().startswith('a'): print(Addition()) elif Question.lower().startswith('s'): print(Subtraction()) elif Question.lower().startswith('d'): print(Division()) elif Question.lower().startswith('m'): print(Multiplication()) else: print('Please Enter The First Letter Of The Type Of Calculation You Would Like To Use') while Question == 'test': Question() your functions need to return values not print them. I would also ask for the inputs before calling the functions I suggest you ask your tutor to go into more details if how to do this has not already been explained in your lessons. -- Tut mir Leid, Jost, aber Du bist ein unertraeglicher Troll. Was soll das? Du *beleidigst* die Trolle! -- de.comp.os.unix.linux.misc -- https://mail.python.org/mailman/listinfo/python-list
Re: Calculator Problem
On 02/02/2014 01:16 PM, Charlie Winn wrote: Hey Guys i Need Help , When i run this program i get the 'None' Under the program, see what i mean by just running it , can someone help me fix this def Addition(): print('Addition: What are two your numbers?') 1 = float(input('First Number:')) 2 = float(input('Second Number:')) print('Your Final Result is:', 1 + 2) def Subtraction(): print('Subtraction: What are two your numbers?') 3 = float(input('First Number:')) 4 = float(input('Second Number:')) print('Your Final Result is:', 3 - 4) def Multiplication(): print('Multiplication: What are two your numbers?') 5 = float(input('First Number:')) 6 = float(input('Second Number:')) print('Your Final Result is:', 5 * 6) def Division(): print('Division: What are your two numbers?') 7 = float(input('First Number:')) 8 = float(input('Second Number:')) print('Your Final Result is:', 7 / 8) print('What type of calculation would you like to do?') Question = input('(Add, Subtract, Divide or Multiply)') if Question.lower().startswith('a'): print(Addition()) elif Question.lower().startswith('s'): print(Subtraction()) elif Question.lower().startswith('d'): print(Division()) elif Question.lower().startswith('m'): print(Multiplication()) else: print('Please Enter The First Letter Of The Type Of Calculation You Would Like To Use') while Question == 'test': Question() Sorry, but in fact you did *not* run this program as you claim. It's full of syntax errors. Any attempt to run it will display syntax errors immediately, and never actually run. So please tell us what really happened. But even without an accurate description of what you did, I can say this: Lines like 1 = float(...) don't make sense. It's as if you are trying to change the value of the number one, but that's nonsense. And lines like print('Your Final Result is:', 5 * 6) had better print out 30 (since that is what 5 times 6 is) but that's clearly not what you intended. Gary Herron -- https://mail.python.org/mailman/listinfo/python-list
Re: Calculator Problem
On Sun, 02 Feb 2014 13:46:24 -0800, Gary Herron wrote: Sorry, but in fact you did *not* run this program as you claim. +1 I can also see a call to a function named Question, but I can't see where that function is defined. That might not be a major issue, because I don't think the while condition that leads to the function call is ever fulfilled anyway. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list