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
Tom [10]
3 years ago
15

Hi there! I just started my beginner computer science class and I was wondering if anyone wants to help with an assignment i'm h

aving trouble with.
Here are the instructions:

Write a program that contains 3 variables and produces the logic table. You will need to request input from the user to set the variables in the form of T or F for each variable. Try to condense your program so you write a single conditional to produce the table. Place the following at the beginning of your code, with all of your code indented to be in that block, so you have a continuous loop:

while True:


I attatched the logic gate to this question.

Thank you!

Computers and Technology
1 answer:
Alik [6]3 years ago
5 0

After looking at your question, I reasoned you were writing this in python. Here's my code, I hope it helps!

while True:

   v1 = input("Enter value of first variable (T/F) ")

   v2 = input("Enter value of second variable (T/F) ")

   v3 = input("Enter value of third variable (T/F) ")

   print("v1: {}, v2: {}, v3: {} = T".format(v1, v2, v3) if v1 == "T" and v2 == "T" or v1 == "T" and v3 == "T" else "v1: {}, v2: {}, v3: {} = F".format(v1, v2, v3))

You might be interested in
Steve is happy today but he ____ yesterday​
suter [353]

steve is happy today but he wasn't yesterday

3 0
2 years ago
Read 2 more answers
Translate the following pseudocode for randomly permuting the characters in a string into a C++ program.
Svetllana [295]

Answer:

d

Explanation:

salak sensin kolay gelsin

6 0
2 years ago
Which option describes wearable technology?
kotykmax [81]
My opinion is the answers A and D. I would choose A if you can only choose one, though.
7 0
3 years ago
Read 2 more answers
Which type of communication protocol converts data into standard formats that can be used by applications?
larisa86 [58]
<span>Arrival protocols are the type of data protocols that convert data into standard formats that can be used by applications, such as email, Web browsers and Skype</span>
8 0
3 years ago
On an XBOX 360, what does it mean if you get 4 red rings on your console?
Hitman42 [59]

Answer:

C. This happened to me.

Explanation:

4 0
3 years ago
Other questions:
  • How has technology fragmented the audience for sports and entertainment<br> commodities?
    10·1 answer
  • If i'm wanting to use hydra on linux to crack a password and the issue regarding hashes occurs, what shall i do?
    12·1 answer
  • Conversion of a continuous stream of sound into a series of ones and zeroes that can be interpreted by computers results in
    12·1 answer
  • Pamela finds that she is constantly spelling the word “color” as “colour” when she is typing. Even though this is how the word i
    11·1 answer
  • WHAT 1 + 1 ???? ???????????????????
    15·2 answers
  • What is the traditional cognitive perspective ofHCL?
    12·1 answer
  • According to your text, three factors are responsible for the rapid rise in new product development. They are faster and more ec
    9·1 answer
  • Which country was the first in the world to launch a mass media campaign in response to population growth?
    14·1 answer
  • Write a function in Java to implement the following logic:
    13·1 answer
  • A section at the top of the page that makes it easy for the recipient to respond to a letter is called a(n
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!