Re: [Tutor] Need help,please!

2018-11-27 Thread Alan Gauld via Tutor
On 27/11/2018 21:04, Kamina Kamtarin wrote: > A De/Coder. Think back to 3rd grade when you passed notes to friends in > class. We can't let the teacher see what we're writing so we used a code. > A=1, B=2, C=3, etc. Your job is to create a program which does the > following: > >1. Presents

[Tutor] Need help,please!

2018-11-27 Thread Kamina Kamtarin
A De/Coder. Think back to 3rd grade when you passed notes to friends in class. We can't let the teacher see what we're writing so we used a code. A=1, B=2, C=3, etc. Your job is to create a program which does the following: 1. Presents the user with a menu choice: encode or decode 2.

Re: [Tutor] need help generating table of contents

2018-08-28 Thread Albert-Jan Roskam
From: Tutor on behalf of Peter Otten <__pete...@web.de> Sent: Monday, August 27, 2018 6:43 PM To: tutor@python.org Subject: Re: [Tutor] need help generating table of contents   Albert-Jan Roskam wrote: > > From: Tutor on behalf > of Peter Otten <__pete...@web.de> Se

Re: [Tutor] need help generating table of contents

2018-08-27 Thread Peter Otten
Albert-Jan Roskam wrote: > > From: Tutor on behalf > of Peter Otten <__pete...@web.de> Sent: Friday, August 24, 2018 3:55 PM > To: tutor@python.org > >> The following reshuffle of your code seems to work: >> >> print('\r\n** Table of contents\r\n') >> pattern = '/Title \((.+?)\).+?/Page

Re: [Tutor] need help generating table of contents

2018-08-27 Thread Albert-Jan Roskam
From: Tutor on behalf of Peter Otten <__pete...@web.de> Sent: Friday, August 24, 2018 3:55 PM To: tutor@python.org > The following reshuffle of your code seems to work: > > print('\r\n** Table of contents\r\n') > pattern = '/Title \((.+?)\).+?/Page ([0-9]+)(?:\s+/Count ([0-9]+))?' > > def

Re: [Tutor] need help generating table of contents

2018-08-25 Thread Cameron Simpson
On 24Aug2018 17:55, Peter Otten <__pete...@web.de> wrote: Albert-Jan Roskam wrote: I have Ghostscript files with a table of contents (toc) and I would like to use this info to generate a human-readable toc. The problem is: I can't get the (nested) hierarchy right. import re toc = """\ [

Re: [Tutor] need help generating table of contents

2018-08-24 Thread Peter Otten
Albert-Jan Roskam wrote: > Hello, > > I have Ghostscript files with a table of contents (toc) and I would like to use this info to generate a human-readable toc. The problem is: I can't get the (nested) hierarchy right. > > import re > > toc = """\ > [ /PageMode /UseOutlines > /Page 1 >

[Tutor] need help generating table of contents

2018-08-24 Thread Albert-Jan Roskam
Hello, I have Ghostscript files with a table of contents (toc) and I would like to use this info to generate a human-readable toc. The problem is: I can't get the (nested) hierarchy right. import re toc = """\ [ /PageMode /UseOutlines   /Page 1   /View [/XYZ null null 0]   /DOCVIEW pdfmark [

Re: [Tutor] Need help in learning Python

2018-08-13 Thread Wallis Short
I am also from a Linux background and I second exactly what James and David said. To learn Ubuntu, I would recommend installing Windows Subsystem for Linux onto your existing Windows 10 setup and then get the Ubuntu (or SUSE and Debian) from the Microsoft store and install. It does have a few

Re: [Tutor] Need help in learning Python

2018-08-12 Thread Carlos Monge
Thank you all. I will start in small steps. First Pygame and Ubuntu. I will add any errors I get. On Sun, Aug 12, 2018 at 11:51 AM, Mats Wichmann wrote: > > > Start with checking that pip is there (or installing it if not) > > Then do PyGae > > Then do Matplotlib > > For this, please note that

Re: [Tutor] Need help in learning Python

2018-08-12 Thread Mats Wichmann
> Start with checking that pip is there (or installing it if not) > Then do PyGae > Then do Matplotlib For this, please note that the pip "command" is not in the same directory on Windows as the python it is associated with. If you went through the steps to have Python in your PATH, and that

Re: [Tutor] Need help in learning Python

