[Tutor] question about subroutine
ThreeBlindQuarks
threesomequarks at proton.me
Sat Sep 30 14:46:41 EDT 2023
Without being able to see the code described, all I can share is my reaction to the phrase "subroutine".
I assume you either mean some function you call or perhaps a stretch of code such as on a branch of an IF statement or the like.
To me, it reminds me of very early days when a language like BASIC had a line like:
GOSUB 500
Does that approach now sound so primitive so that few languages now use anything direct like a GOTO or at least deprecate it?
Or do people now routinely still use phrases like subroutine?
Sent from Proton Mail mobile
-------- Original Message --------
On Sep 23, 2023, 8:54 AM, Emma Sweetland wrote:
> I was wondering if someone could advise about what is going wrong with this subroutine. With some debugging prints, I know the problem is definitely on line 9 when new[row][column] is assigned a new value. That part is working but the problem is that it is also changing the corresponding value in grid which is the list from which new was originally copied (using append). This is happening despite the fact that new and grid have different addresses (ids) so I don't understand how a change to new is affecting grid. Any help gratefully received. Thank you. Emma Sweetland​ Teacher - Mathematics E: ESweetland at bosworthcollege.com W: www.bosworthcollege.com M: T: +44 1604 239 995 [cid:c69baae0-d942-4dfa-b7be-09ed03472196] [cid:637d5568-d010-4e8d-9756-004cd338ad23] [cid:6374fa7e-d9ca-4eaf-bf20-d9e56505b5fd] [cid:857bfdde-db53-4e9d-8a20-9ca86c9a9b21] [cid:b198bc7c-c119-47a3-849f-8999861a6ba2] This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the originator of the message. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Bright Scholar (UK) Holdings Limited, trading as CATS Global Schools and/or subsidiary companies. In order to prevent fraudulent activity (including phishing), we will not request you to pay any invoices or monies into accounts other than the account stated within its own invoice(s). Any change to such accounts will be an exceptional occurrence and any such request, purported to be from us, should be subject to your own additional authentication or verification steps prior to making any such change or payment(s). This message has been scanned for malware by Office 365. www.office365.com _______________________________________________ Tutor maillist - Tutor at python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list