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
Select three advantages of cloud computing.
777dan777 [17]

Answer:

easily managed, large amount of storage capacity, great flexibility

Explanation:

5 0
3 years ago
When it comes to credit scores, why is having a
inessss [21]

Answer:

credit karma

Explanation:

karma is -69

6 0
2 years ago
Derek found that the CPU was running several processes. While Derek was looking at Task Manager, the computer crashed. Derek res
wlad13 [49]

Answer: d. Run a virus scan

Explanation: Running a virus scan will reveal if the trojan virus or any other malware has been launched and the clearing the virus when detected. These will make the computer to start working well again. The unexplainable processes that started when the computer was rebooted can be viruses.

8 0
3 years ago
Read 2 more answers
You do not really know that you have a hand. Here is why. Imagine the possibility in which you are only a handless brain floatin
Harrizon [31]

Answer:

If you do not know you are a brain in a vat, you do not have hands.

Explanation:

This premise is plausible as to understand the handless brain which is floating in a vat. The brain is connected to a super computer and it transmits messages to the brain. The brain receives those message and give signals to perform tasks.

8 0
2 years ago
You're working at a large industrial plant and notice a tag similar to the one shown in the figure above. Which of the following
Fynjy0 [20]
The answer should be B
6 0
3 years ago
Read 2 more answers
Other questions:
  • Achieving a degree in computer forensics, information technology, or even information systems can provide a strong foundation in
    11·1 answer
  • What are a few benefits of virtualization?<br> How do they benefit ?
    9·1 answer
  • Write the method public static doublell quizAverages (double (1 scores). which takes a 2D array of doubles that represent quiz s
    11·1 answer
  • What are the differences, physically and logically, between the two printing configurations: Network-attached Printing and Netwo
    7·1 answer
  • What does an operating system do?
    12·1 answer
  • List three different sets of keywords that could be used to search for information on how to
    15·1 answer
  • 3. State whether the given statements are true or false. a. The computer is called a data processor because it can store, proces
    13·1 answer
  • How i simplify this boolean expression ?A'.B'.C'+A'.B'.C+A'.B.C+A.B'.C+A.B.C
    6·2 answers
  • What is not recyclable in a<br> hybrid car<br> hydrogen car<br> petrol car
    15·1 answer
  • 5 points)*list all of the data that needs to be kept track of for the scenario above in a 1nf (flat file) table (20 points)*use
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!