Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
98 views

I have the following excerpt from my Python code For emp in employees: Model.Add(d[emp] >= 25) .OnlyEnforceIf(d120[emp]) Model.Add(d[emp] < 25) .OnlyEnforceIf(d121[emp]) It is my ...
Prem Narasimhan's user avatar
1 vote
2 answers
107 views

So I am a beginner at javascript and learnt that there are only a limited falsy values: false, 0, -0, BigInt 0n, “”, null, undefined, NaN Yet when I use the == operator with truthy values, this ...
applepie's user avatar
3 votes
2 answers
87 views

I'm trying to debug (rewrite?) someone else's Python/cherrypy web app, and I ran across the following 'if' statement: if not filename.endswith(".dat") and ( filename.endswith(".dat&...
user3765883's user avatar
-2 votes
1 answer
40 views

I have f(a,b) = 0 and want to represent it in NAND form (only using NAND gates) in terms of a and b, but I don't think is possible.
Glooring's user avatar
0 votes
1 answer
121 views

I have a set of Boolean functions that are independent, and (hypothetically) can be executed in parallel. I want to call those same functions repeatedly. See the code below, in which the outputs of ...
mattroos's user avatar
  • 135
1 vote
1 answer
85 views

Can someone explain to me how to find the simplified boolean expression given the kmap below? kmap I'm grouping the 1's in the upper left corner, top row, and wrap-around in the fourth column but am ...
moosemarrin's user avatar
1 vote
2 answers
285 views

I'm doing some simplifications for a circuit and I ended up getting the following expression: A.C'.D' + A.B'.C' + B.C.D' + B'.C.D + A'.B'.D' which translates to the truth table where 0, 2, 3, 6, 8, 9, ...
Waffle_Runian's user avatar
0 votes
0 answers
119 views

How to update each item of a Boolean array in a For... Each loop? This code updates item variable in every loop but it doesn't update the array items themselves. Dim BoolArr(1 to 4) as Boolean Dim ...
house_of_codes's user avatar
0 votes
2 answers
58 views

I need to find a formula that can tell me if certain conditions are met in multiple columns. I have Column A "Day of Week" and Column B "24 Hr Clock" In column C I would like to ...
Ron B's user avatar
  • 13
0 votes
1 answer
54 views

In order to implement simplification of a 5-variable Boolean expression using Karnaugh map, I write a JavaScript function to group cells (which input is a list of integers specifying minterms): ...
Duy Duy's user avatar
  • 621
0 votes
2 answers
143 views

I've defined a grammar, which I have to parse in C# and evaluate the resulted "constraints" on a list of dictionaries. The grammar is mainly boolean algebra. Here you can check it: grammar ...
vencelbajnok's user avatar
0 votes
2 answers
326 views

I not understand how the first Boolean expression on the question can be simplified into the last. Please help me. My attempt: 1. (xy)' + (yz) 2. (x' + y') + (yz) # Using de Morgan's law. 3. x' + (y' +...
Alix Blaine's user avatar
1 vote
2 answers
114 views

Here is the problem: number = 1101 #You may modify the lines of code above, but don't move them! #When you Submit your code, we'll change these lines to #assign different values to the variables. # #...
XYZ's user avatar
  • 19
0 votes
1 answer
48 views

I am trying to create a function that returns a different greeting depending on two variables: the country and time provided. If time is greater than or equal to 0 but less than 12 it will be morning. ...
Umar Hussain's user avatar
0 votes
1 answer
95 views

I'm implementing a compiler as part of a class, for a language which is supposed to support both arithmetic and boolean expression. Unfortunately, I'm having some trouble implementing rules for both ...
Ter Maxima's user avatar
1 vote
2 answers
117 views

I have a function which takes in 3 arguments and I want to make sure those three arguments are numbers. As of right now, I've made this after a bit of experimenting and it seems to work but I'm not ...
Chargou's user avatar
  • 13
-3 votes
1 answer
53 views

Which of the following will be fully evaluated that first option will be checked inclusive the second option, if the following variables represent the following boolean values a = True b = False ...
Kondwani Paul Kufeyani's user avatar
0 votes
1 answer
126 views

I know this is can be a very basic question, but I found something curious on Python. I will try to explain this with the following example: l = [1,2,3,4,5] n1 = 1 We know the following: print( n1 in ...
Sebastián Silva's user avatar
-1 votes
1 answer
49 views

I had a problem with checking falsy conditions and don't understand how 'false' works. I tested the code above, echo (0 == false); //->true echo ("0" == false); //->true echo ("0&...
Nicolas Henry's user avatar
1 vote
2 answers
572 views

I have a simple macro function which will check the condition and return an Boolean value. Below is the snippet of code assume: #define boolean bool Test.h file #define CHECK_STATE(X) (...
user2986042's user avatar
  • 1,300
-2 votes
2 answers
63 views

I was wondering if those familiar with codingbat's problems might be able to help me with understanding the differences between these two solutions and why one doesn't work. The problem: Given a ...
AzureBoredom's user avatar
2 votes
1 answer
172 views

I have a tree of boolean operations from a boolean expression that I have to run in Java. The tree would be something like this: And I would need to run it in Java iteratively so that it returns me a ...
simondx's user avatar
  • 103
1 vote
1 answer
88 views

I want to filter the datapoints I have, until I only have the datapoints were the participant was asleep left. I have my dataframe with DateTime values and the values I am researching, and a different ...
Marloes's user avatar
  • 13
-1 votes
1 answer
95 views

I´m a 1 week self taught python3 guy, and i´m into the comparison and boolean operators and learn this: True and True True True and False False False and True False False and False ...
Jaime Cordoba's user avatar
0 votes
1 answer
48 views

I have a horrible feeling that the answer to this question is going to be obvious, but... I am reading data from a small file in MicroPython. The value of the line I read determines whether a bool ...
PhilTilson's user avatar

1
2 3 4 5
22