Re: [Tutor] python question

2019-08-18 Thread Steven D'Aprano
On Sun, Aug 18, 2019 at 12:35:52PM +0800, Thejal Ramesh wrote: > Hi, i have a question regarding this question. I'm not quite sure what the > question is asking. Ask your tutor. We can help you with learning Python the programming language, not graph theory. https://en.wikipedia.org/wiki/Graph_t

Re: [Tutor] python question

2019-08-18 Thread Alan Gauld via Tutor
On 18/08/2019 05:35, Thejal Ramesh wrote: > Hi, i have a question regarding this question. I'm not quite sure what the > question is asking. > Part A: Popular (1.5 Marks) > Write a function popular(graph list, n) that returns a list of people who > have at least n friends. Each person is identifi

[Tutor] python question

2019-08-18 Thread Thejal Ramesh
Hi, i have a question regarding this question. I'm not quite sure what the question is asking. Part A: Popular (1.5 Marks) Write a function popular(graph list, n) that returns a list of people who have at least n friends. Each person is identified by the number of their vertex. Input: a nested lis

Re: [Tutor] Python Question

2018-05-16 Thread Alan Gauld via Tutor
On 15/05/18 22:26, Mahamed Ahmed wrote: > Please I would like you to help me solve the problem above We see no problem. this is a text only list so if you included a binary attachment the server will have stripped it off for security reasons. Please repost the text of the problem description and

Re: [Tutor] Python Question

2018-05-16 Thread Mats Wichmann
On 05/15/2018 03:26 PM, Mahamed Ahmed wrote: > Hello, > > Please I would like you to help me solve the problem above which is related > to loops and prime numbers so please get back to me, I also want to know how > to sign up and get a online tutor for this python course > > Here is what is sup

[Tutor] Python Question

2018-05-16 Thread Mahamed Ahmed
Hello, Please I would like you to help me solve the problem above which is related to loops and prime numbers so please get back to me, I also want to know how to sign up and get a online tutor for this python course Here is what is supposed to be done: The prime numbers and their code has alre

Re: [Tutor] Python Question: Excluding certain keywords.

2015-02-17 Thread Steven D'Aprano
Hi Arnold, and welcome. On Tue, Feb 17, 2015 at 02:30:34PM -0600, Arnold Chung wrote: > Dear Python Tutor. > > First of all, thank you for your kindness in advance. I am learning > python by myself and having some difficulties in a problem that I > encounter. > > Here I attach my python file.

Re: [Tutor] Python Question: Excluding certain keywords.

2015-02-17 Thread Dave Angel
On 02/17/2015 03:30 PM, Arnold Chung wrote: Dear Python Tutor. Welcome to the tutor list. As far as I can tell, this is your first post. And thank you for using text mail, rather than html. First of all, thank you for your kindness in advance. I am learning python by myself and having s

[Tutor] Python Question: Excluding certain keywords.

2015-02-17 Thread Arnold Chung
Dear Python Tutor. First of all, thank you for your kindness in advance. I am learning python by myself and having some difficulties in a problem that I encounter. Here I attach my python file. What I am trying to do is: 1) get the data by opening the data source, which is ‘apple.son' 2) obta

Re: [Tutor] Python Question

2014-01-11 Thread bruce
hey amy.. ok.. before we jump to coding (and forgive me if what I'm about to type is really basic!) let's play a bit with what's called psuedo-code. psuedo-code is a technique to kind of put your thoughts about a problem/approach in a hash of code/english.. kind of lets you lay out what you're tr

Re: [Tutor] Python Question

2014-01-11 Thread Amy Davidson
Hey! So luckily with the texts that were sent to me, I was able to figure out the answer(yay)! Unfortunately I am now stuck on a different question. "Write a function called highlight() that prompts the user for a string. Your code should ensure that the string is all lower case. Next, prompt th

Re: [Tutor] Python Question

2014-01-11 Thread wolfrage8...@gmail.com
It will also be helpful if you tell us your OS and Python Version. Can you also tell us if you are writing the code to a file and executing, using IDLE or some other IDE, or are you using the interpreter interactively? On Fri, Jan 10, 2014 at 8:57 PM, Amy Davidson wrote: > Hey Danny, > > I just

Re: [Tutor] Python Question

2014-01-10 Thread Danny Yoo
On Fri, Jan 10, 2014 at 5:57 PM, Amy Davidson wrote: > Hey Danny, > > I just started taking the course (introduction to Computer Science) on last > Tuesday, so I am not to familiar. I have been doing my best to understand > the material by reading the text book, Learn Python the hard way. > > I

Re: [Tutor] Python Question

2014-01-10 Thread Amy Davidson
Hey Danny, I just started taking the course (introduction to Computer Science) on last Tuesday, so I am not to familiar. I have been doing my best to understand the material by reading the text book, Learn Python the hard way. In my quest to answer the question given to me, I have searched the

Re: [Tutor] Python Question

2014-01-10 Thread Danny Yoo
On Fri, Jan 10, 2014 at 2:00 PM, Keith Winston wrote: > Amy, judging from Danny's replies, you may be emailing him and not the > list. If you want others to help, or to report on your progress, > you'll need to make sure the tutor email is in your reply to: Hi Amy, Very much so. Please try to u

Re: [Tutor] Python Question

2014-01-10 Thread Keith Winston
Amy, judging from Danny's replies, you may be emailing him and not the list. If you want others to help, or to report on your progress, you'll need to make sure the tutor email is in your reply to: Often, people prefer you to respond to the list, if there isn't something particularly personal in y

Re: [Tutor] Python Question

2014-01-10 Thread Danny Yoo
I repeat my question in the hopes that you read it. Do you have other examples of functions you have written or seen? I ask this because if you have never seen a function definition, our advice is radically different than if you have. Just giving us the homework statement is fairly useless to us

Re: [Tutor] Python Question

2014-01-10 Thread Danny Yoo
Hi Amy, Have you seen any other examples of functions in your instruction, either in your books or notes? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python Question

2014-01-10 Thread spir
On 01/10/2014 01:11 AM, Amy Davidson wrote: Hi, I am a university student who is struggling with writing functions in Python. I’ve been attempting to write a function in Python for over 2 hours with no progress. The function must be called, printID and take a name and student number as parame

Re: [Tutor] Python Question

2014-01-10 Thread Keith Winston
Amy, be aware that there are slightly different versions of Python floating around, and the example Dayo gave you uses a slightly different print statement (no parens) than the example you provided (which probably indicates that your Python requires them). Good luck, you're on your way! Keith ___

Re: [Tutor] Python Question

2014-01-10 Thread Alan Gauld
On 10/01/14 00:11, Amy Davidson wrote: Hi, I am a university student who is struggling with writing functions in Python. You could try reading the functions and modules topic in my tutorial.(see below) The function must be called, printID and take a name and student number > as parameter an

Re: [Tutor] Python Question

2014-01-10 Thread Keith Winston
Amy, you may want to get a little clearer on the difference between defining a function, and calling one. The definition is sort of a generic process, it's when you are calling it that you really fill in the blanks, and the function does what it's designed for (whether you like it or not!). You mi

Re: [Tutor] Python Question

2014-01-10 Thread jargon
On 01/10/2014 02:11 AM, Amy Davidson wrote: > Hi, > > I am a university student who is struggling with writing functions in Python. > I’ve been attempting to write a function in Python for over 2 hours with no > progress. The function must be called, printID and take a name and student > number

Re: [Tutor] Python Question

2014-01-10 Thread Mark Lawrence
On 10/01/2014 00:11, Amy Davidson wrote: Hi, I am a university student who is struggling with writing functions in Python. I’ve been attempting to write a function in Python for over 2 hours with no progress. The function must be called, printID and take a name and student number as parameter

[Tutor] Python Question

2014-01-10 Thread Amy Davidson
Hi, I am a university student who is struggling with writing functions in Python. I’ve been attempting to write a function in Python for over 2 hours with no progress. The function must be called, printID and take a name and student number as parameter and prints them to the screen. This is my

Re: [Tutor] python question

2013-10-25 Thread Alan Gauld
On 25/10/13 09:13, Amir Fawzi wrote: Exercise 7.4. Make a class for straight lines. Make a class Line whose constructor takes two points p1 and p2 (2- tuples or 2-lists) as input. The line goes through these two points (see function line in Chapter 3.1.7 for the relevant formula of the line).

[Tutor] python question

2013-10-25 Thread Amir Fawzi
Hi! I am trying to do an exercise abt classes, but I find it really hard even after reading. I have tryed to start it at the bottom of this document. I hope someone can help me. I have to submit the question by sunday. Exercise 7.4. Make a class for straight lines. Make a class Line whose con

Re: [Tutor] Python Question

2013-01-09 Thread eryksun
On Mon, Jan 7, 2013 at 6:31 PM, Dylan Kaufman wrote: > > from winsound import Beep > > Beep(196, 1500)#G winsound.Beep wraps the Windows (win32) system call of the same name. Instead, consider using a cross-platform library such as PortAudio or PortMidi: http://sourceforge.net/apps/trac/portmedi

Re: [Tutor] Python Question

2013-01-09 Thread Steve Willoughby
On 2013-1月-7, at 下午3:31, Dylan Kaufman wrote: > Greetings, > > I take Computer Science in school and for a Python program, I have: > > from winsound import Beep > The first thing I notice is "from winsound import …" Could that be a WINDOWS library which might not work on a Macintosh? > Bee

Re: [Tutor] Python Question

2013-01-08 Thread Oscar Benjamin
On 7 January 2013 23:31, Dylan Kaufman wrote: > Greetings, > > I take Computer Science in school and for a Python program, I have: > > from winsound import Beep > [SNIP] > > When I run it at school it works great, but at home when I try to run it, it > says: > > Traceback (most recent call last):

[Tutor] Python Question

2013-01-08 Thread Dylan Kaufman
Greetings, I take Computer Science in school and for a Python program, I have: from winsound import Beep Beep(196, 1500)#G Beep(262, 270)#C Beep(196, 200)#G Beep(165, 300)#E Beep(175, 200)#F Beep(196, 200)#G Beep(262, 550)#C Beep(196, 200)#G Beep(208, 150)#G# Beep(196, 200)#G Beep(175, 200)#F Be

Re: [Tutor] python question

2008-11-25 Thread Kent Johnson
On Tue, Nov 25, 2008 at 12:45 PM, Daniel J Kramer <[EMAIL PROTECTED]> wrote: > Hi Kent > > got it! Is it because Python must recognize the answer as lower case? It's because you change the user input to lower case, so you have to compare it against a lower case answer. Maybe this helps: In [1]: s

Re: [Tutor] python question

2008-11-25 Thread Daniel J Kramer
Hi Kent got it! Is it because Python must recognize the answer as lower case? sorry if that might seem like a dumb question, but I am looking to understand this program. cheers Daniel On Tue, Nov 25, 2008 at 12:38 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > On Tue, Nov 25, 2008 at 11:52 AM,

Re: [Tutor] python question

2008-11-25 Thread Kent Johnson
On Tue, Nov 25, 2008 at 11:52 AM, Daniel J Kramer <[EMAIL PROTECTED]> wrote: > Hi Kent > > I have been playing with the ,lower command and am not having much luck. It > seems like a simple task, but it is not working for me. Here is the code > > def main(): > score = 0 > print"Welcome

Re: [Tutor] python question

2008-11-22 Thread Kent Johnson
On Sat, Nov 22, 2008 at 2:39 PM, spir <[EMAIL PROTECTED]> wrote: > -1- Give each of your texts a name (Qn,An,...). Use these names to program > the logic. Associate a value to all of these names, creating 'constants', at > e.g. the head of your programm. > -2- Do the same, but in a separate file,

Re: [Tutor] python question

2008-11-22 Thread spir
Some comments on your code, after David & Kent: * repetition You have probably noticed that your programm repeats over and over the same pattern, that could be called "process of a question". One major point of programming is precisely to cope with such a repetitive task (this was true even be

Re: [Tutor] python question

2008-11-22 Thread Kent Johnson
On Fri, Nov 21, 2008 at 1:31 PM, Daniel J Kramer <[EMAIL PROTECTED]> wrote: > Hi > > I have just joined this list. I need some help working on a Python > application I am working on. I am working on a quiz game where the users > gain points when the answer questions correctly. I have written the

Re: [Tutor] python question

2008-11-21 Thread David
Daniel J Kramer wrote: > Hi > > I have just joined this list. I need some help working on a Python > application I am working on. I am working on a quiz game where the > users gain points when the answer questions correctly. I have written > the skeleton of the quiz with If, Elif and Else statem

[Tutor] python question

2008-11-21 Thread Daniel J Kramer
Hi I have just joined this list. I need some help working on a Python application I am working on. I am working on a quiz game where the users gain points when the answer questions correctly. I have written the skeleton of the quiz with If, Elif and Else statements. it runs perfectly. I am ver