- 9 Posts
- 14 Comments
I see now. So it’s possible for someone to run into multiple issues which can make updating a hassle.
Yes, I did. I was warned about doing so before but now I understand 😆
Problem is I don’t know what the packages are or what they were for even. I don’t recall installing them.
milon ( milon@lemm.ee ) OPto
Python@programming.dev•Why can't I use the '|' bitwise operator in this statement?
3·2 years agoThank you for the thorough explanation. It makes sense to me why I had the error that I did. I’ll keep this in mind next time when I consider using a bitwise operator.
milon ( milon@lemm.ee ) OPto
Python@programming.dev•Why can't I use the '|' bitwise operator in this statement?
5·2 years agoThank you for the reply. It seems bitwise operators are somewhat of an advanced concept that I may revisit down the road.
milon ( milon@lemm.ee ) OPto
Python@programming.dev•Why can't I use the '|' bitwise operator in this statement?
3·2 years agoThanks. I think I understand why I wouldn’t want to use it in this case. But what is an example of where I can use it? This makes me think I should avoid using bitwise operators with integers and keep it to strings only, but I know that’s not true from what I’ve learned.
milon ( milon@lemm.ee ) OPto
Python@programming.dev•Why can't I use the '|' bitwise operator in this statement?
2·2 years agoThank you. Not sure why in the link the arithmetic in green results in 7.
milon ( milon@lemm.ee ) OPto
Python@programming.dev•Why can't I use the '|' bitwise operator in this statement?
1·2 years agoYes I did eventually think of that as well but just wanted to understand why ‘|’ wasn’t producing the results I expected.
milon ( milon@lemm.ee ) OPto
Python@programming.dev•Why can't I use the '|' bitwise operator in this statement?
1·2 years agoI did come across that link but didn’t quite understand it. If looking only at 25 | 10, does the code not run as expected because 25 is 5 digits long and 10 is 4 digits long? Is that what’s meant by “two equivalent length bit designs”?
Also, I can’t tell if 10 | 4 = 7 or 10 | 4 = 14.
milon ( milon@lemm.ee ) OPto
Programming@programming.dev•Why does the for loop repeat in this recursion?
1·3 years agoGotcha. Thanks for the explanation.
milon ( milon@lemm.ee ) OPto
Programming@programming.dev•Why does the for loop repeat in this recursion?
1·3 years agoWhy does the for loop return when it hits the end of the function? Isn’t the recursive portion already completed in draw(n - 1)? The rest of it is just normal non-recursive code if I understand it correctly.
milon ( milon@lemm.ee ) OPto
Programming@programming.dev•Why does isalpha() fail to identify an alphabetic character?
2·3 years agoAh ha! Yes, I did check the docs but I think I just glanced over that portion. Be more careful next time. Now that I took another look at the other ctype.h functions, they all return 1 or 0. I think I confused equivalent python built-in functions as those evaluated to true/false. The < is a less than sign but it seems it doesn’t render correctly on Lemmy.
milon ( milon@lemm.ee ) OPto
Programming@programming.dev•Why does a control path not execute in this function?
2·3 years agoAh I see. I had a bad habit of using else if statements instead of else statements because I thought else if could be better in seeing the condition it’s testing for so it was clearer. I get the logic is actually different now.

It’s for CS50P which uses a customized VS Code. It has an automated code checker which I ran when I was done.