untonuggan: four different colored panels of the MRI image of a brain (brain)
[personal profile] untonuggan
I am playing with code to learn Python moar, because I really learn better by using stuff than by trying to memorize abstract things, and even moar when it feels useful.

So yes.

It is going well except I'm trying to do a Thing which feels like it should feel simple except maybe I don't know the search term for what it's called or maybe in actual programming it's not simple? So I thought I'd ask the hive mind here and then if no luck maybe move on to Python forums hivemind or something.

Basically I am making a program that automates making a hat recipe, because I know a lot of math-phobic people who don't make up their own hat patterns because math.

I have a lot of the input features programmed and if/then boolean type stuff.

My conundrum is, I am looking for some sort of thing that goes something like:

here are several possible number of stitches to cast on; they work with a given pattern repeat, gauge, and head size (that coding is already done)
here are several integers (7, 8. 9, 10, 11, 12, let's say)
which of those integers go into the stitch totals with a remainder of zero?
give me those integers-cast on combos, that will be your choice of decreases-cast on pattern combos
(then I can insert it into a pre-scripted pattern text which is on Ravelry or something)

I've been looking at sets and conditional statements and lists and I started to look at regular expressions but by then my brain had hit "no more concentration for you tonight, also you keep snapping at people who interrupt your train of thought." so yup.

any feedback appreciated!
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at [email protected]

Profile

untonuggan: Lily and Chance squished in a cat pile-up on top of a cat tree (buff tabby, black cat with red collar) (Default)
lizcommotion

October 2017

S M T W T F S
1234567
891011121314
15161718192021
22232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 30th, 2025 04:41 am
Powered by Dreamwidth Studios
OSZAR »