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
polet [3.4K]
2 years ago
7

A lamp outside a front door comes on automatically when it is dark, and when someone stands on the doormat outside the front doo

r. A pressure sensor under the mat changes from OFF (0) to ON (1) when someone stands on the doormat. The light sensor is ON (1) when it is light and OFF (0) when it is dark. Design a program to show what would happen to the lamp. Account for all possible scenarios by determining whether the pressure sensor and light sensor are ON or OFF. (HINT: Ask the user "Is it dark?" and "Is someone standing on the doormat outside the front door?")

Computers and Technology
1 answer:
Lena [83]2 years ago
8 0

Answer:

See explaination

Explanation:

#include <iostream>

#include <string>

using namespace std;

int main()

{

string raptor_prompt_variable_zzyz;

?? standing;

?? dark;

raptor_prompt_variable_zzyz ="Is it dark?";

cout << raptor_prompt_variable_zzyz << endl;

cin >> DARK;

if (DARK=="Yes")

{

raptor_prompt_variable_zzyz ="Is someone standing on the doormat outside the front door?";

cout << raptor_prompt_variable_zzyz << endl;

cin >> STANDING;

if (STANDING=="Yes")

{

cout << "LAMP IS ON" << endl; }

else

{

cout << "LAMP IS OFF" << endl; }

}

else

{

cout << "LAMP IS OFF" << endl; }

return 0;

}

You might be interested in
Help! I’ll mark you brainly! Please help me.
nika2105 [10]

Answer:

11. There are four main alignments: left, right, center, and justified

12. Symmetrical balance occurs when equal weights are on equal sides of a composition, balanced around a fulcrum or axis in the center.

13.  Asymmetrical balance results from unequal visual weight on each side of the composition.

14. White space

15. Most modern TVs are 16:9, which causes letterboxing when viewing 21:9 content, and pillarboxing when viewing 4:3 content such as older films or TV broadcasts, unless the content is cropped or stretched to fill the entire display. The Napoléon (1927 film) was released in 4:1 aspect ratio.

16. ??? im sorry idk

17. The Rule of Thirds is the process of dividing an image into thirds, using two horizontal and two vertical lines.

Explanation:

4 0
2 years ago
Chemical reaction rates are proportional to a rate constant, k, which changes with temperature according to the Arrhenius equati
Vanyuwa [196]

Answer:

see answer below

Explanation:

the equation is given by

k=ko* e^(-Q/RT)

then replacing the known values

k=1200 min⁻¹ e^[-8000 cal/mole/ (1.987 cal/mole K *T)]

then replacing values of T every 50 K from 100 to 500 K we get the series of values

\left[\begin{array}{ccc}T&k\\100&3.924*10^{-15} min ^{-1} \\150&2.643*10^{-9} min ^{-1} \\200&2.17*10^{-6} min ^{-1} \\250&1.216*10^{-4} min ^{-1} \\300&1.781*10^{-3} min ^{-1} \\350&0.012 min ^{-1} \\400&0.051 min ^{-1} \\450&0.156 min ^{-1} \\500&0.382 min ^{-1} \end{array}\right]

7 0
2 years ago
NEED HELP ASAP
belka [17]

Answer:

Movie editing and Sound Editing

Explanation:

Gaming tool will not help edit video and audio that the production crew have shot. Media player will simply just play the video and not allow them to edit it. Animation tool isn't useful unless they plan on doing SFX.

8 0
3 years ago
Read 2 more answers
Which of the following is not a method for opening Word software?
neonofarm [45]

Answer:

right clicking on the desktop and clicking "view"

8 0
2 years ago
Read 2 more answers
Write a program to sort the (name, age, score) tuples by descending order where name is string, age and score are numbers. The s
zimovet [89]

Answer:

The program in Python is as follows:

from operator import itemgetter

m = int(input("Number of records: "))

print("Name, Age, Score")

my_list =[]

for i in range(m):

   user_details = input()

   my_list.append(tuple((user_details.split(","))))

my_list.sort(key =  itemgetter(0, 1, 2))        

print("Sorted: ", my_list)

Explanation:

This imports the operator function from itemgetter

from operator import itemgetter

This gets the number of records, m

m = int(input("Number of records: "))

This prints the format of input

print("Name, Age, Score")

This initializes the list of tuples

my_list =[]

This iterates through m

for i in range(m):

This gets the details of each person

   user_details = input()

This appends the details to the tuple

   my_list.append(tuple((user_details.split(","))))

This sorts the tuple

my_list.sort(key =  itemgetter(0, 1, 2))        

This prints the sorted tuple

print("Sorted: ", my_list)

6 0
2 years ago
Other questions:
  • At the beginning of this month, the balance of Reed's checking account was $692.35. So far this month, he has received a paychec
    13·2 answers
  • What should you do before cleaning the top of a storage battery and rinsing it with fresh water?
    12·1 answer
  • The main parts of a lever are the....
    6·2 answers
  • You have just changed the system time within your computer's BIOS. You choose to save the settings upon exit. What happens next
    14·2 answers
  • Is your florida learners license number the same as the actual license number?
    14·2 answers
  • Define stubs for the functions called by the below main(). Each stub should print "FIXME: Finish FunctionName()" followed by a n
    7·1 answer
  • "background" software that helps the computer manage its own internal resources is called ________.
    5·1 answer
  • Name three types of hard drives, along with its speed and size.
    8·1 answer
  • Cómo se transmite la voz en el sistema telefónico?
    12·1 answer
  • 9. Which of the following is considered an interface? (1 point)
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!