On Apr 5, 12:19 am, "Scott" <[EMAIL PROTECTED]> wrote:
> Alright, so I've been trying to teach myself Python which, when compared to
> my attempt to learn C++, is going pretty well.
> But I've come across an issue that I can't figure out, so I figured I'd ask
> the pro's.
>
> Now it looks pretty we
Scott wrote:
[...]
>
> Now when suggesting books, keep in mind that, that while I'm new to Python
> (and programming in general) I'm able to grasp difficult concepts as long
> as I have enough detail as to why it is the way it is. For instance I'm, by
> experience and nature, a computer techn
Thanks to everyone that respondedI would never have figured that out.
7stud,
Your suggestion is being considered lol, as there are a lot more bits of
code in that book that I can't get running correctly.
Any other books you'd, or anyone for that matter, would recommend as
required reading?
Scott wrote:
> sentence = raw_input('Sentence: ')
>
> screen_width = 80
> text_width = len(sentence)
> box_width = text_width + 6
> left_margin = (screen_width - box_width) // 2
>
> print
> print ' ' * left_margin + '+' + '-' * (box_width-2) + '+'
> print ' ' * left_margin + '| ' + ' ' * te
On Apr 4, 4:48 pm, "John Machin" <[EMAIL PROTECTED]> wrote:
>copied straight from "Beginning Python: From Novice to
>Professional",
>
> > Any help would be greatly appreciated
>
I suggest you get another book. I am currently reading that book, and
unless you are an experienced programmer that can
On Apr 4, 3:19 pm, "Scott" <[EMAIL PROTECTED]> wrote:
(snipped)
>
> print
> print ' ' * left_margin + '+' + '-' * (box_width-2) + '+'
> print ' ' * left_margin + '| ' + ' ' * text_width + ' |'
> print ' ' * left_margin + '| ' + ' ' sentence + ' |'
> print ' ' * left_margin + '|
sentence = raw_input('Sentence: ')
screen_width = 80
text_width = len(sentence)
box_width = text_width + 6
left_margin = (screen_width - box_width) // 2
print
print ' ' * left_margin + '+' + '-' * box_width + '+'
print ' ' * left_margin + '|' + ' ' * box_width + '|'
print ' ' * left_margin + '|
Scott a écrit :
(snip)
> print ' ' * left_margin + '| ' + ' ' sentence + ' |'
^
a '+' is missing here
(snip)
> Now if i put * before sentence as it is with the rest of the variables, it
> actually gets to the point w
On Apr 5, 8:19 am, "Scott" <[EMAIL PROTECTED]> wrote:
> Alright, so I've been trying to teach myself Python which, when compared to
> my attempt to learn C++, is going pretty well.
> But I've come across an issue that I can't figure out, so I figured I'd ask
> the pro's.
>
> Now it looks pretty wei
Scott wrote:
> Alright, so I've been trying to teach myself Python which, when compared to
> my attempt to learn C++, is going pretty well.
> But I've come across an issue that I can't figure out, so I figured I'd ask
> the pro's.
>
> Now it looks pretty weird in this format but it was copied exac
10 matches
Mail list logo