Re: [Tutor] [Help] urllib.error.HTTPError: HTTP Error 400: Bad Request

2018-02-13 Thread Peter Otten
cm wrote: > Dear tutors, > > I have written below function to open the profanity check url and then > to check for profanity in some text. When I go to the url > http://www.wdylike.appspot.com/?q= and type in the same text, it works > fine. > > I am using Microsoft OS X and Python 3.5.2 Interpre

[Tutor] [Help] urllib.error.HTTPError: HTTP Error 400: Bad Request

2018-02-13 Thread cm
Dear tutors, I have written below function to open the profanity check url and then to check for profanity in some text. When I go to the url http://www.wdylike.appspot.com/?q= and type in the same text, it works fine. I am using Microsoft OS X and Python 3.5.2 Interpreter with Pycharm Community

Re: [Tutor] help

2018-02-08 Thread Frank Dominguez
Thanks for the tip! On Feb 7, 2018 18:49, "Rex" wrote: > I think you need to convert the input value to an integer with > int(variable_name) > > > > Sent from my iPhone > > > On Feb 7, 2018, at 4:34 PM, Frank Dominguez > wrote: > > > > greetings, > > this is my first time using python and i jus

Re: [Tutor] help

2018-02-07 Thread Rex via Tutor
I think you need to convert the input value to an integer with int(variable_name) Sent from my iPhone > On Feb 7, 2018, at 4:34 PM, Frank Dominguez wrote: > > greetings, > this is my first time using python and i just cannot figure out what I am > doing wrong im sure the answer is very simpl

Re: [Tutor] help

2018-02-07 Thread Alan Gauld via Tutor
On 07/02/18 21:34, Frank Dominguez wrote: > this is my first time using python and i just cannot figure out what I am > doing wrong im sure the answer is very simple but sadly i do not know what Please always include full error messages in your mail - don't assume we will willingly run buggy cod

[Tutor] help

2018-02-07 Thread Frank Dominguez
greetings, this is my first time using python and i just cannot figure out what I am doing wrong im sure the answer is very simple but sadly i do not know what it is thanks for the help! ''' Author: Frank Dominguez CS 140: February 5, 2018 Python Lab 1 Determine the cost of landscaping a backyard

Re: [Tutor] help with some code for my 8 year old! Thank you.

2018-02-03 Thread Alan Gauld via Tutor
On 03/02/18 02:12, JSelby wrote: >My 8 year old is reading Python for kids and is trying a few programs >from the book We are working on a Mac OS X ELCapitain. We are looking at >WHACK THE BOUNCING BALL. >He has copied the code below and we get the red error message below. Thi

Re: [Tutor] help with some code for my 8 year old! Thank you.

2018-02-03 Thread Whom Isac
Sorry can't see any error messages through the visible links. On 3 Feb. 2018, 7:08 pm, at 7:08 pm, JSelby wrote: > My 8 year old is reading Python for kids and is trying a few programs >from the book We are working on a Mac OS X ELCapitain. We are looking >at > WHACK THE BOUNCING BALL. >He h

[Tutor] help with some code for my 8 year old! Thank you.

2018-02-03 Thread JSelby
My 8 year old is reading Python for kids and is trying a few programs from the book We are working on a Mac OS X ELCapitain. We are looking at WHACK THE BOUNCING BALL. He has copied the code below and we get the red error message below. We followed the code exactly so are not sur

Re: [Tutor] Help regarding creating tags

2017-11-01 Thread Alan Gauld via Tutor
On 01/11/17 06:02, Hemant Sain wrote: > i want to tag categories to its menuname. Your description below does not explain how you will tag them together, you simply identify which menu items have a category, but no way to determine which category goes with which menu item? > i have a csv containi

[Tutor] Help regarding creating tags

2017-11-01 Thread Hemant Sain
i want to tag categories to its menuname. i have a csv containing menu item name and in other csv i have a column containing some strings, i want to pick that strings from categories and look into menu items if any menu item containing that string i want to create a new column next to menu item na

Re: [Tutor] Help with python 2.7

2017-10-30 Thread Mike Miller
This is a mailing list, so the best way to get help is to send a request with code examples and most importantly what you have already tried. That being said, there are some smart people on here, much more experienced than I am on Python so I would say you can get help with any problem you may have

Re: [Tutor] Help with python 2.7

2017-10-30 Thread Alan Gauld via Tutor
On 30/10/17 21:02, Alchemy wrote: > I’m stuck on the homework ,butmore importantly stuck on the concepts behind > the homework. > > Can your orginazation help? Yes, we are happy to help with homework although we won't usually give you the full answer. We will make suggestions and are happy to r

[Tutor] Help with python 2.7

2017-10-30 Thread Alchemy
Hello, I am in the midst of a career change from renovations to computers. I’m used to working conceptually and understand coding is that. I am taking an online opencourseare classfrom MIT “Introduction to computer science and programming”. The class uses python 2.7, has video lectures and homewo

Re: [Tutor] Help with putting numbers from highest to lowest.

2017-09-27 Thread Mark Lawrence via Tutor
Subject: [Tutor] Help with putting numbers from highest to lowest. Hello, When I used sort() to do that, but my problem is that sort() just arrange numbers from small to big, not from big to small. That is the issue I am having now. For instance: # The user is entering those numbers:a = 2.7b = 4.7c

Re: [Tutor] Help with putting numbers from highest to lowest.

2017-09-27 Thread Mark Lawrence via Tutor
On 27/09/2017 14:10, edmundo pierre via Tutor wrote: Hello, When I used sort() to do that, but my problem is that sort() just arrange numbers from small to big, not from big to small. That is the issue I am having now. For instance: # The user is entering those numbers:a = 2.7b = 4.7c= 5.8d = 7

Re: [Tutor] Help with putting numbers from highest to lowest.

2017-09-27 Thread Derry, James R
8:10 AM To: Tutor Python Subject: [Tutor] Help with putting numbers from highest to lowest. Hello, When I used sort() to do that, but my problem is that sort() just arrange numbers from small to big, not from big to small. That is the issue I am having now. For instance: # The user is entering

Re: [Tutor] Help with putting numbers from highest to lowest.

2017-09-27 Thread Roel Schroeven
edmundo pierre via Tutor schreef op 27/09/2017 15:10: Hello, When I used sort() to do that, but my problem is that sort() just arrange numbers from small to big, not from big to small. That is the issue I am having now. For instance: # The user is entering those numbers:a = 2.7b = 4.7c= 5.8d =

[Tutor] Help with putting numbers from highest to lowest.

2017-09-27 Thread edmundo pierre via Tutor
Hello, When I used sort() to do that, but my problem is that sort() just arrange numbers from small to big, not from big to small. That is the issue I am having now. For instance: # The user is entering those numbers:a = 2.7b = 4.7c= 5.8d = 7.9# I will like the answer to be like this: 7.9  5.8 

Re: [Tutor] Help

2017-09-15 Thread Abdur-Rahmaan Janhangeer
besides already written notes, i suggest use .split(".") floatNum = input("> ") parts = floatNum.split(".") whole = parts[0] deci = parts[1] Abdur-Rahmaan Janhangeer, Mauritius abdurrahmaanjanhangeer.wordpress.com On 7 Sep 2017 21:51, "edmundo pierre via Tutor" wrote: > > I am trying to wr

Re: [Tutor] Help

2017-09-07 Thread boB Stepp
Greetings Edmundo! On Thu, Sep 7, 2017 at 1:35 PM, Peter Otten <__pete...@web.de> wrote: > edmundo pierre via Tutor wrote: > >> >> I am trying to write a code that asks an User to Enter a decimal number, >> the my program should separate the number in two parts like this: 1 >> cae:Enter a number:

Re: [Tutor] Help

2017-09-07 Thread Mats Wichmann
On 09/07/2017 10:20 AM, edmundo pierre via Tutor wrote: > > I am trying to write a code that asks an User to Enter a decimal number, the > my program should separate the number in two parts like this: > 1 cae:Enter a number: 12.9Decimal part: 12whole part : 9 > 2 case:Enter: 10Decimal par:Whole p

Re: [Tutor] Help

2017-09-07 Thread Peter Otten
edmundo pierre via Tutor wrote: > > I am trying to write a code that asks an User to Enter a decimal number, > the my program should separate the number in two parts like this: 1 > cae:Enter a number: 12.9Decimal part: 12whole part : 9 2 case:Enter: > 10Decimal par:Whole part: 10 That is my code:

[Tutor] Help

2017-09-07 Thread edmundo pierre via Tutor
I am trying to write a code that asks an User to Enter a decimal number, the my program should separate the number in two parts like this: 1 cae:Enter a number: 12.9Decimal part: 12whole part : 9 2 case:Enter: 10Decimal par:Whole part: 10 That is my code:  A = input("Enter a number") C = [ ]    

Re: [Tutor] Help

2017-09-06 Thread Chris Warrick
On 6 September 2017 at 08:39, edmundo pierre via Tutor wrote: > Hi Python, > I am trying to make a french to English dictionary. First of all, I made a > dictionary with keys and values. Then I asked the user to enter a letter. If > the letter correspond to the Keys, my print function should dis

[Tutor] Help

2017-09-06 Thread edmundo pierre via Tutor
Hi Python, I am trying to make a french to English dictionary. First of all, I made a dictionary with keys and values. Then I asked the user to enter a letter. If the letter correspond to the Keys, my print function should display the Key and value. But my code below, could not . Thank you! Lis

Re: [Tutor] Help With Python Tasks

2017-09-05 Thread Alan Gauld via Tutor
On 05/09/17 19:25, Ruth Hardy wrote: > I was wondering if you can help me please with these computer science tasks We can help, but we won;t do them for you. > First Task > > Write code do the following things involving strings. Wherever possible, > you should try to incorporate functions/pro

[Tutor] Help With Python Tasks

2017-09-05 Thread Ruth Hardy
Dear Sir or Madam I was wondering if you can help me please with these computer science tasks as I don’t know where to start: First Task Write code do the following things involving strings. Wherever possible, you should try to incorporate functions/procedures, although they are not appropr

Re: [Tutor] help with subprocess module

2017-08-19 Thread Cameron Simpson
On 19Aug2017 06:13, kay Cee wrote: update_log = open('update_log.txt', 'r+') Normally one would use 'a' (append) for a log open. I don't see what 'r+' accomplishes for you. In particular I expect it would always write at the start of the log file, overwriting whatever was there. W

Re: [Tutor] help with subprocess module

2017-08-19 Thread Alan Gauld via Tutor
On 19/08/17 11:13, kay Cee wrote: > import subprocess > import time > import datetime > > class UpdateError(Exception): > pass In defining your own type of Exception you implicitly say that you will be raising it somewhere. But you never raise this exception in your code... > def update():

Re: [Tutor] help with subprocess module

2017-08-19 Thread Mats Wichmann
On 08/19/2017 04:13 AM, kay Cee wrote: > I made a python script that will update a Ubuntu Server every second and > writes asuccess message and date to a log file, but for some reason the > file is not being written to. > > Here is the Script: > > #!/usr/bin/python3 > > import subprocess > impo

Re: [Tutor] help with subprocess module

2017-08-19 Thread Peter Otten
kay Cee wrote: > I made a python script that will update a Ubuntu Server every second and > writes asuccess message and date to a log file, but for some reason the > file is not being written to. > > Here is the Script: > > > #!/usr/bin/python3 > > > > import subprocess > > import time >

[Tutor] help with subprocess module

2017-08-19 Thread kay Cee
I made a python script that will update a Ubuntu Server every second and writes asuccess message and date to a log file, but for some reason the file is not being written to. Here is the Script: #!/usr/bin/python3 import subprocess import time import datetime class UpdateError(Exception)

Re: [Tutor] Help....

2017-08-17 Thread Alan Gauld via Tutor
On 17/08/17 14:17, edmundo pierre via Tutor wrote: > I am trying to write a code to solve a system of equation at 2 variables. > I used Tkinter to do it. More significantly you used numpy to do it and that seems to be where the issues lie, not in Tkinter. Numpy is part of SciPy which has a ded

[Tutor] Help....

2017-08-17 Thread edmundo pierre via Tutor
I am trying to write a code to solve a system of equation at 2 variables. I used Tkinter to do it. I disigned everything, but I am just stocked when it comes to display the answer on the screen.  That is the error I am having:    Exception in Tkinter callbackTraceback (most recent call last):  F

Re: [Tutor] help with macOS version 10.12.5

2017-07-10 Thread Carlton Banks
Have you tried brew install python3 Updating Homebrew... ==> Auto-updated Homebrew! Updated 3 taps (caskroom/cask, homebrew/core, homebrew/science). ==> Updated Formulae berkeley-dbhomebrew/science/nco percona-server bitrisehugo percon

[Tutor] help with macOS version 10.12.5

2017-07-10 Thread maia fornaro via Tutor
Hello, My name is maia and I'm train to install python 3 in my macOS sierra version 10.12.5 and I receive this error went i open python: Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "copyright", "credits" or "license()" for m

Re: [Tutor] Help - What is the best package to learn programming in Python?

2017-05-18 Thread Abdur-Rahmaan Janhangeer
for IDE, you have pycharm which works well i use Wing IDE personal. Nice for me. Don't forget to check the in-built IDLE tutorialspoint for python 2 or 3 is a nice quick reference. Learning how to do things the python way helps to ease jobs. else, python has become more than an average genera

Re: [Tutor] Help finishing a function

2017-05-17 Thread Alan Gauld via Tutor
Please use Reply-All or Reply-List when replying to the list, otherwise it only goes to me. On 17/05/17 17:21, Grace Sanford wrote: > Syntactically speaking, how can I check if an element in the list > "board" at position p equals "_" and then change that element to "0"? You can use the == operat

Re: [Tutor] Help - What is the best package to learn programming in Python?

2017-05-17 Thread Alan Gauld via Tutor
On 17/05/17 19:17, keith quach wrote: > I hope you could help. I am new to the Python community. I am looking > for your recommendation for a Windows 10 (64 bit) Python 3.6 > distribution package that covers all the necessary installtions/files. It depends on what you want to do. There is no si

[Tutor] Help - What is the best package to learn programming in Python?

2017-05-17 Thread keith quach
Hi, I hope you could help. I am new to the Python community. I am looking for your recommendation for a Windows 10 (64 bit) Python 3.6 distribution package that covers all the necessary installtions/files. Thanks, Keith ___ Tutor maillist - Tutor@

Re: [Tutor] Help finishing a function

2017-05-17 Thread Peter Otten
Grace Sanford wrote: > I am wondering if someone can help/advise me on finishing the code for > this function: > > import turtle > import time > import random > > # This list represents the board. It's a list > # of nine strings, each of which is either > # "X", "O", "_", representing, respectiv

Re: [Tutor] Help finishing a function

2017-05-17 Thread Alan Gauld via Tutor
On 17/05/17 14:31, Grace Sanford wrote: > I am wondering if someone can help/advise me on finishing the code for this > function: Please only send one email for a given i8ssue it gets confusing when people start responding to two different threads about the same question. Also please give us more

[Tutor] Help finishing a function

2017-05-17 Thread Grace Sanford
I am wondering if someone can help/advise me on finishing the code for this function: import turtle import time import random # This list represents the board. It's a list # of nine strings, each of which is either # "X", "O", "_", representing, respectively, # a position occupied by an X, by an

[Tutor] Help writing a function

2017-05-17 Thread Grace Sanford
I need suggestions/help for writing the following function: import turtle import time import random # This list represents the board. It's a list # of nine strings, each of which is either # "X", "O", "_", representing, respectively, # a position occupied by an X, by an O, and # an unoccupied pos

[Tutor] Help with scoping

2017-03-23 Thread Richard Mcewan
Hi Thanks Alan and all. I've incorporated your points. I've explored how values are returned and used by functions. I switched to Python to check a Swift3 bug and I think I can see a number of issues more clearly now. I put the count and call for next user guess back a tab at the end of the

Re: [Tutor] Help with function scoping

2017-03-23 Thread Alan Gauld via Tutor
On 23/03/17 10:15, Richard Mcewan wrote: > #loop to check guess and report > while userGuess != computerGuess: > if userGuess < computerGuess: > print('Too low') > userGuess = getUser() > elif userGuess > computerGuess: > print('Too high') >

[Tutor] Help with function scoping

2017-03-23 Thread Richard Mcewan
Hi Thanks Mats, Joel and Alan for helpful advice. This code (below) behaves as I wanted now. And think I see where I was going wrong with functions. Thank you very much. Richard Ps I'll reflect on appropriate variable names also. # coding: utf-8 import random #guess number game #compute

Re: [Tutor] Help with function scoping

2017-03-23 Thread Mats Wichmann
On 03/22/2017 03:17 PM, Richard Mcewan wrote: > Hi > > I wonder if you can help. > > I'm confused about how functions should work. Below is some code I write to > check my understanding. > > I'm expecting two functions to be defined. Then called. One returns a random > number. The other user

Re: [Tutor] Help with function scoping

2017-03-22 Thread Alan Gauld via Tutor
On 22/03/17 21:17, Richard Mcewan wrote: > I'm expecting two functions to be defined. Then called. And thats what you've got. But... > One returns a random number. The other user input (guessing the number). And thats also what you've got but you don't do anything with the returned value you

Re: [Tutor] Help with function scoping

2017-03-22 Thread Joel Goldstick
On Wed, Mar 22, 2017 at 5:17 PM, Richard Mcewan wrote: > Hi > > I wonder if you can help. > > I'm confused about how functions should work. Below is some code I write to > check my understanding. > > I'm expecting two functions to be defined. Then called. One returns a random > number. The other

[Tutor] Help with function scoping

2017-03-22 Thread Richard Mcewan
Hi I wonder if you can help. I'm confused about how functions should work. Below is some code I write to check my understanding. I'm expecting two functions to be defined. Then called. One returns a random number. The other user input (guessing the number). I expect the return values to ac

Re: [Tutor] Help!! Code ridden with Bugs

2017-03-09 Thread Alan Gauld via Tutor
On 09/03/17 18:42, Eloka Chima via Tutor wrote: > Is my code okay. > > THERE IS AN ERROR/BUG IN YOUR CODE > Results: Traceback (most recent call last): File "python/nose2/bin/nose2", > line 8, Evidently not. But the error messages are unreadable, please send in plain text. -- Alan G Author o

Re: [Tutor] Help!! Code ridden with Bugs

2017-03-09 Thread Alan Gauld via Tutor
On 09/03/17 13:28, Eloka Chima via Tutor wrote: > My assignment below is ridden with bugs So tell us what they are don;t make us guess and don't expect us to run code which is by your own admission faulty! If you get error messages post them, in full. If it runs but misbehaves tell us what happen

Re: [Tutor] Help!! Code ridden with Bugs

2017-03-09 Thread Mats Wichmann
On 03/09/2017 12:32 PM, Joel Goldstick wrote: > On Thu, Mar 9, 2017 at 8:28 AM, Eloka Chima via Tutor > wrote: >> I am new to programming but an immersive study in the past few weeks have >> brought me to speed so I can play around with codes but not really mastered >> them.My assignment below

Re: [Tutor] Help!! Code ridden with Bugs

2017-03-09 Thread Eloka Chima via Tutor
Is my code okay. Sent from Yahoo Mail on Android On Thu, 9 Mar 2017 at 7:41 pm, Eloka Chima wrote: Your Code Solution Has Errors THERE IS AN ERROR/BUG IN YOUR CODE Results: Traceback (most recent call last): File "python/nose2/bin/nose2", line 8, in discover() File "/usr/local/lib/pyt

Re: [Tutor] Help!! Code ridden with Bugs

2017-03-09 Thread Eloka Chima via Tutor
Your Code Solution Has Errors THERE IS AN ERROR/BUG IN YOUR CODE Results: Traceback (most recent call last): File "python/nose2/bin/nose2", line 8, in discover() File "/usr/local/lib/python2.7/dist-packages/nose2-0.5.0-py2.7.egg/nose2/main.py", line 300, in discover return main(*args, **kwar

Re: [Tutor] Help!! Code ridden with Bugs

2017-03-09 Thread Sri Kavi
def checkout(self, cash_paid): self.cash_paid = cash_paid if self.cash_paid < self.total: self.total -= self.cash_paid return self.total return "Cash paid is not enough" You cannot return two values. Sri On Thu, Mar 9, 2017 at 6:58 PM, Eloka Chima via Tutor wrot

Re: [Tutor] Help!! Code ridden with Bugs

2017-03-09 Thread Joel Goldstick
On Thu, Mar 9, 2017 at 8:28 AM, Eloka Chima via Tutor wrote: > I am new to programming but an immersive study in the past few weeks have > brought me to speed so I can play around with codes but not really mastered > them.My assignment below is ridden with bugs and I've done so much to get rid

[Tutor] Help!! Code ridden with Bugs

2017-03-09 Thread Eloka Chima via Tutor
I am new to programming but an immersive  study in the past few weeks have brought me to speed so I can play around with codes but not really mastered them.My assignment below is ridden with bugs and I've done so much to get rid of them but to no avail. Below is the project : Create a class cal

Re: [Tutor] help with and

2017-03-01 Thread Steven D'Aprano
On Wed, Mar 01, 2017 at 09:29:04AM +, Alan Gauld via Tutor wrote: > You need to be explicit: > >if hours_worked > 40 and hours_worked < 60: > > You can also write what you intend in a slightly > different form: > >if (40 < hours_worked < 60): > > Note: > The second form an unusual

Re: [Tutor] help with and

2017-03-01 Thread Peter Otten
darrickbled...@gmail.com wrote: > For some reason I am getting a syntax error when I try and write my second > If statement. I cannot find anything wrong with the statement because it > is set up the same as all the others I see online. Perhaps someone can > inform me why I am getting this. Thanks

Re: [Tutor] help with and

2017-03-01 Thread Alan Gauld via Tutor
On 01/03/17 06:21, darrickbled...@gmail.com wrote: > wage = eval(input("Enter in the employees hourly wage: ")) #get wage > hours_worked = eval(input("Enter in the number of hours worked: ")) Don't use eval() like this it is a security risk and is a very bad habit to get into. Instead use an expl

[Tutor] help with and

2017-03-01 Thread darrickbledsoe
For some reason I am getting a syntax error when I try and write my second If statement. I cannot find anything wrong with the statement because it is set up the same as all the others I see online. Perhaps someone can inform me why I am getting this. Thanks for your help Darrick Bledsoe II #

Re: [Tutor] Help with this question

2017-02-27 Thread Alan Gauld via Tutor
On 27/02/17 22:00, Johnny Hh wrote: > write a python function called find_most_freq() that returns the element of > a given list that occurs the most frequently. If there are ties, take the > number found first. OK, You've shown us the exercise, now show us your attempt at a solution. Here is a s

[Tutor] Help with this question

2017-02-27 Thread Johnny Hh
write a python function called find_most_freq() that returns the element of a given list that occurs the most frequently. If there are ties, take the number found first. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options

Re: [Tutor] Help with random in Tkinter

2017-02-13 Thread Alan Gauld via Tutor
On 13/02/17 13:30, Lisa Hasler Waters wrote: > It runs fine when we use IDLE. But, we love PyCharmEDU as it is much more > user-friendly and so we hope to run the same programs in it as we can in > IDLE. That shouldn't make much difference unless PyCharm sets its default folders differently? BTW

[Tutor] Help with random in Tkinter

2017-02-13 Thread Lisa Hasler Waters
Hello Python Tutor, We are trying to use the random function in the Tkinter module in PyCharmEDU 3.5. However, we get a number of error messages (see screen shot): [image: Inline image 1] It runs fine when we use IDLE. But, we love PyCharmEDU as it is much more user-friendly and so we hope to r

Re: [Tutor] Help

2017-02-10 Thread Joaquin Alzola
>Please assist with this assignment >Write a function my_sort which takes in a list of numbers (positive >integers). >The function should return a list of sorted numbers such that odd numbers >come first and even numbers come last. You can search for even or odd numbers with the modulo (%) opera

Re: [Tutor] Help

2017-02-10 Thread Alan Gauld via Tutor
On 10/02/17 02:05, Sasiliyu Adetunji wrote: > Please assist with this assignment > > Write a function my_sort which takes in a list of numbers (positive > integers). > > The function should return a list of sorted numbers such that odd numbers > come first and even numbers come last. def my_sort

[Tutor] Help

2017-02-10 Thread Sasiliyu Adetunji
Please assist with this assignment Write a function my_sort which takes in a list of numbers (positive integers). The function should return a list of sorted numbers such that odd numbers come first and even numbers come last. Regards ___ Tutor mailli

Re: [Tutor] Help with Multiple Inheritance in Classes

2017-02-09 Thread Alan Gauld via Tutor
On 09/02/17 10:42, Vusa Moyo wrote: > Thanks so much. You've been a great help. > > You have confirmed that the lecture's question is flawed. It is not, it is exactly right. (Albeit unusual in its use of class attributes) but there is nothing wrong with the code, only the way you were trying to u

Re: [Tutor] Help with Multiple Inheritance in Classes

2017-02-09 Thread Vusa Moyo
Thanks so much. You've been a great help. You have confirmed that the lecture's question is flawed. Appreciate the help. Regards Vusa On Thu, Feb 9, 2017 at 12:02 PM, Alan Gauld via Tutor wrote: > On 09/02/17 09:25, Vusa Moyo wrote: > > > class Cat: > > name = "" > > kind = "cat" > >

Re: [Tutor] Help with Multiple Inheritance in Classes

2017-02-09 Thread Alan Gauld via Tutor
On 09/02/17 09:25, Vusa Moyo wrote: > class Cat: > name = "" > kind = "cat" > color = "" > value = 100.00 > > def description(self): > desc_str = "%s is a %s %s cat worth R%.2f." % (self.name, > self.color, self.kind, self.value) > return desc_str > > The abov

Re: [Tutor] Help with Multiple Inheritance in Classes

2017-02-09 Thread Vusa Moyo
Hi Alan. You are correct with the indentation. class Cat: name = "" kind = "cat" color = "" value = 100.00 def description(self): desc_str = "%s is a %s %s cat worth R%.2f." % (self.name, self.color, self.kind, self.value) return desc_str The above code is th

Re: [Tutor] Help on this assignment

2017-02-09 Thread Alan Gauld via Tutor
On 09/02/17 08:10, Sasiliyu Adetunji wrote: > Write a function called remove_duplicates which will take one argument > called string. This string input will only have characters between a-z. > > The function should remove all repeated characters in the string and return > a tuple with two values:

[Tutor] Help on this assignment

2017-02-09 Thread Sasiliyu Adetunji
Please can you assist me in this assignment Write a function called remove_duplicates which will take one argument called string. This string input will only have characters between a-z. The function should remove all repeated characters in the string and return a tuple with two values: A new s

Re: [Tutor] Help on shoppingcart

2017-02-08 Thread Alan Gauld via Tutor
On 08/02/17 10:04, Sasiliyu Adetunji wrote: > Pls help me on this shoppingcart assignment Sure. You have a very specific set of tasks. Which bit are you stuck on? What have you tried? Show us your code and we can help get it working. > Create a class called ShoppingCart > Create a constructo

[Tutor] Help on shoppingcart

2017-02-08 Thread Sasiliyu Adetunji
Hi, Pls help me on this shoppingcart assignment Create a class called ShoppingCart Create a constructor that takes no arguments and sets the total attribute to zero, and initializes an empty dict attribute named items. Create a method add_item that requires item_name, quantity and price argume

Re: [Tutor] Help with Multiple Inheritance in Classes

2017-02-08 Thread Alan Gauld via Tutor
On 08/02/17 07:11, Vusa Moyo wrote: > I have a suspicion my lecturer's question is flawed, so I'd like to pose it > to you guys to confirm my suspicions. I think your interpretation of the question is flawed. See Peter's reply for why. However another point is > class Cat: > name = ""

Re: [Tutor] Help with Multiple Inheritance in Classes

2017-02-08 Thread Peter Otten
Vusa Moyo wrote: > I have a suspicion my lecturer's question is flawed, so I'd like to pose > it to you guys to confirm my suspicions. > > Here goes.. > > I've gone and created a Class Cat1(cat): <-- inherited class, but cant > seem get the code right which allows the test code to run successful

[Tutor] Help with Multiple Inheritance in Classes

2017-02-07 Thread Vusa Moyo
I have a suspicion my lecturer's question is flawed, so I'd like to pose it to you guys to confirm my suspicions. Here goes.. I've gone and created a Class Cat1(cat): <-- inherited class, but cant seem get the code right which allows the test code to run successfully. We have a class defined for

Re: [Tutor] Help with this work

2017-02-07 Thread Alan Gauld via Tutor
On 07/02/17 04:08, Sasiliyu Adetunji wrote: > I have been working on yhis assignment You are asking for help but in what regard? There is no question or problem statement in your post? I've put some general comments below... > class ShoppingCart(object): > > def __init__(self): > self.tot

Re: [Tutor] Help Please on python

2017-02-07 Thread Alan Gauld via Tutor
On 07/02/17 02:12, Laura Garcia wrote: > I need to create a python code that should simulate throwing darts by > random landing between (a random x and a random y)0 and 1. and the program > should print out number of darts that land within a rectangle. Look in the random module. There are a bunc

[Tutor] Help with this work

2017-02-07 Thread Sasiliyu Adetunji
Hi, I have been working on yhis assignment Create a class called ShoppingCart Create a constructor that takes no arguments and sets the total attribute to zero, and initializes an empty dict attribute named items. Create a method add_item that requires item_name, quantity and price arguments. Th

[Tutor] Help Please on python

2017-02-07 Thread Laura Garcia
I need to create a python code that should simulate throwing darts by random landing between (a random x and a random y)0 and 1. and the program should print out number of darts that land within a rectangle. ___ Tutor maillist - Tutor@python.org To un

Re: [Tutor] Help with a Conversion

2017-01-05 Thread S. P. Molnar
On 01/05/2017 01:10 PM, Peter Otten wrote: S. P. Molnar wrote: I have just started attempting programming in Python and am using Spyder with Python 3.5.2 on a Linux platform. (I first started programing in Fortran II using punched paper tape. Yes, am a rather elderly . . .). I have bumbled

Re: [Tutor] Help with a Conversion

2017-01-05 Thread Steven D'Aprano
On Thu, Jan 05, 2017 at 08:29:33AM -0500, S. P. Molnar wrote: [...] > To change the frequency to wave length I did the following: > > > p=1/1e7 > wave_length = p*np.array(frequency) > > (The relationship between wavelength and frequency is: wavelength = > 1.0e7/frequency, where 1e7 is the spee

Re: [Tutor] Help with a Conversion

2017-01-05 Thread Peter Otten
S. P. Molnar wrote: > I have just started attempting programming in Python and am using Spyder > with Python 3.5.2 on a Linux platform. (I first started programing in > Fortran II using punched paper tape. Yes, am a rather elderly . . .). > > I have bumbled through, what I foolishly thought was

Re: [Tutor] Help with a Conversion

2017-01-05 Thread S. P. Molnar
On 01/05/2017 11:41 AM, Alan Gauld via Tutor wrote: On 05/01/17 13:29, S. P. Molnar wrote: Fortran II using punched paper tape. Yes, am a rather elderly . . .). You are not the only one, there are at least 2 more of us on this list that started in that era... short program to change frequ

Re: [Tutor] Help with a Conversion

2017-01-05 Thread Alan Gauld via Tutor
On 05/01/17 13:29, S. P. Molnar wrote: > Fortran II using punched paper tape. Yes, am a rather elderly . . .). You are not the only one, there are at least 2 more of us on this list that started in that era... > short program to change frequency to wavelength for a plot of > ultraviolet spect

[Tutor] Help with a Conversion

2017-01-05 Thread S. P. Molnar
I have just started attempting programming in Python and am using Spyder with Python 3.5.2 on a Linux platform. (I first started programing in Fortran II using punched paper tape. Yes, am a rather elderly . . .). I have bumbled through, what I foolishly thought was a simple problem, a short

Re: [Tutor] help :making window

2016-12-31 Thread Alan Gauld via Tutor
On 31/12/16 16:05, syafiqah amir via Tutor wrote: > Hello,Im trying to execute the code but the window does not come out. Please always post python code in plain text, otherwise the html gets wrapped and it becomes illegible. > (script from Maya python for games and film) This group is for cor

Re: [Tutor] help :making window

2016-12-31 Thread Alex Kleider
On 2016-12-31 09:35, Joel Goldstick wrote: Semicolon (;) isn't used in python as a statement separator alex@X301n3:/mnt$ python3 Python 3.4.3 (default, Nov 17 2016, 01:11:57) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "license" for more information. gee = "really"; print(gee)

Re: [Tutor] help :making window

2016-12-31 Thread Joel Goldstick
On Sat, Dec 31, 2016 at 11:05 AM, syafiqah amir via Tutor wrote: > > > On Saturday, December 31, 2016 3:55 PM, syafiqah amir > wrote: > > > Hello,Im trying to execute the code but the window does not come out.(script > from Maya python for games and film)I'm not sure what I did wrong > im

[Tutor] help :making window

2016-12-31 Thread syafiqah amir via Tutor
On Saturday, December 31, 2016 3:55 PM, syafiqah amir wrote: Hello,Im trying to execute the code but the window does not come out.(script from Maya python for games and film)I'm not sure what I did wrong import maya.cmds as cmds; class AR_OptionsWIndow(object):    def __init__(self): 

Re: [Tutor] Help on Software Design decisions

2016-11-29 Thread Juan C.
On Tue, Nov 29, 2016 at 7:12 AM, Alan Gauld via Tutor wrote: > I just noticed the last bit. > Is this a client side API or a server side API? > In other words are you building a set of services on the > server or are you building a module that makes it easy > for client side programs to access the

Re: [Tutor] Help on Software Design decisions

2016-11-29 Thread Alan Gauld via Tutor
On 29/11/16 02:02, Juan C. wrote: >>> I have to build my own Moodle API to be consumed by my program, I just noticed the last bit. Is this a client side API or a server side API? In other words are you building a set of services on the server or are you building a module that makes it easy for cl

Re: [Tutor] Help on Software Design decisions

2016-11-29 Thread Juan C.
On Mon, Nov 28, 2016 at 11:33 PM, Alan Gauld via Tutor wrote: > > On 28/11/16 21:53, Juan C. wrote: > > I'm a student and my university uses Moodle as their learning management > > system (LMS). > > Never heard of it but hopefully that doesn't matter :-) > > > 1. Bachelor's Degree in Computer Scie

Re: [Tutor] Help on Software Design decisions

2016-11-28 Thread Alan Gauld via Tutor
On 28/11/16 21:53, Juan C. wrote: > I'm a student and my university uses Moodle as their learning management > system (LMS). Never heard of it but hopefully that doesn't matter :-) > 1. Bachelor's Degree in Computer Science (duration: 8 semesters) > > 1.1. Unit 01: Mathematics Fundamental (dura

<    1   2   3   4   5   6   7   8   9   10   >