1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
marishachu [46]
3 years ago
11

Assign testResult with 1 if either geneticMarkerA is 1 or geneticMarkerB is 1. If geneticMarkerA and geneticMarkerB are both 1,

then assign testResult with 0. If geneticMarkerA and geneticMarkerB are both 0, then assign testResult with 0. Ex: If geneticMarkerA is 1 and geneticMarkerB is 0, then testResult is assigned with 1. If geneticMarkerA is 1 and geneticMarkerB is 1, then testResult is assigned with 0.
Computers and Technology
1 answer:
OverLord2011 [107]3 years ago
4 0

Answer:

Following python statement will give the assignment to testResult as specified:

if((geneticMarkerA == 1) or (geneticMarkerB ==1)):

   testResult = 1

if((geneticMarkerA ==1) and (geneticMarkerB == 1)):

   testResult = 0

if((geneticMarkerA == 0) and (geneticMarkerB == 0)):

   testResult = 0

Explanation:

In above statements or and and operator are used to check the conditions of set of values present in variable geneticMarkerA and geneticMarkerB.

Based on if the condition evaluate to true or false respective values to testResult varaible is assigned.

Following is sample run for above statements:

geneticMarkerA = 1

geneticMarkerB = 0

if((geneticMarkerA == 1) or (geneticMarkerB ==1)):

   testResult = 1

if((geneticMarkerA ==1) and (geneticMarkerB == 1)):

   testResult = 0

if((geneticMarkerA == 0) and (geneticMarkerB == 0)):

   testResult = 0

print(testResult)

Output

1

You might be interested in
When you were configuring Encrypting File System (EFS) in the lab, a __________ on the Documents folder in the File Explorer ind
harina [27]
I’m not 100% sure but I think it’s a padlock that represents it
3 0
3 years ago
What are possible penalties if a designer is caught breaking copyright laws?
Dominik [7]

Answer:

1 and 4 are the correct answers.

Explanation:

3 0
2 years ago
Which device protects computer systems from voltage fluctuations?
meriva
A fuse protects computer system from voltage fluctuations
6 0
3 years ago
Read 2 more answers
What type of application would be appropriate for learning a foreign language?
Marysya12 [62]

Answer:

Education

Explanation:

Most apps for <u>learning</u> a new language are for educational purposes and are most likely an education type of app.

7 0
3 years ago
Read 2 more answers
I WILL GIVE THE CROWN IF CORRECT
alisha [4.7K]

Answer:

foundations

Explanation:

7 0
2 years ago
Read 2 more answers
Other questions:
  • Evidence that Social media hasn’t improved human communication.
    12·1 answer
  • If in your checkout cart right before you buy something there is an option saying "this order contains a gift." on amazon, what
    7·1 answer
  • Write multiple if statements. if caryear is 1969 or earlier, print "probably has few safety features." if 1970 or higher, print
    6·1 answer
  • Technician A says that a ratio is a comparison between two values. Technician B says that in a compression ratio, the main value
    5·1 answer
  • Analyze the following code. // Program 1: public class Test { public static void main(String[] args) { Object a1 = new A(); Obje
    5·1 answer
  • During which geologic era was nearly all of Earth's land concentrated into one giant mass called Pangaea?
    6·1 answer
  • Which Packet Tracer feature do you think will be most helpful for you in learning how to manage a network
    5·1 answer
  • An end-user license agreement protects _____.
    7·1 answer
  • PYTHON:Given the dictionary, d, find the largest key in the dictionary and associate the corresponding value with the variable v
    12·1 answer
  • Why is it easier to spot a syntax error than a logical error?​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!