Re: Multiplication
On Mon, Apr 1, 2024 at 1:26 PM Piergiorgio Sartor via Python-list wrote: > > On 01/04/2024 10.40, Stefan Ram wrote: > > Q: How can I multiply two variables in Python? I tried: > > > > a = 2 > > b = 3 > > print( ab ) > > > > but it did not work. > > > > A: No, this cannot work. To multiply, you need the multiplication > > operator. You can import the multiplication operator from "math": > > > > Code example: > > > > from math import * > > > > a = 2 > > b = 3 > > print( a * b ) > > I guess the operator "*" can be imported from any module... :-) > > bye, > > -- > > piergiorgio > > -- > https://mail.python.org/mailman/listinfo/python-list >>> a = 3 >>> b = 5 >>> print(a*b) 15 >>> No import is necessary. -- Joel Goldstick -- https://mail.python.org/mailman/listinfo/python-list
Re: Image enhance
On Tue, Sep 2, 2025 at 1:46 PM amrodi--- via Python-list wrote: > > I'm new to Python. > Operating System - Windows XP SP3 > Python 2.7 installed. > > I got a script that tries to improve the image? > I created a bat file using the command line. > > C:\python27\python.exe d:\temp\teste.py > > But even though it runs, it displays an error: > > "... no encoding declare..." > > Can anyone help? > > My sincere thanks in advance. > -- > https://mail.python.org/mailman3//lists/python-list.python.org Not sure if you have provided enough information. Perhaps show your code. Python 2.7 has been superseded for maybe 10 years or more with python3.x. Are you really using XP? wow! -- Joel Goldstick -- https://mail.python.org/mailman3//lists/python-list.python.org
