Courtney Skinner wrote:
Hello,
I am trying to build a program that approximates the value of cosine -
this is my program so far. It is not returning the right values. Could you
tell me what I am doing wrong?
def main():
import math
print(This program approximates the
On 16/02/2015 16:27, Courtney Skinner wrote:
Hello,
I am trying to build a program that approximates the value of cosine - this is
my program so far. It is not returning the right values. Could you tell me what
I am doing wrong?
def main():
import math
Not that it matters but
On 16/02/15 16:27, Courtney Skinner wrote:
Hello,
I am trying to build a program that approximates the value of cosine
def main():
import math
Its usual to do the imports outside the function at the tyop of the
file. Python doesn't actually care much but its 'standard practice'.
On 02/16/2015 11:27 AM, Courtney Skinner wrote:
Hello,
I am trying to build a program that approximates the value of cosine - this is
my program so far. It is not returning the right values. Could you tell me what
I am doing wrong?
You've got several answers that point out several
What is the user interface that your program is using, currently? IE:
QT, GTK, Tkinter, Curses, Kivy, Pygame, Or None?
What is the target system on which your program runs?
How are you currently viewing the mean and standard deviation results?
What version of Python are you using and what is
On 31/12/14 13:49, Tammy Miller wrote:
I need help on the
following: I have a created a project from a csv file to calculate the
mean and standard deviation.
I assume that means you read the data from the CSV file
and display the stats?
However, I would like to
create a drop-down list and
If I understand what you're asking you need to write the current
gameboard and the info you get in 'gameBoard' is the current state of
the game.
There are several ways of doing this (with different degrees of
cleverness) but to keep it simple:
Start by printing out the current state, different
On Sun, Nov 16, 2014 at 1:52 PM, Andrew McReynolds
amcreynol...@yahoo.com.dmarc.invalid wrote:
The section of the assignment that I'm working on states:
2) Write a function called loadGameBoard (player_marks) where player_marks
is a dictionary that
contains the players’ marks. This function
Thank you Alan and Danny. It amazes me at the lengths you guys, as well as
everyone else who contributes, will go to to help explain things to us; it is
greatly appreciated!
Alan, I decided to dumb down the learning classes just a little. By this I
mean, I am not using Tkinter to learn
On 15/11/14 18:19, Bo Morris wrote:
With the first part…
class Message:
def __init__(self, aString):
self.text = aString
Will I always use “_init_” when defining the first function in a class?
It can go anywhere in the class definition. it is just another method of
the class.
On Sat, Nov 15, 2014 at 06:19:56PM +, Bo Morris wrote:
Thank you Alan and Danny. It amazes me at the lengths you guys, as well as
everyone else who contributes, will go to to help explain things to us; it
is greatly appreciated!
Alan, I decided to dumb down the learning classes just a
On 15/11/14 00:29, Bo wrote:
help understanding classes and how they work. What is the point in OOP
if I don’t understand classes, are classes not the heart and soul of
OOP?
Actually not necessarily. There are OOP languages where classes
are not included or little used. Javascript is a good
On Fri, Nov 14, 2014 at 4:29 PM, Bo crushe...@gmail.com wrote:
Hello everyone, hope all is well. Was just wondering if I could get some
help understanding classes and how they work. What is the point in OOP if I
don’t understand classes, are classes not the heart and soul of OOP? I have
been
corylog...@yahoo.com.dmarc.invalid Wrote in message:
!--
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
}
p.MsoNormal, li.MsoNormal, div.MsoNormal {
margin:0in;
On 10/11/14 20:57, corylog...@yahoo.com.dmarc.invalid wrote:
I wrote the following code as a simulation for the table top game
x-wing.
I don;t know it so can only give some general comments below...
import random
print(X-wing dice simulator)
x = int(input(How many dice will the offensive
I am not familiar with the game, but maybe using offense += 1 and
defense += 1 to replace the corresponding continue would help?
On Mon, Nov 10, 2014 at 2:57 PM, corylog...@yahoo.com.dmarc.invalid wrote:
Hello, I can not for the life of me figure out where I have gone wrong.
I wrote the
The usage of the api as documented here - https://github.com/zachwill/fred
- suggests :
import fred
# Save your FRED API key.
fred.key('my_fred_api_key')
# Interact with economic data categories.
fred.category()
...
Cheers,
Anish Tambe
On 26 Oct 2014 00:23, Joel Goldstick
On 25/10/14 17:08, Mark Meanwell wrote:
Hi Folks - new to python and trying to run an API. Running version
2.7.3. on Windows 7 machine.
Here is the scenario for the given API (FRED API in this case):
easy_install Fred from C:\ - this installs to C:\site packages
then I fire up the python
On Sat, Oct 25, 2014 at 12:08 PM, Mark Meanwell mmeanw...@gmail.com wrote:
Hi Folks - new to python and trying to run an API. Running version 2.7.3. on
Windows 7 machine.
Here is the scenario for the given API (FRED API in this case):
easy_install Fred from C:\ - this installs to C:\site
if guess != the_number:
print (you failed, the number was, the_number)
elif guess==the_number:
print(You guessed it! The number was, the_number)
print(And it only took you, tries, tries!\n)
This block of code appears to be applied for every iteration
On 13/10/14 11:40, אופיר לירון wrote:
# set the initial values
the_number = random.randint(1, 100)
guess = int(input(Take a guess: ))
tries = 1
# guessing loop
while guess != the_number:
if guess the_number:
print(Lower...)
else:
print(Higher...)
guess =
http://cscircles.cemc.uwaterloo.ca/run-at-home/
On Fri, Sep 19, 2014 at 11:04 AM, Danny Yoo d...@hashcollision.org wrote:
On Wed, Sep 17, 2014 at 4:36 PM, Art Pelletier artp...@gmail.com wrote:
I am a beginner with pythons programming I would like to see if their
is a site that has
Check this guy's youtube channel. He has very basic examples. His
username is thenewboston
On Wed, Sep 17, 2014 at 4:36 PM, Art Pelletier artp...@gmail.com wrote:
I am a beginner with pythons programming I would like to see if their is a
site that has samples programs that I can practice
On Wed, Sep 17, 2014 at 4:36 PM, Art Pelletier artp...@gmail.com wrote:
I am a beginner with pythons programming I would like to see if their is a
site that has samples programs that I can practice on.
Hi Art,
Yes, there are some good resources you can check out. Here's a link
to some of
On 27/05/2014 09:05, jarod...@libero.it wrote:
Dear All
clubA= [mary,luke,amyr,marco,franco,lucia, sally,genevra,
electra]
clubB= [mary,rebecca,jane,jessica,judit,sharon,lucia, sally,
Castiel,Sam]
I have a list of names that I would to annotate in function of presence in
different clubs:
my
jarod...@libero.it jarod...@libero.it Wrote in message:
Dear All
clubA= [mary,luke,amyr,marco,franco,lucia, sally,genevra,
electra]
clubB= [mary,rebecca,jane,jessica,judit,sharon,lucia, sally,
Castiel,Sam]
I have a list of names that I would to annotate in function of presence in
On Tue, May 27, 2014 at 10:05:30AM +0200, jarod...@libero.it wrote:
[...]
with open(file.in) as p:
mit = []
You have lost the indentation, which makes this code incorrect.
But the rest of the code is too complicated.
for i in p:
lines =i.strip(\n).split(\t)
if (lines[0] in clubA:
jarod...@libero.it wrote:
Dear All
clubA= [mary,luke,amyr,marco,franco,lucia, sally,genevra,
electra]
clubB= [mary,rebecca,jane,jessica,judit,sharon,lucia,
sally, Castiel,Sam]
I have a list of names that I would to annotate in function of presence
in different clubs:
my input files
On 16/05/14 02:58, Glen Chan wrote:
Hello, I am student trying to fugure out why when I enter any number it
says error.
Because that's what you programmed it to do.
Almost. If you enter 1 or 10 you won't get an error.
Look at your logic:
number = input('Enter a number between 1 and 10: ')
Hi Glen, and welcome! My responses below.
On Thu, May 15, 2014 at 09:58:07PM -0400, Glen Chan wrote:
Hello, I am student trying to fugure out why when I enter any number
it says error. It's only suppose to do that if it's out the 1-10
range. Please help. Thank you.
You've made an mistake
Hi
This will solve your purpose:
Yes we can write in better way also :
--
#The Dice Game
#add libraries needed
import random
#the main function
def main():
print
#initialize variables
playerOne = 'No Name'
playerTwo = 'No Name'
endProgram =no
Hey Glen, include the error you are getting. It will make answering
your question easier. How are you running this program, in an IDE?
On Sat, May 10, 2014 at 11:16 PM, Glen Chan gchan...@msn.com wrote:
Hello, I am a student trying to figure out Python. I am getting errors that
I don't know how
On 11/05/14 04:16, Glen Chan wrote:
Hello, I am a student trying to figure out Python. I am getting errors
that I don't know how to fix. What do you do after you get the error
message and something is highlighted? Does that have to be deleted?
The error doesn't need to be deleted because it
On 05/10/2014 11:16 PM, Glen Chan wrote:
Hello, I am a student trying to figure out Python. I am getting errors that I
don't know how to fix. What do you do after you get the error message and
something is highlighted? Does that have to be deleted? Anyway, here is what I
mean...
def main():
On Sat, May 10, 2014 at 8:35 AM, 1 2 bothe...@gmail.com wrote:
In the result it shows s= 8 pls tell me how to remove the blank?
s,t,n = 0,0,1
while t = s:
s,t,n = s+2,t+n,n+1
else:
print('s=',s,n)
You must use something else. For example:
print('s={0} {1}'.format(s, n))
This
On 10/05/14 07:35, 1 2 wrote:
In the result it shows s= 8 pls tell me how to remove the blank?
s,t,n = 0,0,1
while t = s:
s,t,n = s+2,t+n,n+1
else:
print('s=',s,n)
Assuming you are using Python version 3 you need to specify the sep
option to print:
print('s=',s,n,sep='')
Hello 1 2, and welcome!
(By the way, I feel quite silly calling you by the name you show in your
email address. Do you have another name you would prefer to be known
by?)
My response below.
On Sat, May 10, 2014 at 02:35:07PM +0800, 1 2 wrote:
In the result it shows s= 8 pls tell me how to
On 01/05/14 01:18, jordan smallwood wrote:
Hey there,
I have this code below (in to cm conversion) and I want to have the user
try again if they enter in a non integer. What am I missing:
A loop.
There is a common pattern or idiom in Pytthon:
while True:
get input
if input ok:
jordan smallwood jsmallwoo...@yahoo.com.dmarc.invalid Wrote in
message:
want to have the user try again if they enter in a non integer. What am I
missing:
Do you perhaps mean float?
If so, see the other response.
--
DaveA
___
Tutor
On 26/04/14 01:46, Suhana Vidyarthi wrote:
I have this file:
1,3,5,0.03
2,3,5,5,4,0.11
3,3,5,5,4,5,8,0.04
And each line is interpreted as:
* 1,3,5,0.03- This line means 1 link can be down i.e. between 3—5
with a probability of failure *0.03*
* 2,3,5,5,4,0.11 - This line means
Hi Suhana,
Also note that you asked this question just a few days ago.
https://mail.python.org/pipermail/tutor/2014-April/101019.html
We're not robots. We don't like repetition unless there's a reason
for it, and in this case, you got responses to the earlier question.
For example:
Hi,
The reason I opened a link is because there are changes in the code. Does
it make sense? Else I can definitely go back to the thread.
On Sat, Apr 26, 2014 at 9:05 AM, Danny Yoo d...@hashcollision.org wrote:
Hi Suhana,
Also note that you asked this question just a few days ago.
Thanks for the response Alan. my clarifications are below:
On Sat, Apr 26, 2014 at 1:41 AM, Alan Gauld alan.ga...@btinternet.comwrote:
On 26/04/14 01:46, Suhana Vidyarthi wrote:
I have this file:
1,3,5,0.03
2,3,5,5,4,0.11
3,3,5,5,4,5,8,0.04
And each line is interpreted as:
I want to create two arrays using the above file (Links array and Prob
array) that should give following output:
*Links *= { [3,5] [5,4] [5,8] [7,8] [14,10] [14,13] [17,13] [14,18]
[10,13] [14,13] [17,13] [12,13] [11,6] [11,9][11,12] [11,19] [19,20]
[15,20] [21,20] [20,21] [21,16] [21,22] }
Hi Danny,
Let me give you a high level brief of what I am doing:
I am working on doing disaster aware routing considering the 24-node US
network where I will be setting up connection between two any two nodes (I
will select the source and destination nodes randomly). Also I have some
links whose
Just glancing at your work, I see you have curly braces around what looks
like it should be a list. If you are concerned with the order of your
output, dictionaries do not have a concept of order.
On Sat, Apr 26, 2014 at 3:16 PM, Suhana Vidyarthi suhanavidyar...@gmail.com
wrote:
Hi Danny,
err, set also is unordered. I can see you are using set for a reason, but
has no concept of order.
On Sat, Apr 26, 2014 at 3:20 PM, C Smith illusiontechniq...@gmail.comwrote:
Just glancing at your work, I see you have curly braces around what looks
like it should be a list. If you are
Thanks for the response Smith, I was thinking make be I have done something
incorrect and if there is some other function that can be used to display
the output in desired order but don't see it possible thats why was
wondering if any of you Python gurus have any inputs for me :-)
On Sat, Apr
As others have pointed out, a mapping/dictionary or just a list of lists
seems like how you would want to organize the data for input. I think your
problem is insistence on using sets. I am no Python guru, but I think this
list is more for exploratory learning of Python. I think people are trying
On 25/04/14 20:52, jordan smallwood wrote:
Hello,
I am new to Python. I mean completely new and we're working on this
problem set where they give us specs and we have to build something
based off these specs. I have no idea what they're asking.
Its pretty clear.
They want you to build a
jordan smallwood jsmallwoo...@yahoo.com.dmarc.invalid Wrote in
message:
Do you know what a module is? Can you use a text editor to create one?
Do you know what a function looks like? Try writing the first one
they asked. Post it here, along with some test code showing it
works, or describe
On 22/04/14 02:16, Suhana Vidyarthi wrote:
I have a python code that shows a set of shortest paths between nodes A
and B.
It would help if you showed us this code. Otherwise we are
just making wild guesses about how you are modelling this.
Also knowing which Python version you are using
On Mon, Apr 21, 2014 at 06:16:20PM -0700, Suhana Vidyarthi wrote:
[...]
I have a python code that shows a set of shortest paths between nodes A and
B. Now I have to select the least risky path among them. To do that I have
to consider the risk values of each link. I know how to calculate the
On 22/04/2014 12:41, Steven D'Aprano wrote:
On Mon, Apr 21, 2014 at 06:16:20PM -0700, Suhana Vidyarthi wrote:
[...]
# on Windows either of these will be okay
filename = C:/path/to/file.txt
filename = C:\\path\\to\\file.txt
Or a raw string r'C:\path\to\file.txt'
--
My fellow
Unfortunately, we can't give too much specific help on your particular
problem because it's homework.
You should use the knowledge you learned in your introductory
programming class about designing programs. In particular, give a
name to the function or functions your are designing. Be rigorous
On 03/28/2014 02:17 AM, Alan Gauld wrote:
On 27/03/14 21:01, Chris “Kwpolska” Warrick wrote:
On Mar 27, 2014 8:58 PM, Alan Gauld alan.ga...@btinternet.com
mailto:alan.ga...@btinternet.com wrote:
On 27/03/14 06:43, Leo Nardo wrote:
Im on windows 8 and i need to open a file called
On 28/03/2014 01:17, Alan Gauld wrote:
On 27/03/14 21:01, Chris “Kwpolska” Warrick wrote:
On Mar 27, 2014 8:58 PM, Alan Gauld alan.ga...@btinternet.com
mailto:alan.ga...@btinternet.com wrote:
On 27/03/14 06:43, Leo Nardo wrote:
Im on windows 8 and i need to open a file called string1.py
On 28/03/14 09:28, spir wrote:
On 03/28/2014 02:17 AM, Alan Gauld wrote:
you have to remember where it is. There is no ~ shortcut in Windows.
On my system that means typing something like:
C:\Documents and Settings\alang\Desktop
Can't you make a symlink pointing to Desktop? (in C:\ or
On Fri, Mar 28, 2014 at 2:17 AM, Alan Gauld alan.ga...@btinternet.com wrote:
On 27/03/14 21:01, Chris “Kwpolska” Warrick wrote:
Painful? How painful can `cd Desktop` be? Certainly less than `D:`
followed by `cd PythonProjects`…
Because the desktop is hardly ever anywhere near where the cmd
Hi Leo,
On 27 March 2014 08:43, Leo Nardo waterfallr...@gmail.com wrote:
Im on windows 8 and i need to open a file called string1.py that is on my
desktop, in both the interpreter and notepad++, so that i can work on it. I
already have it open in notepad, but for the life of me cannot figure
* Chris “Kwpolska” Warrick kwpol...@gmail.com [2014-03-28 16:27]:
Create a folder on the desktop, or even in the home directory. A much
nicer place than the drive root — and a much modern way to store it
(drive root sounds DOS-y)
I'll have to disagree with this statement. Dropping all your
On 28/03/14 15:27, Chris “Kwpolska” Warrick wrote:
On Fri, Mar 28, 2014 at 2:17 AM, Alan Gauld alan.ga...@btinternet.com wrote:
Because the desktop is hardly ever anywhere near where the cmd prompt lands
you.
I just tested on my Windows 7 box. It got me to C:\Users\Kwpolska.
`cd Desktop`
Hello,
What do you mean by open it in the interpreter?
Do you want to open it and read from it its content? or do you want to
execute its python code within the interpreter?
Best
2014-03-27 7:43 GMT+01:00 Leo Nardo waterfallr...@gmail.com:
Im on windows 8 and i need to open a file called
On 27/03/2014 08:55, David Palao wrote:
Hello,
What do you mean by open it in the interpreter?
Do you want to open it and read from it its content? or do you want to
execute its python code within the interpreter?
Best
2014-03-27 7:43 GMT+01:00 Leo Nardo waterfallr...@gmail.com:
Im on windows
Leo Nardo waterfallr...@gmail.com writes:
Im on windows 8 and i need to open a file called string1.py that is on
my desktop, in both the interpreter and notepad++, so that i can work
on it.
It's not clear what you want. What does it mean to you for a Python
program to be “open in the
Leo Nardo waterfallr...@gmail.com Wrote in message
Im on windows 8 and i need to open a file called string1.py that is on my
desktop, in both the interpreter and notepad++, so that i can work on it. I
already have it open in notepad, but for the life of me cannot figure out how
to open it
On 27/03/14 06:43, Leo Nardo wrote:
Im on windows 8 and i need to open a file called string1.py that is on
my desktop,
Thats your first problem. Its usually a bad idea to store your python
code on the desktop, because the desktop is a pain to find from a
command line.
Instead create a
On Mar 27, 2014 8:58 PM, Alan Gauld alan.ga...@btinternet.com wrote:
On 27/03/14 06:43, Leo Nardo wrote:
Im on windows 8 and i need to open a file called string1.py that is on
my desktop,
Thats your first problem. Its usually a bad idea to store your python
code on the desktop, because the
On 27/03/2014 19:56, Alan Gauld wrote:
On 27/03/14 06:43, Leo Nardo wrote:
Im on windows 8 and i need to open a file called string1.py that is on
my desktop,
Thats your first problem. Its usually a bad idea to store your python
code on the desktop, because the desktop is a pain to find from a
On 27/03/14 21:01, Chris “Kwpolska” Warrick wrote:
On Mar 27, 2014 8:58 PM, Alan Gauld alan.ga...@btinternet.com
mailto:alan.ga...@btinternet.com wrote:
On 27/03/14 06:43, Leo Nardo wrote:
Im on windows 8 and i need to open a file called string1.py that is on
my desktop,
Thats
List
On Mar 18, 2014 11:08 AM, y j yashp...@gmail.com wrote:
how can i split a word into letters in python 2.7.6?
--
Y D Jain
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
On 18/03/14 18:21, Joel Goldstick wrote:
List
On Mar 18, 2014 11:08 AM, y j yashp...@gmail.com
mailto:yashp...@gmail.com wrote:
how can i split a word into letters in python 2.7.6?
or more specifically list(aString) - lowercase and with params.
That will give you a list of the
On Mar 11, 2014, at 7:50 PM, William Ray Wing w...@mac.com wrote:
Simple. In Mail Preferences - Composing - Message Format - Plain Text
(Your setting is probably currently Rich Text.)
Got it, hopefully that helps.
___
Tutor maillist -
On Mar 11, 2014, at 1:57 AM, Alan Gauld alan.ga...@btinternet.com wrote:
OK so far, you don't need all the print statements
but that's just a style issue. (You could just
insert '\n' characters instead.)
You’re right, I’m actually not sure why I did it that way.
if guess secret - 10
On Mar 10, 2014, at 11:18 PM, Dave Angel da...@davea.name wrote:
if guess secret - 10 or guess secret - 10:
Think about that line. You might even want to put in a separate
function to test what it does.
HINT: it's wrong.
Got it! I realized what I was doing wrong. I needed that
On 03/12/2014 05:13 AM, Scott Dunning wrote:
if guess secret - 10 or guess secret - 10:
This is the right idea for cutting the line count but you
have the comparison values wrong. Look back to earlier
emails, you are repeating the same error as before.
Manually think through what
Scott W Dunning scott@cox.net Wrote in message:
On Mar 11, 2014, at 7:50 PM, William Ray Wing w...@mac.com wrote:
Simple. In Mail Preferences - Composing - Message Format - Plain Text
(Your setting is probably currently Rich Text.)
Got it, hopefully that helps.
Perfect, thanks.
Such errors are either obvious or invisible. A remedy is often to figure the
problem on paper (or in your head if you're good at thinking visually).
Here, just draw a line segment with secret in the middle and the interval
borders around. Then, write there on the drawing the _values_ of the
Scott W Dunning swdunn...@cox.net Wrote in message:
Would you please stop posting in html?
def print_hints(secret, guess):
  if guess 1 or guess 100:
    print
    print Out of range!
    print
  if guess secret:
    print
    print Too
On Mar 10, 2014, at 11:18 PM, Dave Angel da...@davea.name wrote:
Scott W Dunning swdunn...@cox.net Wrote in message:
Would you please stop posting in html?
I don’t know what you mean? I just use the text for my email provider. It’s
not html? I types up the code I had in the
On Mar 10, 2014, at 11:18 PM, Dave Angel da...@davea.name wrote:
Where are you guys using the forum? Through google? I was using that at first
but someone complained about something that google does and told me to get it
through my email. That’s what I’m doing now and I get bombarded with
On 11/03/14 07:42, Scott W Dunning wrote:
On Mar 10, 2014, at 11:18 PM, Dave Angel da...@davea.name wrote:
Where are you guys using the forum?
Personally I use the news feed from Gmane.org
I read it in Thunderbird (or occasionally via a
newsreader on my smartphone/tablet). You can also
read
On 11/03/14 04:07, Scott W Dunning wrote:
On Mar 8, 2014, at 3:57 AM, spir denis.s...@gmail.com
mailto:denis.s...@gmail.com wrote:
And now that you have the right set of tests you can
half the number of lines by combining your if
conditions again, like you had in the original
post. ie. Bring
On 03/11/2014 04:32 AM, Scott W Dunning wrote:
On Mar 8, 2014, at 11:50 AM, Scott dunning swdunn...@cox.net wrote:
And now that you have the right set of tests you can
half the number of lines by combining your if
conditions again, like you had in the original
post. ie. Bring your
On 03/11/2014 09:57 AM, Alan Gauld wrote:
On 11/03/14 04:07, Scott W Dunning wrote:
On Mar 8, 2014, at 3:57 AM, spir denis.s...@gmail.com
mailto:denis.s...@gmail.com wrote:
And now that you have the right set of tests you can
half the number of lines by combining your if
conditions again, like
On 03/11/2014 05:07 AM, Scott W Dunning wrote:
On Mar 8, 2014, at 3:57 AM, spir denis.s...@gmail.com wrote:
Well done.
And now that you have the right set of tests you can
half the number of lines by combining your if
conditions again, like you had in the original
post. ie. Bring your
On Mar 11, 2014, at 1:49 AM, Alan Gauld alan.ga...@btinternet.com wrote:
Not from the tutor list though. It only has a few
mails normally - less than 50 most days.
Actually now that you say that most of the emails are coming through the reg
python-lists, not the tutor section. I guess I
On Mar 11, 2014, at 8:06 PM, Scott W Dunning swdunn...@cox.net wrote:
[mega byte]
Yeah, I had no idea that my messages were coming through in HTML, nor what it
looked like until someone sent me a section showing me what it looked like, I
can see how that would be frustrating.
I’m
On Mar 8, 2014, at 7:29 AM, eryksun eryk...@gmail.com wrote:
i.e.
guess 1 or guess 100
becomes
not not (guess 1 or guess 100)
Why a not not? Wouldn’t that just be saying do this because the second not is
undoing the first?
distribute over the disjunction
not (not
On Mar 8, 2014, at 7:35 AM, Mark Lawrence breamore...@yahoo.co.uk wrote:
I have no interest in the efficiency, only what is easiest for me to read,
which in this case is the chained comparison. As a rule of thumb I'd also
prefer it to be logically correct :)
What exactly is ment by a
On 10/03/2014 02:05, Scott W Dunning wrote:
On Mar 8, 2014, at 7:35 AM, Mark Lawrence breamore...@yahoo.co.uk wrote:
I have no interest in the efficiency, only what is easiest for me to read,
which in this case is the chained comparison. As a rule of thumb I'd also
prefer it to be
On 10/03/2014 02:03, Scott W Dunning wrote:
On Mar 8, 2014, at 7:29 AM, eryksun eryk...@gmail.com wrote:
Anyway, you needn't go out of your way to rewrite the expression using
a chained comparison. The disjunctive expression is actually
implemented more efficiently by CPython's compiler, which
On Mon, Mar 10, 2014 at 5:29 AM, Mark Lawrence breamore...@yahoo.co.uk wrote:
As a newbie don't worry about it (yet). Personally I think it's plain daft
to put such advanced language topics on a tutor mailing list.
Different strokes for different folks. I like to tinker with and
disassemble
hi I need your help plz with this cods ( I want u to tell wht cod I miss to
stop the while loop whene I get 3 stars)
rm = []
stars = 0
##if stars == 3:
## print You win
##else:
## print hh
def ask_yes_no(question):
Ask a yes or no question.
answer = None
while answer not
hind fathallah hind_fathal...@yahoo.com Wrote in message:
while rm != stars:
    print\
   Â
    0 - Northe
    1 - South
    2 - East
    3 - Weast
   Â
    rm = raw_input(What room you want to go?: )
Why are you looping till
hind fathallah wrote:
hi I need your help plz with this cods ( I want u to tell wht cod I miss
to stop the while loop whene I get 3 stars) rm = []
I think you are comparing a string and an integer. That gives False even if
the values look the same:
i = 3
s = 3
print i, s
3 3
i == s
On Mar 10, 2014, at 4:15 AM, eryksun eryk...@gmail.com wrote:
Different strokes for different folks. I like to tinker with and
disassemble things as I'm learning about them. I would have been
ecstatic about open source as a kid. I learn simultaneously from the
top down and bottom up --
On Mar 8, 2014, at 3:57 AM, spir denis.s...@gmail.com wrote:
Well done.
And now that you have the right set of tests you can
half the number of lines by combining your if
conditions again, like you had in the original
post. ie. Bring your hot/cold/warm tests together.
So below is what I
On Mar 8, 2014, at 11:50 AM, Scott dunning swdunn...@cox.net wrote:
And now that you have the right set of tests you can
half the number of lines by combining your if
conditions again, like you had in the original
post. ie. Bring your hot/cold/warm tests together.
I’m having a hard time
On Mar 8, 2014, at 7:29 AM, eryksun eryk...@gmail.com wrote:
not not (guess 1 or guess 100)
Why a not not? Wouldn’t that just be saying do this because the
second not is undoing the first?
In boolean algebra, `not (A or B)` is equivalent to `not A and not B`
(De Morgan's law). I
301 - 400 of 1500 matches
Mail list logo