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
If there are 8 opcodes and 10 registers, a. What is the minimum number of bits required to represent the OPCODE? b. What is the
Nimfa-mama [501]

Answer:  

For 32 bits Instruction Format:

OPCODE   DR               SR1                   SR2      Unused bits

a) Minimum number of bits required to represent the OPCODE = 3 bits

There are 8 opcodes. Patterns required for these opcodes must be unique. For this purpose, take log base 2 of 8 and then ceil the result.

Ceil (log2 (8)) = 3

b) Minimum number of bits For Destination Register(DR) = 4 bits

There are 10 registers. For unique register values take log base 2 of 10 and then ceil the value.  4 bits are required for each register. Hence, DR, SR1 and SR2 all require 12 bits in all.  

Ceil (log2 (10)) = 4

c) Maximum number of UNUSED bits in Instruction encoding = 17 bits

Total number of bits used = bits used for registers + bits used for OPCODE  

     = 12 + 3 = 15  

Total  number of bits for instruction format = 32  

Maximum  No. of Unused bits = 32 – 15 = 17 bits  

OPCODE                DR              SR1             SR2              Unused bits

  3 bits              4 bits          4 bits           4 bits                17 bits

7 0
3 years ago
The word count of the active document is typically displayed on the ________.
romanna [79]

Click the Word Count in the Proofing Group. Maybe the name is the Bottom ribbon tab

4 0
3 years ago
A user logs into Active Directory on a workstation and the user home directory does not redirect to a network share on a file se
inysia [295]

Answer:

gpresult

Explanation:

Group Policy provides the system administrator with settings that would be necessary to manage the different user accounts available in an organization. It also controls their work environment centrally by configuring the user Operating System (OS), applications and user accounts.

Group policy settings or configurations are referred to as Group Policy Objects (GPOs). These objects can be linked to organizational units (OUs), domains or sites.

There are various group policy commands such as;

  1. rstrui (System Restore tool will run),
  2. runas (using different permission to run a tool or program),
  3. tasklist (currently running programs are shown
  4. gpupdate (Group policies are refreshed)
  5. gpresult (group policy configurations are displayed for verification)

gpresult command can be used to verify the group policy configurations for adjustment or optimization. The technician can start troubleshooting from viewing the active settings, then running the rstrui to start the System Restore utility to restore the computer to an earlier date

6 0
3 years ago
The limit for characters in modern file systems is too small to accommodate keywords in titles
Nata [24]
The limit for file names on modern file systems is usually at least 255 bytes.
3 0
3 years ago
Read 2 more answers
What best describes the purpose of occupational safety and health Administration
IRISSAK [1]

Under the Occupational Safety and Health Act of 1970, employers are responsible for providing safe and healthful workplaces for their employees. OSHA's role is to help ensure these conditions for America's working men and women by setting and enforcing standards, and providing training, education and assistance.

5 0
3 years ago
Read 2 more answers
Other questions:
  • In this type of network, data is certain to reach its destination.
    7·1 answer
  • If you are upgrading your operating system to Windows 7, you may not use the In-Place Upgrade Installation Option with
    14·1 answer
  • What does utp stand for?
    11·2 answers
  • What type of malicious procedure involves using sniffing tools to capture network communications to intercept confidential infor
    7·1 answer
  • Create html code showing heading tags​
    6·1 answer
  • Why was it important for the date format to be standardized by the
    7·1 answer
  • David is taking a test. To answer a question, he first covers up the answer choices. Next, he tries to answer the question. Then
    15·2 answers
  • Which of these is installed only on Apple smartphones and tablets?
    5·2 answers
  • How can I hide my cracked phone screen? or How can I fix it myself without my parent finding out? or How can I fix my phone with
    14·1 answer
  • An entity is said to be _____-dependent if it can exist in the database only when it is associated with another related entity o
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!