2018-08-12 Thread David Rock
> On Aug 11, 2018, at 20:34, James Gledhill via Tutor wrote: > > I know this is a python focused mail group, but you asked about Linux so I'll > answer. :-) > I would strongly recommend that you skip Kali Linux for the next little > while. Every tool available on Kali can be obtained on

Re: [Tutor] Need help in learning Python

2018-08-12 Thread James Gledhill via Tutor
I know this is a python focused mail group, but you asked about Linux so I'll answer. :-) I would strongly recommend that you skip Kali Linux for the next little while. Every tool available on Kali can be obtained on Ubuntu. Kali is not beginner friendly, and while the community is great,

Re: [Tutor] Need help in learning Python

2018-08-11 Thread Alan Gauld via Tutor
On 11/08/18 18:48, Carlos Monge wrote: > have learned To do those sections I need to install Pygame and make sure I > have 'pip' as well as Matplotlib. If you are using a recent Python (v3.4+) then pip should already be installed. PyGame comes with a Windows installer that should set everything

[Tutor] Need help in learning Python

2018-08-11 Thread Carlos Monge
I bought two books to help me learn Python. "Python Crash Course" and "Python for Informatics". I have done all of the basic lessons in "Python Crash Course", but it has two additional sections to help instill what I have learned To do those sections I need to install Pygame and make sure I

Re: [Tutor] Need help combining elements of a list of lists

2018-07-11 Thread Jim
On 07/10/2018 11:03 PM, Mats Wichmann wrote: On 07/10/2018 09:09 PM, Steven D'Aprano wrote: On Tue, Jul 10, 2018 at 09:46:57PM -0500, Jim wrote: Say I have a list like ltrs and I want to print out all the possible 3 letter combinations. I want to combine letters from each inner list but not

Re: [Tutor] Need help combining elements of a list of lists

2018-07-11 Thread Jim
On 07/10/2018 10:09 PM, David Rock wrote: On Jul 10, 2018, at 22:04, David Rock wrote: On Jul 10, 2018, at 21:46, Jim wrote: ltrs = [['A', 'B'], ['C', 'D', 'E'], ['F', 'G', 'H', 'I']] A fairly straightforward way is to use nested loops: for l in ltrs[0]: ... for j in ltrs[1]: ...

Re: [Tutor] Need help combining elements of a list of lists

2018-07-10 Thread David Rock
> On Jul 10, 2018, at 22:04, David Rock wrote: > >> On Jul 10, 2018, at 21:46, Jim wrote: >> >> ltrs = [['A', 'B'], ['C', 'D', 'E'], ['F', 'G', 'H', 'I']] > > A fairly straightforward way is to use nested loops: > for l in ltrs[0]: > ... for j in ltrs[1]: > ... for k in ltrs[2]:

Re: [Tutor] Need help combining elements of a list of lists

2018-07-10 Thread Steven D'Aprano
On Tue, Jul 10, 2018 at 09:46:57PM -0500, Jim wrote: > Say I have a list like ltrs and I want to print out all the possible 3 > letter combinations. I want to combine letters from each inner list but > not combine any letters within the inner list itself. So ACF and ADF > would be ok but ABC

Re: [Tutor] Need help combining elements of a list of lists

2018-07-10 Thread David Rock
> On Jul 10, 2018, at 21:46, Jim wrote: > > ltrs = [['A', 'B'], ['C', 'D', 'E'], ['F', 'G', 'H', 'I']] A fairly straightforward way is to use nested loops: >>> for l in ltrs[0]: ... for j in ltrs[1]: ... for k in ltrs[2]: ... print l,j,k A C F A C G A C H A C I A D F A D G A D H

[Tutor] Need help combining elements of a list of lists

2018-07-10 Thread Jim
Say I have a list like ltrs and I want to print out all the possible 3 letter combinations. I want to combine letters from each inner list but not combine any letters within the inner list itself. So ACF and ADF would be ok but ABC would not. I can lay it out manually and see the pattern, I

Re: [Tutor] Need help with a login system

2018-06-09 Thread Steven D'Aprano
On Sat, Jun 09, 2018 at 02:39:48PM +0200, Casper Rasmussen wrote: > So I am trying to make a simple login system just for fun and found this > video that has helped me a lot but there is a line I am not really sure how > works. > Screenshot at the bottom Unless you edit your code with Photoshop,

[Tutor] Need help with a login system

2018-06-09 Thread Casper Rasmussen
So I am trying to make a simple login system just for fun and found this video that has helped me a lot but there is a line I am not really sure how works. Screenshot at the bottom The line I don't understand is: user = {} I understand the how list works but this list I can't figure out. The

