Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #65156

Re: Help with some python homework...

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.009
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'string': 0.09; 'formatting': 0.09; 'cc:addr:python-list': 0.11; 'subject:Help': 0.11; 'python': 0.11; '00:00:00': 0.16; '11:42': 0.16; 'docs.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'seconds,': 0.16; 'subject:python': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'feb': 0.22; 'cc:addr:python.org': 0.22; 'hours,': 0.24; 'cc:2**0': 0.24; 'this:': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'cool': 0.30; 'message-id:@mail.gmail.com': 0.30; 'too.': 0.31; 'subject:some': 0.31; 'critical': 0.32; 'subject:with': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'minutes,': 0.36; "i'll": 0.36; 'seconds': 0.37; 'how': 0.40; 'free': 0.61; 'hours': 0.66; 'divide': 0.84; 'to:none': 0.92; 'scott': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=ZrE2ZbfK/PBHDJTPzJLebiDh+qSDaOo03DKQWcO2XdQ=; b=XTR3gefiCtwPEsqzsj3YGu/2lopImzVDbVNqyPyJaNGNJCXx5kDwz+wEl6k9ZLbXfP YAWgtv36XNjsCUtHckeK+jvh6EzcNx8zpA+jSRzdZWHwIEWiRecrCn2uVvUVMC0z0CsB +zRushd3+19WoUQFTNwV8BTelenp4nRhGmkRqMYN/YJm7YxEm78mHQv/LJzqPrMFe/uP /wJaVEzI3j/x9rdReVBlhAG6G6Vg24dnEtu/mD819TZ2AtZYTOpKU/M/qUxjeOph/wLh 7wsrxOktlUKU6+LVPQbTkxT+XrLVl2+tGs8huoUtJu8td62emxLN6jiRDo4Qddq015JO th2A==
MIME-Version 1.0
X-Received by 10.68.234.230 with SMTP id uh6mr24031699pbc.161.1391216253066; Fri, 31 Jan 2014 16:57:33 -0800 (PST)
In-Reply-To <ECA63796-AAAE-484E-AF00-7B1B4AE66A3A@cox.net>
References <02c4c69d-71f1-4a01-86df-d4d5a7ffb3f5@googlegroups.com> <mailman.6195.1391146214.18130.python-list@python.org> <8da5d692-1446-4107-9a5a-5efd91f7c051@googlegroups.com> <bl14h8F21ooU1@mid.individual.net> <ECA63796-AAAE-484E-AF00-7B1B4AE66A3A@cox.net>
Date Sat, 1 Feb 2014 11:57:32 +1100
Subject Re: Help with some python homework...
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.6236.1391216262.18130.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1391216262 news.xs4all.nl 2862 [2001:888:2000:d::a6]:40666
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:65156

Show key headers only | View raw


On Sat, Feb 1, 2014 at 11:42 AM, Scott W Dunning <swdunning@cox.net> wrote:
> Also, any help on how to get the hours and seconds into double digits that would be cool too.  00:00:00

Once you can divide the number of seconds into hours, minutes, and
seconds, you can format them like this:

time = "%02d:%02d:%02d" % (hours, minutes, seconds)

I'll give you that one for free because I don't think it's
particularly critical to your course, but it will look better that way
:) Look up the string formatting features of Python in the docs.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Help with some python homework... scottwd80@gmail.com - 2014-01-30 21:12 -0800
  Re: Help with some python homework... Chris Angelico <rosuav@gmail.com> - 2014-01-31 16:30 +1100
    Re: Help with some python homework... sjud9227 <scottwd80@gmail.com> - 2014-01-30 22:24 -0800
      Re: Help with some python homework... Chris Angelico <rosuav@gmail.com> - 2014-01-31 17:38 +1100
        Re: Help with some python homework... sjud9227 <scottwd80@gmail.com> - 2014-01-30 22:48 -0800
      Re: Help with some python homework... Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-01-31 21:17 +1300
        Re: Help with some python homework... Chris Angelico <rosuav@gmail.com> - 2014-01-31 19:30 +1100
          Re: Help with some python homework... Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-01-31 23:46 +1300
        Re: Help with some python homework... Chris Angelico <rosuav@gmail.com> - 2014-02-01 11:57 +1100
        Re: Help with some python homework... Chris Angelico <rosuav@gmail.com> - 2014-02-01 12:34 +1100
        Re: Help with some python homework... David <bouncingcats@gmail.com> - 2014-02-01 14:17 +1100
        Re: Help with some python homework... Scott W Dunning <swdunning@cox.net> - 2014-01-31 18:14 -0700
          Re: Help with some python homework... Denis McMahon <denismfmcmahon@gmail.com> - 2014-02-01 19:32 +0000
            Re: Help with some python homework... David Hutto <dwightdhutto@gmail.com> - 2014-02-02 17:12 -0800
              Re: Help with some python homework... Larry Hudson <orgnut@yahoo.com> - 2014-02-02 23:48 -0800
        Re: Help with some python homework... Scott W Dunning <swdunning@cox.net> - 2014-01-31 17:46 -0700
        Re: Help with some python homework... Scott W Dunning <swdunning@cox.net> - 2014-01-31 17:42 -0700
        Re: Help with some python homework... David <bouncingcats@gmail.com> - 2014-02-01 17:13 +1100
        Re: Help with some python homework... Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-02-01 10:44 -0500
  Re: Help with some python homework... Neil Cerutti <neilc@norwich.edu> - 2014-01-31 13:51 +0000
  Re: Help with some python homework... Denis McMahon <denismfmcmahon@gmail.com> - 2014-02-01 03:02 +0000
  Re: Help with some python homework... Scott W Dunning <swdunning@cox.net> - 2014-01-31 17:35 -0700
  Re: Help with some python homework... Scott W Dunning <swdunning@cox.net> - 2014-01-31 22:18 -0700
    Re: Help with some python homework... Denis McMahon <denismfmcmahon@gmail.com> - 2014-02-01 19:45 +0000
    Re: Help with some python homework... David Hutto <dwightdhutto@gmail.com> - 2014-02-02 08:11 -0800
      Re: Help with some python homework... David Hutto <dwightdhutto@gmail.com> - 2014-02-02 08:36 -0800
      Re: Help with some python homework... MRAB <python@mrabarnett.plus.com> - 2014-02-02 16:38 +0000
        Re: Help with some python homework... David Hutto <dwightdhutto@gmail.com> - 2014-02-02 08:57 -0800
          Re: Help with some python homework... Denis McMahon <denismfmcmahon@gmail.com> - 2014-02-02 17:43 +0000
            Re: Help with some python homework... David Hutto <dwightdhutto@gmail.com> - 2014-02-02 10:09 -0800
            Re: Help with some python homework... David Hutto <dwightdhutto@gmail.com> - 2014-02-02 11:08 -0800
              Re: Help with some python homework... David Hutto <dwightdhutto@gmail.com> - 2014-02-02 11:21 -0800
    Re: Help with some python homework... "Rhodri James" <rhodri@wildebst.org.uk> - 2014-02-02 17:15 +0000
  Re: Help with some python homework... Scott W Dunning <swdunning@cox.net> - 2014-01-31 22:04 -0700
  Re: Help with some python homework... Scott W Dunning <swdunning@cox.net> - 2014-01-31 17:07 -0700
  Re: Help with some python homework... Scott W Dunning <swdunning@cox.net> - 2014-01-31 22:19 -0700
  Re: Help with some python homework... Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-02-01 10:50 -0500
  Re: Help with some python homework... Scott W Dunning <swdunning@cox.net> - 2014-02-01 23:06 -0700

csiph-web