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


Groups > comp.lang.python > #65706

Re: Python 2.7.6 help with modules

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <swdunning@cox.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.116
X-Spam-Level *
X-Spam-Evidence '*H*': 0.77; '*S*': 0.00; 'subject:Python': 0.06; 'subject:help': 0.08; 'subject:modules': 0.09; 'weeks,': 0.09; 'cc:addr:python-list': 0.11; 'backwards': 0.16; 'naming': 0.16; 'rem': 0.16; 'remainder': 0.16; 'seconds,': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'received:10.0.1': 0.19; '8bit%:5': 0.22; 'feb': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'days,': 0.24; 'hours,': 0.24; 'guys': 0.24; 'cc:2**0': 0.24; 'second': 0.26; 'header:In-Reply-To:1': 0.27; 'correct': 0.29; 'rest': 0.29; 'chris': 0.29; 'url:mailman': 0.30; 'you\x92re': 0.31; 'figure': 0.32; 'weeks': 0.32; 'url:python': 0.33; 'subject:with': 0.35; 'advice': 0.35; 'but': 0.35; 'there': 0.35; 'really': 0.36; 'minutes,': 0.36; 'up!': 0.36; 'url:listinfo': 0.36; 'thanks': 0.36; 'received:10.0': 0.36; 'url:org': 0.36; 'seconds': 0.37; 'received:10': 0.37; 'step': 0.37; 'pm,': 0.38; 'help,': 0.39; 'sure': 0.39; 'url:mail': 0.40; 'how': 0.40; 'days': 0.60; 'break': 0.61; "you're": 0.61; "you'll": 0.62; 'header:Message- Id:1': 0.63; 'taking': 0.65; 'talking': 0.65; 'to:addr:gmail.com': 0.65; 'charset:windows-1252': 0.65; 'hours': 0.66; 'here': 0.66; 'minutes': 0.67; 'it!': 0.67; 'helping': 0.70; '2014,': 0.84; 'about?': 0.84; 'out!': 0.84; 'received:68.230.241.137': 0.84; 'received:fed1rmfepi106.cox.net': 0.84; 'works!': 0.91; 'scott': 0.93
X-CT-Class Clean
X-CT-Score 0.00
X-CT-RefID str=0001.0A020208.52F6D833.00D8,ss=1,re=0.000,fgs=0
X-CT-Spam 0
X-Authority-Analysis v=2.0 cv=C/M3P3z+ c=1 sm=1 a=MB85R812cvcrhCHz/P2OVA==:17 a=IwL8z8QTeS0A:10 a=G8Uczd0VNMoA:10 a=N659UExz7-8A:10 a=kviXuzpPAAAA:8 a=_HE405UYfI8A:10 a=pGLkceISAAAA:8 a=8AHkEIZyAAAA:8 a=p1Xqlm-4WzEUY2KwQYkA:9 a=pILNOxqGKmIA:10 a=MSl-tDqOz04A:10 a=4vB-4DCPJfMA:10 a=McoMzsfFxu0pt6Hi:21 a=bf7TYiy8PcxzJTIT:21 a=MB85R812cvcrhCHz/P2OVA==:117
X-CM-Score 0.00
Authentication-Results cox.net; auth=pass (PLAIN) smtp.auth=swdunning@cox.net
Content-Type text/plain; charset=windows-1252
Mime-Version 1.0 (Mac OS X Mail 7.1 \(1827\))
Subject Re: Python 2.7.6 help with modules
From Scott W Dunning <swdunning@cox.net>
In-Reply-To <PiY11n00m3bjUJS01iY3b8>
Date Sat, 8 Feb 2014 18:21:54 -0700
Content-Transfer-Encoding quoted-printable
References <032F2E23-6983-4710-B087-C1771B66C3EF@cox.net> <635C857D-1F7A-4F95-B3A7-F1A3C69BF137@cox.net> <PiY11n00m3bjUJS01iY3b8>
To Chris Angelico <rosuav@gmail.com>
X-Mailer Apple Mail (2.1827)
Cc "python-list@python.org" <python-list@python.org>
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.6557.1391910755.18130.python-list@python.org> (permalink)
Lines 53
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1391910755 news.xs4all.nl 2915 [2001:888:2000:d::a6]:51348
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:65706

Show key headers only | View raw


I figured it out!  Thanks Chris!  Taking it one step at a time with the five digit number really helped me to see how to break it all up!  Are you a teacher?  I appreciate the help and the patients!  I like that you don’t just give me the answer that you break it down and help me so that I can figure it out on my own!  Thanks to all of you for all of your help, you guys are helping me a lot and I really appreciate it!

Here is how I did it if you’re curious.….

seconds = raw_input("Enter the number of seconds:")
seconds = int(seconds)
weeks = seconds/604800
weeks_rem = seconds % 604800
days = weeks_rem / 86400
days_rem = seconds % 86400
hours = days_rem / 3600
hours_rem = seconds % 3600
minutes = hours_rem / 60
minutes_rem = seconds % 60
seconds = minutes_rem % 60

print weeks, 'weeks', days, 'days', hours, 'hours', minutes, 'minutes', seconds, 'seconds'

Not sure if that’s the correct way to do it but it works!   If there is any other advice I’ll take it.  




On Feb 7, 2014, at 11:29 PM, Chris Angelico <rosuav@gmail.com> wrote:

> On Sat, Feb 8, 2014 at 5:27 PM, Scott W Dunning <swdunning@cox.net> wrote:
>> Ok, so it this what you’re talking about?
>> 
>> 
>> number = int(raw_input(“Enter a five digit number:))
>> foo = number % 10
>> bar = number / 10
>> 
>> digit = foo / 10
>> rem = bar % 10
>> 
> 
> Close! But if you print out foo and bar, you'll see that you're naming
> them backwards in the second one. The last digit is the remainder
> (modulo), the rest is the quotient.
> 
> ChrisA
> -- 
> https://mail.python.org/mailman/listinfo/python-list

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


Thread

Re: Python 2.7.6 help with modules Scott W Dunning <swdunning@cox.net> - 2014-02-08 18:21 -0700
  Re: Python 2.7.6 help with modules Larry Hudson <orgnut@yahoo.com> - 2014-02-08 23:00 -0800

csiph-web