Questions tagged [boolean-expression]

A boolean expression is an expression in a programming language that produces a boolean value when evaluated, i.e. one of true or false.

In computer science, a Boolean expression is an expression in a programming language that produces a Boolean value when evaluated, i.e. one of true or false. A Boolean expression may be composed of a combination of the Boolean constants true or false, Boolean-typed variables, Boolean-valued operators, and Boolean-valued functions.

1049 questions
-3
votes
1 answer

What's wrong with the code I made in Modelsim VHDL Code? Using Behavioral Model

I have this VHDL coding, my Boolean Expression is F(w,x,y) = wxy + wx'y' + xy + w'x'y' and I need to convert it to a Behavioral Model. My question is if I coded the Behavioral Model correctly and I think it is wrong but I don't know where the error…
-3
votes
1 answer

How can I validate a boolean string input in java

I've been fighting with this problem and haven't found a solution. I have to validate the syntax of a boolean string expression so I can use it to find words or sentences in a document. For example, (footballer football !| basket)( should be…
Yisus
  • 3
  • 1
-3
votes
1 answer

Leetcode SQL 1440. Evaluate Boolean Expression

Table Variables: Column Name Type name varchar value int name is the primary key for this table. This table contains the stored variables and their values. Table Expressions: Column…
alli666
  • 11
  • 3
-3
votes
1 answer

C# Getting user input and outputting to boolean

I am currently in a C# boot camp. I am having trouble putting this together. The assignment is to create a console app for an insurance company that asks three questions. Age, which must be greater than 15, any speeding tickets, must be 3 or…
DP3Ton
  • 11
  • 3
-3
votes
1 answer

Extracting string variable from a bool function c#

so here I was wondering if it was possible to extract a string variable that was made in a bool function, the bottom code is just simplified down below: public string string_value = ""; public string first_wafer = ""; string_value = Wafer_value(out…
-3
votes
1 answer

How does this variable know what to do

This is some part of the code def count_syllables_in_word(word): count = 0 ... vowels = "aeiouAEIOU" prev_char_was_vowel = False for char in word: if char in vowels: if not prev_char_was_vowel: …
Aria
  • 1
  • 1
-3
votes
4 answers

Why aren't my program's functions occurring correctly?

(This is my first question on Stack Overflow, so please let me know if I can word it better.) I have a program that lets you open either a calculator or a "number generator". You pick which one to open by entering C or N into the console. The code…
-3
votes
1 answer

How To simplify boolean equations

Note that this is an example question to represent the sum of all similar questions, please don't answer only the question below, but the general problem with optimizing boolean expressions I have this boolean Equation:[boolean equation] e.g. (!B…
Scorix
  • 487
  • 6
  • 20
-3
votes
1 answer

find which values satisfy a boolean formula

I have the following Boolean expression x > 5 AND y > 10 C:\>python Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36)Type "help", "copyright", "credits" or "license" for more information. >>> x = 3 >>> y = 11 >>> eval("x>5 and y > 10") False >>>…
cateof
  • 6,608
  • 25
  • 79
  • 153
-3
votes
1 answer

Equality of negated True/False and None

When implementing a board game, a board cell can be in one of the three different possible states available: True (cell occupied by first player), False (cell occupied by second player) or None (cell is empty). My question is that: Why does …
-3
votes
2 answers

Boolean logic question

"true"? "Yes" : "No" , I am using ruby language This is taking by deafult "yes" even I select "no"
user557657
  • 856
  • 1
  • 12
  • 35
-3
votes
1 answer

Passing boolean operation to a function

Good evening guys, just as the titel says, my intention is, to pass a boolean operation like !x&&z to a function so that I can apply this operation later on. The plan will be to transfer any boolean operation into a truth table. All what I need is a…
Scorix
  • 487
  • 6
  • 20
-3
votes
1 answer

are there any simple negation boolean operator in python?

i want to make the boolean list to negated boolean list for example, below code has same meaning lst= [True, False] neg_lst = list(map(lambda x: not x, lst)) I think that there are the simplest way to make boolean list to be negated. like, unary…
frhyme
  • 966
  • 1
  • 15
  • 24
-3
votes
1 answer

Simplify Boolean logic to use less operators

Is there a way to simplify the below logic to use less than 5 operators (&& / ||) without creating new variables? var foo = (A || B) && C && [(A && D) || (B && E)]
-3
votes
1 answer

I need python understand True when 1, yea, y is typed

I would like to learn how could i run below Python code proper way. I guess comments will do the work below. Now, this only works well just in case I type "True" or "False" with capital initial letters. But I also need to get the same result when…
phantomxxx
  • 15
  • 1
  • 3