• Register
1 vote


I am new in programming so I tried python practice I tried to figure out f any operator represents the logical and. in python programming can anybody help?

10 7 2
6,060 points

Please log in or register to answer this question.

1 Answer

0 votes


You can use the below code to check if this operator represents the logical and:
a = True
b = False

print('a and b is',a and b)


You can change the condition if you want o. Happy Coding.


11 6 4
34,950 points

Related questions

0 votes
1 answer 288 views
Problem : I have very simple problem that currently looking for the fast implementation in Matlab. I have below array of values: b = floor(rand(5,5).*255) I also have the similarly sized threshold array : b_thresh = floor(rand(5,5).*255) I want to use the ... But, I am facing below error : Operands to || and && operations must be convertible to logical scalar values How can I resolve the issue?
asked Dec 21, 2019 alecxe 7.5k points
1 vote
1 answer 707 views
Problem : I am learning R. I am trying to make the subset of my data frame in the R which is based on one or the other value available in my column of the factors but because of some unknown reason to me I am unable to use | operator with the factor values. If I try to ... != "c" as it will not work. I am stuck with above error from past two days. Please guide me in fixing above R error for me.
asked May 12, 2020 Martin K 6.6k points
0 votes
1 answer 42 views
Problem: I am learning logical operators in C# and I came across &,&& and |, ||. I am confused about what is the difference in both of these representations?
asked Oct 15, 2020 Code Learner 6k points
0 votes
1 answer 118 views
Problem: Hello programmers! I am learning to program, and I just got a little confused about boolean values and logical operators. I tried to run the following program: #include<iostream> using namespace std; int main() { bool check = false && true || true; ... program, I got the following output: Condition evaluated to true I am so confused about how this condition evaluates to true. Any help?
asked Dec 18, 2020 Code Learner 6k points
0 votes
1 answer 90 views
Problem: I am new, I need help, can anyone help me by filling in the blanks? C#, C++, C, and Java use the symbol ____ as the logical OR operator?
asked Feb 19, 2020 maddi86 5.4k points
0 votes
1 answer 72 views
Problem: I am new, I need help, can anyone help me? This subsystem defines the logical structure of the database by using a data dictionary or schema? A. Data manipulation B. Application generation C. Data administration D. Data definition
asked Feb 18, 2020 maddi86 5.4k points
0 votes
1 answer 10 views
1 vote
1 answer 965 views
Problem: For the code below I can not get the correct answer: square = 5 results = list(map(lambda a: 5 * a, range(square))) for i in range(square): print("5 raised to the power of",i,"is",results[i]) This code gives the following output: 5 raised to the power ... to the power of 2 it should be 25 but the output is showing 10. What is the problem in my code can anyone sort out? Thanks in advance.
asked Apr 20, 2020 samhaz 5k points
0 votes
1 answer 35 views
0 votes
1 answer 37 views
Explain with an example?
asked Oct 8, 2020 jagruthi 680 points