t then it will execute the
"append(item)" method on the sublist attached to that key. If it does
not find it, then it creates a new key, "item", attaches the empty
list, "[]", to that key, and then appends item to that empty list.
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
uld be done using a list comprehension?
I realize I achieved my goal, but I was wondering what other
alternates could be done to achieve the same results.
a = 'ABCD'
c = 'OO'
tuple(sum([list(x) for x in zip(a,[c]*len(a))],[]))
Th
ad done in
college was definitely lacking in many recommended software
engineering practices.
> Object Oriented Analysis and Design
>
> Programming Pearls (vols 1 & 2)
>
Thanks, Alan! It does help.
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
do not have any time at all
for study. Just reading the posts, which are never onerous in their
number each day, constantly teaches. The people on this list go above
and beyond in the level of effort they put into their answers to
questions.
Thanks!
boB
I was still blind to the fact that a
\n was staring me in the face.
You are one sharp dude! As seem to be just about all of you...
Many thanks!
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On Sat, Dec 15, 2012 at 10:55 PM, boB Stepp wrote:
> It is funny in retrospect: If I had wanted to create a newline
> character I would do the correct thing, but seeing the backslashes as
> part of a picture, even after I went into PyScripter's options and
> turned on ALL spec
o integers with int() that
the string must already be of integer format? What is the rationale
for setting up int() in this manner?
Thanks as I continue to puzzle over the fine points of the basics...
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe
nd it's a mistake in the
> program -- and therefore python should alert you.
>
And this is why I asked the question. If this is the rationale, it
makes sense--an extra bit of double checking of the programmer's
intent.
Thanks,
boB
_
really don't need a function menu_quad(). You could instead have
a variable menu_quad which is assigned the menu, then just print menu_quad.
There are many other opportunities to improve and simplify this program.
But it is a good start.
--
Bob Gailer
919-636-4239
Chapel Hi
if I could
demonstrate a compelling need, which at this time I would deem highly
unlikely.
Thanks!
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
n number:
count = 0
if i == digit:
count += 1
Drop next two statements and try agan
else:
count = 0
print count
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscribe or cha
clsh". You should get a % prompt, which you
> can quit by entering "exit" command. If you don't, then you do not have
> tcl installed and won't have Tkinter either.
Thanks for pointing this out and how to check for tcl being installed.
I will have to check for this
On 12/23/2012 9:02 PM, Alan Gauld wrote:
You do realize that self is only defined inside a method?
Perhaps.
self is just another name - it could be "just" a variable, outside any
method.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
PASS" + bcolors.ENDC + " (%.2f s)" %
t_elapsed)
I for one would appreciate a more complete explanation.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
? Did you attempt a design?
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On 1/4/2013 8:26 PM, Alan Gauld wrote:
On 04/01/13 17:47, bob gailer wrote:
> Further selections can be made if there is enough credit.
This is confusing. You could drop that line with no ill effect. I am not
sure what it even means.
It seemed straightforward enough to me Bob.
If you put
On 1/18/2013 8:03 AM, eryksun wrote:
Yes, it's a mistake in the PCA example from the docs:
http://mlpy.sourceforge.net/docs/3.5/dim_red.html#principal-component-analysis-pca
There seems to be no way to report a bug in that documentation! Or am I
missing something?
--
Bob Gailer
919-636
Python uses import to load modules.
What are you trying to do?
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On 1/30/2013 1:51 AM, Gayathri S wrote:
I am sorry that you chose to ignore my request to start a new email with
a relevant subject.
Please next time do so.
The easier you make it for us to help you the more likely we will want
to help.
--
Bob Gailer
919-636-4239
Chapel Hill NC
http://www.pythontutor.com/visualize.html
is very helpful. Enter your code, click Visualize Execution, then click
forward.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription
mber of the collection s
5:10 The expression x or y first evaluates x; if x is true, its value is
returned; otherwise, y is evaluated and the resulting value is returned.
5:15 for operator precedence
Also realize that all you need at the end is:
else:
print("Invalid input-
print("The result is",remainder)
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
define eight_digit_binary and eight_digit_binary2,
as they do the same thing.
There is no need to nest these defs inside the loop.
You have a lot of other unnecessarily duplicated code.
There is no need to say while on == True:
It is sufficient to say while on:
Your program will never termin
On 2/14/2013 3:55 PM, Michael McConachie wrote:
[snip]
I agree with dave angel - the specification is far from clear. please
clarify. perhaps a simple example that goes from input to desired output.
--
Bob Gailer
919-636-4239
Chapel Hill NC
LE session. i reopened another session and
simply did
import sqlite3
cxn = sqlite3.connect('sqlite_test/test')
cur = cxn.cursor()
You are missing cur.execute('SELECT * from users')
for user in cur.fetchall():
print(
On 3/10/2013 3:06 AM, bessenkphilip wrote:
Hello Bob,
Hi. When you have a Python question that is not related to Python
Pipelines I suggest you send it to the tutor group.I and others will see
it and you will get faster help.
While trying one Fibonacci example in tutorial, i'm having
eak, it
throws alot of erros but it works, it happens to others using it too.
Can't address this as I apparently don't have the correct executable.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsu
com
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
s is a list with one element, consisting of one string or 244
characters.
print quips[randint(0, len(quips)-1)]
will always print the entire string.
Perhaps you meant to put a comma at the end of each line?
HTH and good luck.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
ot;,
"You've died and left your comrades to fend for themselves.
Douche",
"Your whole group dies because of you. Douche.",
"You've got terrible planning skills, and ruined the teams
chances of survival. Douche."]
ente
ment, consisting of one string or 244
characters.
print quips[randint(0, len(quips)-1)]
will always print the entire string.
Perhaps you meant to put a comma at the end of each line?
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maill
eat for each word in the list
repeat for each line in the file.
Then take a look at the various GUI packages that have a Python version.
tkinter comes with the Python distribution.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist -
n the Python Shell (display the words with a time delay)
>>> txt = open("test1.txt")
>>> for word in txt.read().split():
print(word)
time.sleep(.4)
now press enter again and you should see the words appear with a 0.4
second delay.
Hop
ution?
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
at is your name?")
playerName = input()
...everything works fine from IDLE. However, in the Windows command prompt:
E:\Programs\Python\IYOCGwPy\Ch4>python -V
Python 3.3.1
E:\Programs\Python\IYOCGwPy\Ch4>guess.py
Hello! What is your name?
boB
Traceback (most recent call last):
File &qu
y intent is to use Python 3.3. I was aware that if I were using 2.x,
that I should be using raw_input(); however, I was not aware of any
security implications. Thank you for that info!
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Hi Steve,
>
>> E:\Programs\Python\IYOCGwPy\Ch4>guess.py
>
> Here you are telling Windows to look up the file association for .py files.
> It locates some program, and runs it with guess.py as the argument. Looking
> at the result:
>
>> Hello! What is your name?
On Thu, Apr 25, 2013 at 8:45 AM, Marc Tompkins wrote:
> On Thu, Apr 25, 2013 at 5:40 AM, boB Stepp wrote:
> Remember that input(), in Python 2, executes what's passed to it. If your
> input is boB, then Python tries to execute the statement boB - and unless
> you've
ite.org:8080/cgi-bin/mailman/listinfo/sqlite-users - as this
is the preferred place to ask sqlite questions.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mai
ine 1, in
TypeError: float() argument must be a string or a number
How can I fix this.
Examine the argument to float. Ensure it is a string or a number.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscrib
knew them then.
HTH,
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
en knowing how to swim, but this approach has
yielded many valuable Perl scripts at work, so I am willing to take
this plunge willy-nilly!
Any thoughts on how to approach this will, as always, be greatly appreciated!
Cheers!
boB
___
Tutor maillist
On Sun, Apr 28, 2013 at 7:47 PM, Steven D'Aprano wrote:
> On 29/04/13 06:05, boB Stepp wrote:
>>
>> At work I use a commercial program for radiation therapy planning.
>> This program has an extensive built-in, proprietary scripting language
>> that is accessible t
d build the
> classes. But there are lots of OOP GUI frameworks to use as a starter for
> your heirarchy...
>
> FWIW What I've suggested is quite similar to how the earliest Windows
> programs were built with a data resource file defining the look and a code
> file defining th
On Mon, Apr 29, 2013 at 4:16 AM, Alan Gauld wrote:
> On 28/04/13 20:03, boB Stepp wrote:
>>
>> I have found the following book quite helpful and keep it handy:
>>
>> "Python Pocket Reference" by Mark Lutz, 4th ed., c. 2010.
>>
>
> I have an earlie
of the called script?(via a file maybe?)
>
In the Pinnacle environment all variables are global for the opened
plan that first started running a HotScript. So if we had the
variable, "Store.At.TempVariable.String", then it would maintain the
most recent value for the most rece
On Mon, Apr 29, 2013 at 4:08 AM, Alan Gauld wrote:
> On 29/04/13 03:57, boB Stepp wrote:
>
[Major snip]
>
>> Unfortunately in most instances the window would have to be generated
>> at runtime.
>
>
> The whole window? Or just a panel within it?
> If its only fo
Java with essentially the same title and
can tell me if I have made a good purchase or not. This is a topic I
need to look into at some point and, if nothing else, it is another
Python-based book!
Cheers!
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe
up the string literal into
multiple parts separated by + and break after the + . This seems to
use Python's built-in line continuation of anything between parens. Is
this the preferred way to do this?
Thanks!
boB
___
Tutor maillist - Tutor@python.o
'multiple parts separated by + and break after the +
> . This seems to'
>'use Python\'s built-in line continuation of anything
> between parens. Is'
>'this the preferred way to do thi
es Tkinter to create a new window, you
shouldn't run a livewires program from IDLE..."
The only other thing that I can think of is that you may not be
importing all of the needed modules. Check your code with the author's
carefully to see that you have done so.
HTH,
boB
__
it did not clear the screen, but it did do
something unexpected that I would like to understand. Upon hitting the
clear screen code the active window switched from the Python shell
window to the Python edit window. Why is this so?
As always thanks!
boB
___
Tu
On Sun, May 5, 2013 at 7:54 PM, Steven D'Aprano wrote:
> On 06/05/13 10:17, boB Stepp wrote:
>>
[...]
>
> But even on Windows that will not work, if you are running under IDLE. And
> unfortunately there is no official way to tell if you are running under
> IDLE, or any
n
clarifications of technical points that I had puzzled over in my other
texts oriented at adults. If nothing else, the OP could find one of
these, skim through it to get the true basics, and then go back to
another, more "adult" source.
Cheers!
boB
___
On 5/16/2013 8:49 PM, Alan Gauld wrote:
don't run programs on real data using IDLE. IDLE is for developing
programs not running them.
That is really scary. Why do you say that? The IDLE documentation does
NOT say that!
--
Bob Gailer
919-636-4239
Chapel Hi
Original Message
Subject:spyder
Date: Sat, 18 May 2013 19:20:12 -0400
From: bob gailer
To: ricar...@gmail.com
Following your recommendation I installed spyder using the Windows
installer.
Now what do I do to run it. I found no useful guidance in the online
er = random.randint(1, 100)
>
> while Count <= 100:
> print (Random_Number)
>
> Count = Count + 1
>
Your variable assignment for Random_Number is outside of your while
loop. Therefore its value never changes. Put it inside the while loop
just before the print statemen
kground or experience to judge
which would work best for me. Additionally this latest version of
Emacs apparently has made some improvements to the Python.el mode and
it is not clear to me what suggestions will or will not work with
this.
Anyone care to help me with this?
As always, t
ove referring strictly to while you are still debugging
the program? Or do the above comments that I asked for clarification
refer to the finished product?
Thanks!
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
t to be correct and bug-free. c) I
should make sure I do NOT try to catch errors just to keep the program
running from things I failed to anticipate (Probably from being a
novice programmer!). So the conclusion I am drawing is that I WANT my
program to crash if something I did not anticipate/plan
Thanks, Steve, for your last two posts. You have made things much
clearer for me.
On Wed, May 22, 2013 at 9:49 AM, Steven D'Aprano wrote:
> On 22/05/13 23:37, boB Stepp wrote:
>>
>> On Wed, May 22, 2013 at 8:07 AM, Steven D'Aprano
>> wrote:
>>>
[...
On Wed, May 22, 2013 at 9:45 AM, Steven D'Aprano wrote:
> On 22/05/13 23:31, boB Stepp wrote:
>>
>> On Wed, May 22, 2013 at 7:50 AM, Steven D'Aprano
>> wrote:
[...]
>>> 3) your job as a programmer is *not* to stop your program from raising an
&g
On Wed, May 22, 2013 at 8:47 PM, Steven D'Aprano wrote:
> On 23/05/13 02:09, boB Stepp wrote:
>
>> I would like to ask some general questions here. Problems can arise
>> from bugs in the operating system, bugs in the programming language(s)
>> being used, bugs in pack
done. You just have to play around with the spacing, both
horizontally and vertically.
HTH,
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
the type itself inside
> which one can put any character, setting it as type str?
>
I asked a similar question a while back. Here is a link to my original
question in the ActiveState Tutor archives:
http://code.activestate.com/lists/python-tutor/91223/
If you look at the bottom it shows
pt to give in that category is not a variable name.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
e the details?
BTW, interesting article and interesting site! I will have to bookmark
this one and come back for more exploration.
Thanks!
boB
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On Wed, May 29, 2013 at 11:07 AM, Oscar Benjamin
wrote:
> On 29 May 2013 16:38, boB Stepp wrote:
>> On Tue, May 28, 2013 at 9:34 PM, Steven D'Aprano wrote:
>>>
>>> However, a word of warning: although you *can* assemble a new string
>>> character by cha
On 6/1/2013 11:58 PM, Jim Mooney wrote:
squarelist = (c**2 for c in range(x,y) if c%2 != 0)
can be simplified to:
squarelist = (c**2 for c in range(x,y,2))
as long as x is odd.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist
On 6/15/2013 5:53 AM, Amit Saha wrote:
Symbolic math?
What is that?
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
pt or Python shell?
but nothing happened.
What did you expect?
Did you hit enter after each line?
Did the cursor move to the next line?
Did you get another prompt?
What did the prompt look like?
I think you get the idea - you need to tell us more, since we did not
watch you try the
s not a good idea to use recursion to navigate a game structure. It
is better to have each function return to a main program, have the main
program determine the next step and invoke it.
Help?
Since we are volunteers, the more you tell us the easier it is for us to
do that.
--
Bob Ga
structure is maintained; the numpy.shape returns ().
Huh? Makes no sense to me. Please explain.
I assume "the following format" is a character string.
How do you convert characters to integers - hint - int()
So try applying int() to each accession number and collecting the
results in a list
what you want - but that is not efficient.
Better is for you to read the article on how to ask questions, then
re-send your question.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription
more detail about "how to ask good questions"
Then all the other stuff.
With contact names and email at the bottom preceded by a neutrally
worded disclaimer. Only those who seek the contact info would need to
read that.
--
Bob Gailer
919-636-4239
Chapel Hill NC
_
f and retrieve the results. There is NO need to re-invent
the wheel.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
to do some of the above then come back with questions.
Start with something simple - process just one file.
Or hire me as a consultant and I will write it for you.
[snip]
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.o
ation, y=a+b*exp(k*x),
would you advice me on the how to, or tutorial?
Curve fitting is not my strength. Perhaps someone else on the list will
come to your aid.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To u
tal))
% start of first format specification
- = left justify
30 = field length
%s = treat value as string
$ = itself
% start of seconb format specification
9.2f = same meaning as in format()
% - format operator
("The cost of the carpet is ", subtotal) = tuple of values to be formatted.
In addition to Alan's comment:
Saying "it work properly" is totally uninformative. Tell us what is
happening that you want different.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubs
how()
> print("----")
> b=employee("test",1003)
> b.show()
> print("")
> c=employee()
> c.show()
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
at each step or "desk check" it - pretend you are
the computer and go step by step, making sure you know what each line
does. No guessing. You always have the interactive prompt to test
things, and the documentation to explain things.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
org/mailman/listinfo/tutor
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
nyone spot what should be changed?
Try: directive = "INSERT INTO %s VALUES (?,?,?,?,?,?,?);" % (Table, )
(Python 2.7 on Ubuntu )
Thanks in advance.
Alex
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mai
On 10/6/2013 12:11 PM, Mason Majors wrote:
Dear Bob,
I just came across your email address on the following website:
https://mail.python.org/pipermail//tutor/2011-November/087044.html
I was wondering, if you were able to provide any help and slove this
Pythn coding problem, as I am working
a callable object that is an attribute of User.
filter_by is a callable object that is an attribute of query.
first is a callable object that is an attribute of filter_by.
Nothing in the above suggests object creation.
HTH
--
Bob Gailer
919-636-4239
Chap
rily complex and
somewhat hard to read.
Especially for a rank beginner (the OP)
Also has an unnecessary statement (input_content = [])
IMHO it is more customary and a lot simpler to process the lines in a
file thusly:
for line in open(file1, 'r'):
process the line
--
Bob
ations.
I recall one student struggling with his first Basic program. I
recommended he walk thru it line by line, and I demonstrated that
technique. Amazed he exclaimed "In that much detail?".
--
Bob Gailer
919-636-4239
Chapel Hill NC
__
On 10/24/2013 2:09 PM, Danny Yoo wrote:
Related: I saw a picture the other day on Google+ of an mailing
envelope whose zip code was written in scientific notation.
That;s odd - since ZIP codes are character, not integer,
--
Bob Gailer
919-636-4239
Chapel Hill NC
byte"and therefore a continuation byte was expected but where
the 0xe9was found.
BTWhen I divide 1173 by 126 I get something close to 9 characters per
lne. That is not possible, as there would have to be at least 16
characters in each line.
Best you send us at least the first 130 lines so we can play with the file.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
nts that tell me "You may
want to iterate over the letters ch in s as in the for loop above, and
inside that for loop, count the number of letters that are in s and
come before the loop variable ch. You will also need an accumulator to
build the permutation t
On 10/30/2013 1:08 PM, Peter O'Doherty wrote:
Hi List,
I know a geometric sequence can be produced by:
series = [2**x for x in range(7)]
But I would like to curtail the sequence before the last element
excedes a certain value.
import itertools
series = [2**x for x in itertools.takewhile(lamb
"
> elif n == "J" or n == "K" or n == "L":
> n = 5
> elif n == "M" or n == "N" or n == "O":
> n = 6
> elif n == "P" or n == "Q" o
x27;Patch_501',
'release' : '13/09/11'
},
'ESXi500-20001' : {
'call' : Patch,
'name' :'ExpressPatch501',
'release' : '13/09/11'
},
},
},
[snip]
Does it have to be in a dictionary format? I'd rather use sq
inting out this way.
5
5
5
5
6
Please post the new program.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
ot;L":
n = 5
all the numbers should be characters e.g.
n = "5"
etc.
There are many ways to get the desired output.
One is:
collect the characters in one list, say numberList
Then use slicing to insert the "-" e.g. numberList[3:3] = "-&
On 10/31/2013 10:11 AM, Carmen Salcedo wrote:
Thanks Bob! :) A list is great idea. I'm just trying to figure out how to print
the number across like a phone number 555- instead of downward. I'm stuck
on that.
I repeat what I said before:
There are many ways to get the desi
rmatting. Each %s is replaced by the next string
in the tuple.
Just be sure you have exactly 7 characters in the list or this will fail.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscri
On 10/31/2013 2:51 PM, Carmen Salcedo wrote:
Thanks Bob! :) I'm very new at programming in Python. I appreciate your
feedback.
Here are some improvements to consider:
import string
def main():
d = {"1" : phoneTranslator, "2" : backwardString} # map user
s
elements in a list.
Apply min() and max() to the list.
Use list.index() to get the position of the value in the list.
Or write your own program to examine each value, tracking when it gets
smaller (bigger) and also tracking the index where that change occurs,
--
Bob Gailer
919-636-4239
Chapel Hill NC
1601 - 1700 of 2074 matches
Mail list logo