[Tutor] Need PYTHON, MySQL, WEB2PY OR DJANGO Tutor

2018-08-15 Thread Hamid Nehoray via Tutor
Greetings,I'm an old programmer who has some old ERP systems deployed in few companies.  I need somebody to teach me the new ways using Python, MySql and Web2Py or Django.  I'm located in Los Angeles.Regards,Hamid Nehoray. ___ Tutor maillist - Tutor@p

Re: [Tutor] understanding Python naming conventions & semantics

2018-08-15 Thread Rafael Knuth
> A good thing to do but in some cases you have > to settle for "that's just the way Guido made it" :-) Thanks for the elaborate answer. That helps me a lot, as I see some similarities to natural languages: There is a clearly defined structure, but in some cases purely arbitrary decisions have be

Re: [Tutor] Times Tables Program that constantly tells you that you are wrong!

2018-08-15 Thread Matthew Polack
Thanks Alan and Peter, Really appreciate your replies. Will try this out tomorrow and see if I can get it to work. I keep googling things myself...but with my 'beginner' status sometimes struggle to understand the solutions out therebut in tiny steps am making progress! Certainly know a lot

Re: [Tutor] Times Tables Program that constantly tells you that you are wrong!

2018-08-15 Thread Alan Gauld via Tutor
On 15/08/18 10:18, Peter Otten wrote: > Matthew Polack wrote: > >> *Question 2:* >> Is there a way to centre text within the text frame? I can change the font >> and size...but don't know how to centre it? > > Ok, I wanted to know it myself, and found > > https://stackoverflow.com/questions/4256

Re: [Tutor] Times Tables Program that constantly tells you that you are wrong!

2018-08-15 Thread Peter Otten
Matthew Polack wrote: > *Question 2:* > Is there a way to centre text within the text frame? I can change the font > and size...but don't know how to centre it? Ok, I wanted to know it myself, and found https://stackoverflow.com/questions/42560585/how-do-i-center-text-in-the-tkinter-text-widget

Re: [Tutor] Times Tables Program that constantly tells you that you are wrong!

2018-08-15 Thread Peter Otten
Matthew Polack wrote: > *Question 1:* > > *Why cant the program check if 'answer' variable is correct?* Change the line result = "Sorry...you were wrong. in your script to result = "Sorry...you were wrong. Expected {!r}, but got {!r}".format(answer, response) and find out yours

Re: [Tutor] understanding Python naming conventions & semantics

2018-08-15 Thread Alan Gauld via Tutor
On 15/08/18 08:32, Rafael Knuth wrote: > I am trying to wrap my head around naming conventions & semantics in Python. A good question with a none to simple answer. In truth some of it goes back to essentially arbitrary decisions made by Guido vanRossum when he originally designed Python! The othe

Re: [Tutor] understanding Python naming conventions & semantics

2018-08-15 Thread Ben Finney
Rafael Knuth writes: > - List is a function, and read is a method, is that correct? * No, ‘list’ is a type. Types are callable; they return an instance of the type. * Yes, a file object has a ‘read’ method. * Every method is a function. Not every function is a method. > - Semantic wise it w

Re: [Tutor] Times Tables Program that constantly tells you that you are wrong!

2018-08-15 Thread Alan Gauld via Tutor
On 15/08/18 01:56, Matthew Polack wrote: > from tkinter import * > > import random > > answer = "global" You have the right concept but the wrong implementation. To declare a variable as global you declare it as normal in the outer scope then inside each function that uses it add a global line

[Tutor] understanding Python naming conventions & semantics

2018-08-15 Thread Rafael Knuth
I am trying to wrap my head around naming conventions & semantics in Python. Here are two code snippets, and below those two snippets are my questions: # code snippet 1 file_path = "C:\\Users\\...etl.csv" with open(file_path) as file_object: contents = file_object.read() contents_split = conte

[Tutor] Times Tables Program that constantly tells you that you are wrong!

2018-08-15 Thread Matthew Polack
Hi, A small group of students and I are making steady progress learning Python. Thanks for the people here who have helped us! I have an problem with my simple 'Times Tables Program'. The 'Make Problem' function works fine...it can generate a random problem and place it in a variable called "ans