Sadly that’s uncommon and thus very identifying info.
Not sure, but you are a very active user. And you are Rosco. I guess you can be cross linked pretty easily.
I try to act like I’m certain future social credit systems will find this account and link it with me.
I write so much here, I don’t think it’s hard to find me if you have 2 of my accounts on different platforms.
I would like to join in, but since i’m a minor without any funds, I cannot sorry. If there are any resources you could point me torwards to emulate an arduino and program it, please say so.
Yeah, I’m looking at a 30 dollar plan A, and a free plan B. I really think you’ll learn more from being hands on with plan A, but I get that people can’t always drop cash on stuff.
depending on when you do this, I may be able to do plan A. I usually get a bit of money for christmas and doing odd jobs for family around that time, but plan b is probbably what i will have to do.
okay lads I need some help with this code. It is meant to find the factors of a number and if it’s prime just say it’s prime. For some reason it’ll try to spit out both (ignore indentation the paste messed the up)
def print_factors(x):
print(“The factors of”,x,“are:”)
for i in range(1, x + 1):
if x % i == 0:
print(i)
def find_prime(y):
if y > 1:
for i in range(2,y):
if (y % i) == 0:
print_factors(y)
elif:
print(“The number”,y,“is prime!”)
your logic here is funky. you have the print statement for the prime status in an “elif” block (which I assume is supposed to be an else block, since an empty elif like that should throw a compiler error). However, that conditional block is based off the previous if statement. Ie, if that condition (y%1==0) returns false, then it will automatically try to say that the number is prime.
What you want to do is have the function stop running once you find a factor, and if it doesn’t find a factor by the time the loop ends, then you print the prime statement.
Also, for future reference, if you highlight your code and click this button in the post toolbar, it will format it as code and let you keep spacing: