Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Badges? We don't need no stinking badges.


devel / comp.lang.python / Re: Newline (NuBe Question)

SubjectAuthor
o Re: Newline (NuBe Question)Thomas Passin

1
Re: Newline (NuBe Question)

<mailman.268.1700139875.3828.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=24490&group=comp.lang.python#24490

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news-2.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: lis...@tompassin.net (Thomas Passin)
Newsgroups: comp.lang.python
Subject: Re: Newline (NuBe Question)
Date: Thu, 16 Nov 2023 07:47:21 -0500
Lines: 55
Message-ID: <mailman.268.1700139875.3828.python-list@python.org>
References: <65547270.3139.338043@RealGrizzlyAdams.vivaldi.net>
<65551645.18452.230A27@RealGrizzlyAdams.vivaldi.net>
<5129e9a3-025b-411b-96d1-b562df9b2115@tompassin.net>
<6555B48F.10108.156EC1@RealGrizzlyAdams.vivaldi.net>
<4626640f-4fe5-49bc-a6f8-d555b7f7b58a@tompassin.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de MT30EhcuhfszBQnlEL0oMgkIwkZPlQ89WBS9r6338fqg==
Cancel-Lock: sha1:ArFTy3ZYRsCGtm+RCqlsygdPiEg= sha256:1V4+I5vakW2i3NpdgsDi55+Q/1hA61MDv1E7YKMSlyg=
Return-Path: <list1@tompassin.net>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=tompassin.net header.i=@tompassin.net header.b=FOuwjR4o;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.003
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'students.': 0.03; 'this:':
0.03; '(to': 0.07; '2023': 0.07; 'spaces': 0.07; 'wrong.': 0.07;
'else:': 0.09; 'posts.': 0.09; '"list': 0.16; '>>>>': 0.16;
'>>>>>': 0.16; 'grades': 0.16; 'idle,': 0.16; 'indentation': 0.16;
'lesson,': 0.16; 'newline': 0.16; 'part)': 0.16; 'point)': 0.16;
'received:10.0.0': 0.16; 'received:64.90': 0.16;
'received:64.90.62': 0.16; 'received:64.90.62.162': 0.16;
'received:dreamhost.com': 0.16; 'subject:Newline': 0.16; 'wrote:':
0.16; 'pm,': 0.19; 'subject:Question': 0.19; 'to:addr:python-
list': 0.20; 'code': 0.23; 'list,': 0.24; 'student': 0.24;
'wednesday,': 0.26; '>>>': 0.28; 'printed': 0.28; 'header:User-
Agent:1': 0.30; 'am,': 0.31; '(as': 0.32; 'python-list': 0.32;
'received:10.0': 0.32; 'received:mailchannels.net': 0.32;
'received:relay.mailchannels.net': 0.32; 'but': 0.32; "i'll":
0.33; 'there': 0.33; 'header:In-Reply-To:1': 0.34; 'also,': 0.36;
'change': 0.36; 'students': 0.38; 'could': 0.38; 'least': 0.39;
'list': 0.39; 'use': 0.39; 'wed,': 0.39; 'wrote': 0.39; 'want':
0.40; 'try': 0.40; 'should': 0.40; 'here.': 0.61; 'skip:h 10':
0.61; 'between': 0.63; 're:': 0.64; 'your': 0.64; 'let': 0.66;
'header:Received:6': 0.67; 'received:64': 0.67; 'order': 0.69;
'knowing': 0.71; 'direct': 0.73; 'left': 0.83; 'extra': 0.84;
'students:': 0.84; 'adams': 0.91; 'mixed': 0.93
X-Sender-Id: dreamhost|x-authsender|tpassin@tompassin.net
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1700138842; a=rsa-sha256;
cv=none;
b=LY+DjAj/U+OxidF9ULHtlziObsk+Kt4hotnikAiK7lugZnI8s8AXzrr3XfhnT8msG2MGFl
d2EfI+q+dr7cUYWHfwJYvf2Qgb4xlj5MhIi84YaeiJ+Ebtf88ajDSCPIM81maMERVBvb/C
EHk3FX5RlDc7mguAl5mM51ZQOxk5EeJDTk3MA/K7S5cJ6EG/k01K77cVkSjzmiS9uogwJ7
tYGZmFOQ77aBYGrU64YMt6++SsfW4qUkDVaHtTJqZnVDWrzZPeLEZ2mHaX+4Z3nFJgX8M7
d5ztU7XcwuW8lzlHWGxqguws3ZqhRuZPqTXM31JiWRYldiG8NR4e46Fjnp7OTw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
d=mailchannels.net; s=arc-2022; t=1700138842;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:dkim-signature;
bh=O9QoRPJfIUXCDN/gznDA60TTA9Izn5u6UHZoq5A24pA=;
b=EtOWw+0dflJ2lhf7uLzYEodH9sZCZRRZ+zPrxPjvCFVTpCQUgOQ50T597XDgBMIL5vqc77
+mHRojIQPaXm3MjMCbCb7IFPO7qnLBrkuecpCsg/WZ9XtQVinC2QqKfACPfqUp1s98PkW+
QX/5HEaPRfT1qJQn4q2crD1JrNFRIRJKIUepIaPk15rOf4CPMlXGLGsFwyFSWMKfPsHD9Z
pANbIBznMadXdmmhazJ6lh6DPa7W7AoBfDHGsg6VyjUTvfok+YLWei5o+412JMwA0UCs/h
S1SjNtDJYpnPmGrotPT5pQRWFrUQ77XilftK+EkZokC83USZuqd5soyVKWTDLw==
ARC-Authentication-Results: i=1; rspamd-55bcb54c45-dnvnz;
auth=pass smtp.auth=dreamhost smtp.mailfrom=list1@tompassin.net
X-Sender-Id: dreamhost|x-authsender|tpassin@tompassin.net
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|tpassin@tompassin.net
X-MailChannels-Auth-Id: dreamhost
X-Unite-Abiding: 5e5c3db351b08334_1700138842452_1565855041
X-MC-Loop-Signature: 1700138842451:4495041
X-MC-Ingress-Time: 1700138842451
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tompassin.net;
s=dreamhost; t=1700138842;
bh=O9QoRPJfIUXCDN/gznDA60TTA9Izn5u6UHZoq5A24pA=;
h=Date:Subject:To:From:Content-Type:Content-Transfer-Encoding;
b=FOuwjR4oV73H8VoCJgfxGnWB5YYAqnpD3q1IyKLkySuQV/opOVWK2g7rMDyyj1DjD
zd5Fu/xKy7KLK3TaCWnQnDN33ZvgfV9j6vEbXhgK/d79lrdZhLxbBCawARH8j+68ve
oWorazo9sWt8NtkMnecK1WSSL3+4fk9AgX0mWhmaMDhQuUun/C7Bv/IK4wDgPFuB+Z
8r2WsvNi+kGjVhqC/ptgNXdEivDeD5SwIU0FkzBouZ5eEJxrqb+Sch+0+gPa4tlTTe
DEriMp41YFb5UebEU0bKhrdEurEjkGsyWI+gKKREmgeUeGyZLBH7YNLyoLh1BRYTiI
gkjrTshkgsRGg==
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <6555B48F.10108.156EC1@RealGrizzlyAdams.vivaldi.net>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
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: <https://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>
X-Mailman-Original-Message-ID: <4626640f-4fe5-49bc-a6f8-d555b7f7b58a@tompassin.net>
X-Mailman-Original-References: <65547270.3139.338043@RealGrizzlyAdams.vivaldi.net>
<65551645.18452.230A27@RealGrizzlyAdams.vivaldi.net>
<5129e9a3-025b-411b-96d1-b562df9b2115@tompassin.net>
<6555B48F.10108.156EC1@RealGrizzlyAdams.vivaldi.net>
 by: Thomas Passin - Thu, 16 Nov 2023 12:47 UTC

On 11/16/2023 1:19 AM, Grizzy Adams via Python-list wrote:
> Wednesday, November 15, 2023 at 15:54, Thomas Passin via Python-list wrote:
> Re: Newline (NuBe Question) (at least in part)
>
>> On 11/15/2023 2:04 PM, Grizzy Adams via Python-list wrote:
>>> Wednesday, November 15, 2023 at 12:19, Pierre Fortin wrote:
>>> Re: Newline (NuBe Question) (at least in part)
>
>>>> On Wed, 15 Nov 2023 16:51:09 -0000 Grizzy Adams via Python-list wrote:
>
>>>> I don't give solutions; just a nudge... you appear not to fully grok
>>>> "list"; your list is ONE list with no delineation between students. You
>>>> want a "list of lists"...
>
>>>>> ['Example High', 'Mary', 89.6, 'Pass', 'Example High', 'Matthew', 76.5, 'Fail', 'Example High', 'Marie', 80.4, 'Fail', 'Example High', 'Manuel', 79.6, 'Fail', 'Example High', 'Malala', 98.9, 'Pass']
>
>>>> Like this:
>
>>>> students = [
>>>> ['Example High', 'Mary', 89.6, 'Pass'],
>>>> ['Example High','Matthew', 76.5, 'Fail'],
>>>> ['Example High', 'Marie', 80.4, 'Fail'],
>>>> ['Example High', 'Manuel', 79.6, 'Fail'],
>>>> ['Example High', 'Malala', 98.9, 'Pass']
>>>> ]
>
>>> for now I made a copt of code and altered to
>>>
>>> students = []
>>> grades = []
>
>> # In this design there is no point in the extra loop.
>> # also, the indentation is wrong. Perhaps you inserted
>> # tabs? Use only spaces in these posts.
>
> I copy-pasted the code direct from IDLE, (to avoid any other typo's)
>
>> # Also you don't need the students list
>>> for student in geographyClass:
>>> # students.append(geographyStudent(s))
>> s = geographyStudent(student)
>>>
>> # for s in students:
>>> if s.finalGrade()>82: Result=("Pass")
>>> else: Result=("Fail")
>>> print(s.school, s.name, s.finalGrade(),Result)
>
> I'll hive this a try (as a learning point)

I wrote that you don't need the "students" list, which is correct. But
there could be a use for a list. It would let you change the order in
which students appear in the printed output. Knowing how to do that is
a useful skill. But that should be left for a later lesson, not mixed
in here.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor