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
What is software?
bogdanovich [222]

Answer:

B

Explanation:

3 0
3 years ago
Read 2 more answers
Which logical operators perform short-circuit evaluation?.
Sergio039 [100]

Answer:

Short-circuit evaluation is performed with the not operator.

8 0
2 years ago
Suppose that you have a multiplexer (mux) with 5 different inputs at the following bit-rates: (A) 20 Kbps, (B) 8 Kbps, (C) 12 Kb
sweet [91]
The answer is number:

C.- Kbps
7 0
3 years ago
(Display nonduplicate words in ascending order)
olya-2409 [2.1K]

Answer:

The program to this question as follows:

Program:  

value = input("Input text value: ") #defining variable value and input value by user

word = value.split() #defining variable word that split value

sort_word = sorted(word) #defining variable using sorted function

unique_word = [] #defining list

for word in sort_word: #loop for matching same value

   if word not in unique_word: #checking value

       unique_word.append(word) #arrange value using append function

print(' '.join(unique_word)) #print value

Output:

Input text value: Good morning Good afternoon Good evening

Good afternoon evening morning  

Explanation:

In the above python code, a value variable is defined that uses input function to input value from the user end, and the word variable is declared, which uses the split method, which split all string values and defines the sort_word method that sorted value in ascending order.

  • Then an empty list "unique_word" is defined, which uses the for loop and inside the loop, a conditional statement is used.
  • In if block, it matches all value is unique if this is condition is true it will arrange all values and uses the print function to print all value.  

5 0
2 years ago
Who goes to belle place middle and is in 7th grade on hear​
SashulF [63]

Answer:

Not me but thx for the free points lol

Explanation:

3 0
3 years ago
Other questions:
  • If you want to present slides to fellow students or co-workers, which productivity software should you use to create them?
    5·2 answers
  • Blender questions
    10·1 answer
  • Cryptolocker is an example of what type of malware?
    11·1 answer
  • Which devices are managed through device management?
    5·1 answer
  • What are ways to enter a formula in Excel? Check all that apply. Click on the Function Library group and select a function from
    10·2 answers
  • The association between a UCS and a CS can be extended to include more stimuli (more stimuli related to the CS can elicit the CR
    7·1 answer
  • Software that displays advertising material when online.
    12·2 answers
  • Buying the newest phone as soon as it is released when your current phone works perfectly is not a good idea for all but which o
    10·2 answers
  • Write a static method that implements a recursive formula for factorials. Place this method in a test program that allows the us
    6·1 answer
  • Did the Z3 computer invented by Konrad Zuse have a negative effect on society?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!