On Sunday, March 6, 2016 at 6:10:22 PM UTC+1, Mark Lawrence wrote: > On 06/03/2016 15:28, marco.naw...@colosso.nl wrote: > > On Sunday, March 6, 2016 at 3:16:19 PM UTC+1, Diego ... wrote: > >> Hello! I have a question in an exercise that says : Write an expression to > >> determine whether a person should or should not pay tax . Consider paying > >> tax people whose salary is greater than R $ 1,200.00 > >> > >> I do not know how to mount the logical expression !!! > >> > >> It's like: > >> > >> salary = 1250 > >> tax = Not True > >> salary > 1200 or not tax ???? > > > > Hello Diego, > > > > You are looking for the "if" statement. See the link below for > > the corresponding documentation: > > https://docs.python.org/2/tutorial/controlflow.html > > > > Your example would become something like: > > > > salary = 1250. > > if salary > 1200: > > has_to_pay_tax = True > > else: > > has_to_pay_tax = False > > > > Marco > > > > Why in the year 2016 are people still giving links to the Luddite Python > 2 docs? > > -- > My fellow Pythonistas, ask not what our language can do for you, ask > what you can do for our language. > > Mark Lawrence
On Sunday, March 6, 2016 at 6:10:22 PM UTC+1, Mark Lawrence wrote: > On 06/03/2016 15:28, marco.naw...@colosso.nl wrote: > > On Sunday, March 6, 2016 at 3:16:19 PM UTC+1, Diego ... wrote: > >> Hello! I have a question in an exercise that says : Write an expression to > >> determine whether a person should or should not pay tax . Consider paying > >> tax people whose salary is greater than R $ 1,200.00 > >> > >> I do not know how to mount the logical expression !!! > >> > >> It's like: > >> > >> salary = 1250 > >> tax = Not True > >> salary > 1200 or not tax ???? > > > > Hello Diego, > > > > You are looking for the "if" statement. See the link below for > > the corresponding documentation: > > https://docs.python.org/2/tutorial/controlflow.html > > > > Your example would become something like: > > > > salary = 1250. > > if salary > 1200: > > has_to_pay_tax = True > > else: > > has_to_pay_tax = False > > > > Marco > > > > Why in the year 2016 are people still giving links to the Luddite Python > 2 docs? > > -- > My fellow Pythonistas, ask not what our language can do for you, ask > what you can do for our language. > > Mark Lawrence > Why in the year 2016 are people still giving links to the Luddite Python >2 docs? As Ian already mentioned, the Python 2 docs came up as the first hit on Google. However, I agree with you that for a newcomers to Python a link to Python 3 would probably have been more appropriate (not that I believe the content of the sections would be any different). As a side note, you are probably aware that if you look at the Linux ecosystems there are still a lot of distributions that have Python 2 as a default. There are still also large mainstream libraries that do not (or just very recently) have support for Python 3. For me this in particular applied to VTK. I am now finally ready to move to Python 3. Marco -- https://mail.python.org/mailman/listinfo/python-list