if bIsEven = true {
return true;
} else {
return false;
}
>>53706338
What's wrong with that
>>53706589
Return biseven
>>53706338
girls code is much clearer than boys.
>>53706338
//a simple program that lets you no if bi = 7
>>53706589
obvious first issue is that in most languages people use this is unlikely to be what the "programmer" intended. It uses assignment and most languages return the new lvalue's value in assignment statements. Which means it's always gonna return true and would be hard to see why unless you know this.
The other issue is obvious and it's absolutely shocking how many mediocre programmers shit up their source files with it. They wouldn't use OTB style though - expect every brace to be on a new line and some extra whitespace and a few comments also.
>>53706338if (bIsEven)
return true;
else
return false;
>>53706734return bIsEven;
>>53706744bIsEven;
>>53706763
assumed to be the body of a function
>>53706773
The function is pointless to begin with
>>53706781
Also assumed that it's not the entirety of the body though.
>>53706744
;)
you got it
>>53706338def isPrime(n):
for i in range(n-1,2):
if n%i = 0:
return False
return True
>>53706877
ohh boy that's gonna take a long time
>>53706877
What is the best way of doing this, efficiency and readability wise?
>>53706911
Firstly to check for prime you'd only have to go from 2 to half the number
Secondly there are sieve things. Finding primes efficiently is a major field for cryptography purposes
>>53706944
> half the number
I think you mean the square root of the number.
>>53706973
You're right nigga, to power of half I meant to write
struct counter {
value i;
}
struct value {
uint16 j;
}]/code]
if(ayy == 'lmao'){
return 'lmao';
} else {
return 'yolo'
}
who said girls couldn't code?
>>53708432
Am I drunk?
This will always return lmao.
>>53708614
why? anon didn't indent it properly but why would it?
>>53709835
Hope can stay not by lmao