Re: [Tutor] Need help with a virtual environment mess

2018-05-07 Thread Jim
On 05/07/2018 12:02 PM, Mats Wichmann wrote: On 05/07/2018 10:16 AM, Jim wrote: My understanding of VE's, based on some feedback from here, is you install install the python you want on the system then use it to install your VE. Then you install what ever you need to the VE. In my case I had a

Re: [Tutor] Need help with a virtual environment mess

2018-05-07 Thread Mats Wichmann
On 05/07/2018 10:16 AM, Jim wrote: > My understanding of VE's, based on some feedback from here, is you > install install the python you want on the system then use it to install > your VE. Then you install what ever you need to the VE. In my case I had > a working VE based on python 3.5 then I

Re: [Tutor] Need help with a virtual environment mess

2018-05-07 Thread Jim
On 05/06/2018 05:16 PM, boB Stepp wrote: On Sun, May 6, 2018 at 11:05 AM, Jim wrote: In a prior thread you guys helped me fix a problem with pip after I upgraded an installed version of python 3.6 on my Mint 18 system. Pip would not run in my python 3.6 virtual

Re: [Tutor] Need help with a virtual environment mess

2018-05-06 Thread boB Stepp
On Sun, May 6, 2018 at 11:05 AM, Jim wrote: > In a prior thread you guys helped me fix a problem with pip after I upgraded > an installed version of python 3.6 on my Mint 18 system. Pip would not run > in my python 3.6 virtual environment. The fix was to use synaptic to

[Tutor] Need help with a virtual environment mess

2018-05-06 Thread Jim
In a prior thread you guys helped me fix a problem with pip after I upgraded an installed version of python 3.6 on my Mint 18 system. Pip would not run in my python 3.6 virtual environment. The fix was to use synaptic to install python3-distutils. I thought everything was ok until I tried to

Re: [Tutor] Need help with FileNotFoundError

2018-04-26 Thread Jim
On 04/26/2018 03:27 PM, Danny Yoo wrote: copy('~/Documents/Courses/ModernBootcamp/story.txt', '~/Documents/Courses/ModernBootcamp/story_copy.txt') Hi Jim, You may need to use os.path.expanduser, as "tilde expansion" isn't something that's done automatically. This is referenced in the docs

Re: [Tutor] Need help with FileNotFoundError

2018-04-26 Thread Danny Yoo
> copy('~/Documents/Courses/ModernBootcamp/story.txt', > '~/Documents/Courses/ModernBootcamp/story_copy.txt') Hi Jim, You may need to use os.path.expanduser, as "tilde expansion" isn't something that's done automatically. This is referenced in the docs when they say: "Unlike a unix shell,

[Tutor] Need help with FileNotFoundError

2018-04-26 Thread Jim
Been working my way through an online Python course. Up until now I have had no problems writing and running the programs using Python 3.6 in a virtual environment and then pasting them into the courses editor. When I run this program on my system I get the following error. # file_io.py def

Re: [Tutor] Need help please

2018-04-16 Thread Alan Gauld via Tutor
On 16/04/18 03:30, Sandra Sherif via Tutor wrote: > Dear Python Tutor, > > I am in desperate need for help with programming on python. I am new to using > python and I’m trying to write a program called “turtle tag”. I’m trying to > do these things in the program: > a. Asks how many turtles

[Tutor] Need help please

2018-04-16 Thread Sandra Sherif via Tutor
Dear Python Tutor, I am in desperate need for help with programming on python. I am new to using python and I’m trying to write a program called “turtle tag”. I’m trying to do these things in the program: a. Asks how many turtles are playing tag b. Creates a turtle, assigns it a random color,

Re: [Tutor] Need help fixing some code for a project

2017-11-27 Thread Alan Gauld via Tutor
On 27/11/17 01:57, John Cocks wrote: > The task is broken down into three sections. What exactly do you want help with? Do you not understand part of the problem? Do you not know how to code some part? Are you getting an error? If so show us the full error text. WE are not mind readers, you need

[Tutor] Need help fixing some code for a project

2017-11-27 Thread John Cocks
The task is broken down into three sections. Section 1 - User Input Section 2 - loop through the grocery list Section 3 - provide output to the console ''' #Task: Create the empty data structure grocery_item = {} grocery_history = [] #Variable used to check if the while loop condition is met

Re: [Tutor] Need Help with install of Python!

2017-09-22 Thread George Fischhof
2017-09-20 2:18 GMT+02:00 Alan Gauld via Tutor : > On 19/09/17 21:13, Larry Staley wrote: > > Hello I am very new to Python just having installed Python Version 2.7 > onto > > my windows 8.1 laptop. I thought the install was successful and was > > entering information for my

Re: [Tutor] Need Help with install of Python!

2017-09-19 Thread Alan Gauld via Tutor
On 19/09/17 21:13, Larry Staley wrote: > Hello I am very new to Python just having installed Python Version 2.7 onto > my windows 8.1 laptop. I thought the install was successful and was > entering information for my first assignment when I received an unexpected > error. Where did you get your

[Tutor] Need Help with install of Python!

2017-09-19 Thread Larry Staley
Hello I am very new to Python just having installed Python Version 2.7 onto my windows 8.1 laptop. I thought the install was successful and was entering information for my first assignment when I received an unexpected error. I executed a Sheets command using an earlier generated

Re: [Tutor] Need help with code

2017-04-19 Thread Joel Goldstick
You most likely have no file named words.txt in the directory from which you are running your code. On Mon, Apr 17, 2017 at 10:12 PM, Tyler Seacrist wrote: > Hello, > > > How do I avoid this error message everytime I utilize wordlist = > open("words.text") ? >

Re: [Tutor] Need help with code

2017-04-19 Thread Alan Gauld via Tutor
On 18/04/17 03:12, Tyler Seacrist wrote: > How do I avoid this error message everytime I utilize wordlist = > open("words.text") ? > wordlist = open("words.txt") > Traceback (most recent call last): > File "", line 1, in > wordlist = open("words.txt") >

[Tutor] Need help with code

2017-04-19 Thread Tyler Seacrist
Hello, How do I avoid this error message everytime I utilize wordlist = open("words.text") ? >>> wordlist = open("words.txt") Traceback (most recent call last): File "", line 1, in wordlist = open("words.txt") FileNotFoundError: [Errno 2] No such file or directory:

Re: [Tutor] Need help with code

2017-04-17 Thread Danny Yoo
On Mon, Apr 17, 2017 at 12:00 AM, Alan Gauld via Tutor wrote: > On 16/04/17 18:26, Tyler Seacrist wrote: > >> I need to draw a stack diagram for print_n >> called with s = 'Hello' and n=2 and am unsure of how to do so. Are you referring to this?

Re: [Tutor] Need help with code

2017-04-17 Thread Alan Gauld via Tutor
On 16/04/17 18:26, Tyler Seacrist wrote: > I need to draw a stack diagram for print_n > called with s = 'Hello' and n=2 and am unsure of how to do so. Me too. What is print_n? Which stack? One in your program or the interpreters internal stack? We need a lot more detail. -- Alan G Author

[Tutor] Need help with code

2017-04-17 Thread Tyler Seacrist
Hello, I need to draw a stack diagram for print_n called with s = 'Hello' and n=2 and am unsure of how to do so. Thanks, Tyler ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options:

Re: [Tutor] Need help with one problem.

2017-02-15 Thread Steven D'Aprano
On Wed, Feb 15, 2017 at 01:00:30PM -0500, Adam Howlett wrote: > Write an if-else statement that assigns 20 to the variable y if the > variable x is greater than 100. Otherwise, it should assign 0 to the > variable y. > > Is there an easy way to solve this problem? Yes. What have you tried?

Re: [Tutor] Need help with one problem.

2017-02-15 Thread Alan Gauld via Tutor
On 15/02/17 18:00, Adam Howlett wrote: > Write an if-else statement that > assigns 20 to the variable y if the variable x is greater than 100. > Otherwise, it should assign 0 to the variable y. > > Is there an easy way to solve this problem? Yes, just do what it says. Maybe if I reword the

[Tutor] Need help with one problem.

2017-02-15 Thread Adam Howlett
Write an if-else statement that assigns 20 to the variable y if the variable x is greater than 100. Otherwise, it should assign 0 to the variable y. Is there an easy way to solve this problem? ___ Tutor maillist - Tutor@python.org To unsubscribe or

Re: [Tutor] Need help

2016-10-13 Thread Ryan Smith
On Wednesday, October 12, 2016, Alan Gauld via Tutor wrote: > On 12/10/16 09:03, niraj pandey wrote: > > > Can you pls guide how to print this screen (Attached here) content in > > printer ? > > As we already pointed out this is a text list so attachments > are usually stripped

Re: [Tutor] Need help

2016-10-12 Thread Alan Gauld via Tutor
On 12/10/16 09:03, niraj pandey wrote: > Can you pls guide how to print this screen (Attached here) content in > printer ? As we already pointed out this is a text list so attachments are usually stripped off... However, printing from Tkinter is not easy. The simplest way is usually to create

Re: [Tutor] Need help

2016-10-12 Thread niraj pandey
Hi , I need one more help related to printer. Can you pls guide how to print this screen (Attached here) content in printer ? Thanks Niraj On Tue, Oct 4, 2016 at 12:21 PM, niraj pandey wrote: > Ok I got it from the solution you provided on your previous mail. > >

Re: [Tutor] Need help

2016-10-04 Thread niraj pandey
Ok I got it from the solution you provided on your previous mail. Thanks again Thanks Niraj On Tue, Oct 4, 2016 at 12:05 PM, niraj pandey wrote: > Attaching two snapshots here. > > In first snapshot (1.png) I have the label windows without the values and > in

Re: [Tutor] Need help

2016-10-04 Thread niraj pandey
Attaching two snapshots here. In first snapshot (1.png) I have the label windows without the values and in second window (2.png) every label have some value. I want to put these values in front of every label. I have already stored these values in a variable. Thanks Niraj On Mon, Oct 3, 2016 at

Re: [Tutor] Need help

2016-10-03 Thread niraj pandey
Hello Alan , I am using python 2.7.10 and using RHEL6 Thanks On Mon, Oct 3, 2016 at 8:53 PM, Alan Gauld via Tutor wrote: > On 03/10/16 10:54, niraj pandey wrote: > > > I want to add every lebels value here (ie fetch from DB and display in > > front of every lebel or I had

Re: [Tutor] Need help

2016-10-03 Thread Alan Gauld via Tutor
On 03/10/16 10:54, niraj pandey wrote: > I want to add every lebels value here (ie fetch from DB and display in > front of every lebel or I had store every lable value in variable and > display here). You need to tell us which OS, Python version and GUI toolkit you are using. > [image: Inline

[Tutor] Need help

2016-10-03 Thread niraj pandey
Hi , I am new in python. Could you guys please help me here. I want to add every lebels value here (ie fetch from DB and display in front of every lebel or I had store every lable value in variable and display here). [image: Inline image 1] So that table looks like as follow [image: Inline

Re: [Tutor] Need help

2016-09-28 Thread niraj pandey
Thanks Peter for the help. Best Regards Niraj On Wed, Sep 28, 2016 at 2:47 PM, Peter Otten <__pete...@web.de> wrote: > niraj pandey wrote: > > > Found the solution for this. > > You can further simplifiy it with enumerate() > > entry_option = ['Flat_No','Mains Unit','DG Unit','Month'] > > >

Re: [Tutor] Need help

2016-09-28 Thread Peter Otten
niraj pandey wrote: > Found the solution for this. You can further simplifiy it with enumerate() > entry_option = ['Flat_No','Mains Unit','DG Unit','Month'] > entry = {} > label = {} for r, item in enumerate(entry_option): > lb = Label(bg = 'orange', text=item, relief=RIDGE,width=30) >

Re: [Tutor] Need help

2016-09-28 Thread niraj pandey
Found the solution for this . entry_option = ['Flat_No','Mains Unit','DG Unit','Month'] r = 0 entry = {} label = {} for item in entry_option: lb = Label(bg = 'orange', text=item, relief=RIDGE,width=30) lb.grid(row=r,column=0)

[Tutor] Need help

2016-09-28 Thread niraj pandey
Hi, I am new in python. Could you guys please help me to short this code ? Want to write this iteration (Yellow one) using loop. r = 0 L1 = Label(bg = 'orange', text="Flat_No", relief=RIDGE,width=30) L1.grid(row=0,column=0) E1 = Entry(relief=SUNKEN,width=30) E1.grid(row=0,column=1) L2 =

Re: [Tutor] need help

2016-08-11 Thread Michael Selik
On Thu, Aug 11, 2016 at 1:15 PM Pallab Amway wrote: > expected an indented block > if-statements must have an indented block of code. For example: ``` if age < 12: print('You are a child') ``` ___ Tutor maillist -

Re: [Tutor] need help

2016-08-11 Thread boB Stepp
On Aug 11, 2016 12:15 PM, "Pallab Amway" wrote: > > Respected sir > > Myself pallab kumar seal from India I am using python2.7 > in my window 7 but while I am using python to compile my program I am > getting following error > > Programe1 > > age = 21

[Tutor] need help

2016-08-11 Thread Pallab Amway
Respected sir Myself pallab kumar seal from India I am using python2.7 in my window 7 but while I am using python to compile my program I am getting following error Programe1 age = 21 if age < 12: print( "You ' re still a child!" ) elif age < 18: print( "You are a

Re: [Tutor] need help with socket / fuzzer not sure the while loop condition is wrong

2016-07-21 Thread Alan Gauld via Tutor
On 21/07/16 12:50, la Y wrote: > need help with socket / fuzzer UI've no idea what fuzzer means but... > not sure the while loop condition is wrong > def fuzzer(): > #fuzzer > #user attack coordinates and junk > currentEta = datetime.datetime.now() > targetIP =

[Tutor] need help with socket / fuzzer not sure the while loop condition is wrong

2016-07-21 Thread la Y
need help with socket / fuzzer not sure the while loop condition is wrong - its superpose to fuzz testing programs over till program crashes but seems to have some errors. import os import sys import datetime import socket def fuzzer(): #fuzzer #user attack coordinates and junk

Re: [Tutor] Need help with audio manipulation

2016-02-11 Thread Alan Gauld
On 11/02/16 18:03, Swift, Robert wrote: > I was wondering how to write a code that would take a recorded audio and > place these values into a numpy array? I have written various codes that > can record and playback sound and work properly. I need the recorded audio > to be accessed from a numpy

[Tutor] Need help with audio manipulation

2016-02-11 Thread Swift, Robert
I was wondering how to write a code that would take a recorded audio and place these values into a numpy array? I have written various codes that can record and playback sound and work properly. I need the recorded audio to be accessed from a numpy array so I can process the sound and manipulate

Re: [Tutor] Need help with two similar test cases that I have written. One works and the other fails

2016-02-07 Thread Anubhav Yadav
> Hi Anubhav, > > Ah! The assert functions are meant to be used as statements, not as > composable expressions. If you're familiar with the idea of side effects, > then you need to understand that you should be calling the assert functions > just for their side effects, not for their return

Re: [Tutor] Need help with two similar test cases that I have written. One works and the other fails

2016-02-07 Thread Peter Otten
Anubhav Yadav wrote: >> Hi Anubhav, >> >> Ah! The assert functions are meant to be used as statements, not as >> composable expressions. If you're familiar with the idea of side >> effects, then you need to understand that you should be calling the >> assert functions just for their side

Re: [Tutor] Need help with two similar test cases that I have written. One works and the other fails

2016-02-07 Thread Anubhav Yadav
> > when my program is in the yellow state, it should generate the numbers > > from 100.0-100.5 > > and 102.5-103.0 > > The "and" is a bit misleading as you want to allow values that are in the > first *or* the second intrval. When you spell that in Python it becomes > > temperature =

Re: [Tutor] Need help with two similar test cases that I have written. One works and the other fails

2016-02-07 Thread Danny Yoo
On Feb 7, 2016 8:38 AM, "Danny Yoo" wrote: > > : > > > > def test_red_temperature_simulation(self): > > """ > > Method to test the red_temperature_simulation method > > """ > > for i in range(100): > > test_value =

Re: [Tutor] Need help with two similar test cases that I have written. One works and the other fails

2016-02-07 Thread Danny Yoo
: > > def test_red_temperature_simulation(self): > """ > Method to test the red_temperature_simulation method > """ > for i in range(100): > test_value = red_temperature_simulation() > self.assertTrue((test_value < 100.0) or

Re: [Tutor] Need help with two similar test cases that I have written. One works and the other fails

2016-02-07 Thread Anubhav Yadav
> > Be careful. Now you have a test that always succeeds. > > No, I'm wrong. Sorry about that: I misread the numerical range. > This is the first time I am ever writing unit tests, and I am glad I am doing it. Thanks a lot for all your help!. ___

Re: [Tutor] Need help with two similar test cases that I have written. One works and the other fails

2016-02-06 Thread Danny Yoo
On Feb 6, 2016 12:31 PM, "Anubhav Yadav" wrote: > > Hello Everyone, > > I am trying to write a simple program that generated random numbers based > on some rules. > when my program is in the yellow state, it should generate the numbers > from 100.0-100.5 > and 102.5-103.0.

Re: [Tutor] Need help with two similar test cases that I have written. One works and the other fails

2016-02-06 Thread boB Stepp
On Sat, Feb 6, 2016 at 10:07 AM, Anubhav Yadav wrote: > class TestCase(unittest.TestCase): > def test_red_temperature_simulation(self): > """ > Method to test the red_temperature_simulation method > """ > for i in range(10): >

[Tutor] Need help with two similar test cases that I have written. One works and the other fails

2016-02-06 Thread Anubhav Yadav
Hello Everyone, I am trying to write a simple program that generated random numbers based on some rules. when my program is in the yellow state, it should generate the numbers from 100.0-100.5 and 102.5-103.0. When my program is in the red state, it should generate numbers in the range less than

Re: [Tutor] Need help with two similar test cases that I have written. One works and the other fails

2016-02-06 Thread boB Stepp
On Sat, Feb 6, 2016 at 3:54 PM, boB Stepp wrote: > On Sat, Feb 6, 2016 at 10:07 AM, Anubhav Yadav wrote: Just read Danny's reply after sending mine, which means that the answer to my question: > If my understanding is indeed correct, then I will

[Tutor] Need Help

2016-01-25 Thread Parinay Mahakur
Hello Tutors, I need a program that should enable me to read values from a large number of ASCII files and then I have to plot desired values - In this file headings for all columns are also given. The link for the file is -

Re: [Tutor] Need Help

2016-01-25 Thread Alan Gauld
On 25/01/16 16:09, Parinay Mahakur wrote: > I need a program that should enable me to read values from a large number > of ASCII files and then I have to plot desired values Have you considered a spreadsheet like Excel? You could write a couple of macros to read the files and to generate the

Re: [Tutor] Need Help

2016-01-25 Thread Mark Lawrence
On 25/01/2016 16:09, Parinay Mahakur wrote: Hello Tutors, I need a program that should enable me to read values from a large number of ASCII files and then I have to plot desired values - In this file headings for all columns are also given. The link for the file is -

Re: [Tutor] Need help with python

2015-09-14 Thread Alan Gauld
On 15/09/15 00:25, Laura Creighton wrote: The gmane.org reference is here: gmane.comp.python.testing.general I am not getting anything sensible out of this. Works for me, but admittedly I only see one post in September. -- Alan G Author of the Learn to Program web site

Re: [Tutor] Need help with python

2015-09-14 Thread Laura Creighton
In a message of Mon, 14 Sep 2015 19:48:01 +0100, Alan Gauld writes: >On 14/09/15 18:02, vijayram wrote: >> Hi, >> >> I need help with python nose tests and test-suite… can I request help >> with a tutor.. > >You can try asking basic questions here, but as nose is not >part of the standard

Re: [Tutor] Need help with python

2015-09-14 Thread Steven D'Aprano
On Mon, Sep 14, 2015 at 10:02:35AM -0700, vijayram wrote: > Hi, > > I need help with python nose tests and test-suite… can I request help with > a tutor.. Sure. Ask your questions on the mailing list, and somebody will answer. This is a group for *public* tutoring, so that everyone can learn

[Tutor] Need help with python

2015-09-14 Thread vijayram
Hi, I need help with python nose tests and test-suite… can I request help with a tutor.. Thank you, vijay ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Need help with python

2015-09-14 Thread Alan Gauld
On 14/09/15 18:02, vijayram wrote: Hi, I need help with python nose tests and test-suite… can I request help with a tutor.. You can try asking basic questions here, but as nose is not part of the standard library you might get more help on the python testing list: The gmane.org reference

Re: [Tutor] Need help writing code with python

2015-02-08 Thread Dave Angel
On 02/07/2015 05:36 PM, Conner Wood wrote: I fell behind 2 weeks in my class due to surgery and have a coding project due tonight (Saturday, Feb. 7). I've attached my project to this email. Please help! Also, I'm using a Mac laptop if that helps in anyway. Please get back to me as soon as you

Re: [Tutor] Need help writing code with python

2015-02-08 Thread Alan Gauld
On 07/02/15 22:36, Conner Wood wrote: I fell behind 2 weeks in my class due to surgery and have a coding project due tonight (Saturday, Feb. 7). I've attached my project to this email. Please help! Also, I'm using a Mac laptop if that helps in anyway. Please get back to me as soon as you can.

Re: [Tutor] Need help writing code with python

2015-02-08 Thread Ben Finney
Alan Gauld alan.ga...@btinternet.com writes: Third, The attachment didn't get here. So I've no idea what your assignment was. Its usually better to copy the text into the mail body. Given that the attachment was described as “my project”, I would advise not sending it here in any form. Copy

[Tutor] Need help writing code with python

2015-02-08 Thread Conner Wood
I fell behind 2 weeks in my class due to surgery and have a coding project due tonight (Saturday, Feb. 7). I've attached my project to this email. Please help! Also, I'm using a Mac laptop if that helps in anyway. Please get back to me as soon as you can. Thanks, Conner Wood

Re: [Tutor] Need help writing code with python

2015-02-08 Thread Ben Finney
Conner Wood cwood1...@gmail.com writes: I fell behind 2 weeks in my class due to surgery and have a coding project due tonight (Saturday, Feb. 7). I've attached my project to this email. My sympathies with your situation, I hope your surgery was successful and you are in good health. This is

Re: [Tutor] Need help with find error

2015-02-04 Thread Danny Yoo
On Wed, Feb 4, 2015 at 1:01 AM, Андрей Пугачев pugachov.and...@gmail.com wrote: Hi I'm learning python a few weeks and have problems with code that read text from txt-file Code doing all right, but in the end I have error Traceback (most recent call last): File trivia_challenge.py, line

Re: [Tutor] Need help with find error

2015-02-04 Thread Danny Yoo
As a revision of my initial question, when we look at next_block(), it's documented as follows: def next_block(the_file): Return the next block of data from the trivia file. What if there are

Re: [Tutor] Need help with find error

2015-02-04 Thread Peter Otten
Андрей Пугачев wrote: Hi I'm learning python a few weeks and have problems with code that read text from txt-file Code doing all right, but in the end I have error Traceback (most recent call last): File trivia_challenge.py, line 81, in module main() File trivia_challenge.py,

Re: [Tutor] Need help with find error

2015-02-04 Thread Alan Gauld
On 04/02/15 09:01, Андрей Пугачев wrote: Code doing all right, but in the end I have error Traceback (most recent call last): File trivia_challenge.py, line 81, in module main() File trivia_challenge.py, line 74, in main category, question, answers, correct, explanation, points

[Tutor] Need help with find error

2015-02-04 Thread Андрей Пугачев
Hi I'm learning python a few weeks and have problems with code that read text from txt-file Code doing all right, but in the end I have error Traceback (most recent call last): File trivia_challenge.py, line 81, in module main() File trivia_challenge.py, line 74, in main category,

Re: [Tutor] Need help!

2014-12-13 Thread Adam Jensen
On Fri, 12 Dec 2014 07:46:05 -0500 Jagannath Ramanan jagannath.rama...@gmail.com wrote: My name is jag. I need little bit of help understanding something. I have a vncserver running at the background in redhat. My client is lubuntu where im using python. For some reason the communication is

[Tutor] Need help!

2014-12-12 Thread Jagannath Ramanan
Dear Sir / Madam, My name is jag. I need little bit of help understanding something. I have a vncserver running at the background in redhat. My client is lubuntu where im using python. For some reason the communication is only possible between them is to send custom TCP/IP messages. Im not a

Re: [Tutor] Need help!

2014-12-12 Thread Danny Yoo
On Dec 12, 2014 8:54 AM, Jagannath Ramanan jagannath.rama...@gmail.com wrote: Dear Sir / Madam, My name is jag. I need little bit of help understanding something. I have a vncserver running at the background in redhat. My client is lubuntu where im using python. This question is out of

Re: [Tutor] Need help!

2014-12-12 Thread Oscar Benjamin
On 12 December 2014 at 12:46, Jagannath Ramanan jagannath.rama...@gmail.com wrote: Dear Sir / Madam, My name is jag. Hi Jag, I need little bit of help understanding something. I have a vncserver running at the background in redhat. My client is lubuntu where im using python. For some

Re: [Tutor] Need help!

2014-12-12 Thread Alan Gauld
On 12/12/14 12:46, Jagannath Ramanan wrote: vncserver running at the background in redhat. My client is lubuntu where im using python. For some reason the communication is only possible between them is to send custom TCP/IP messages. What makes you think so? Is that something you have been

Re: [Tutor] Need help!

2014-12-12 Thread Cameron Simpson
On 12Dec2014 07:46, Jagannath Ramanan jagannath.rama...@gmail.com wrote: My name is jag. I need little bit of help understanding something. I have a vncserver running at the background in redhat. My client is lubuntu where im using python. For some reason the communication is only possible

  1   2   3   4   5   >