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
lapo4ka [179]
3 years ago
15

Write an if/else statement that compares the value of the variables soldYesterday and soldToday, and based upon that comparison

assigns salesTrend the value -1 or 1. -1 represents the case where soldYesterday is greater than soldToday; 1 represents the case where soldYesterday is not greater than soldToday.
Computers and Technology
1 answer:
jenyasd209 [6]3 years ago
7 0

Answer:

if(soldYesterday > soldToday){

salesTrend = -1;

} else if(soldToday > soldYesterday){

salesTrend = 1;

}

Explanation:

The if/else statement is more explicit. The first if condition check if soldYesterday is greater than soldToday, if true, then -1 is assigned to salesTrend.

Else if soldToday is greater than soldYesterday, if true, then 1 is assigned to salesTrend.

You might be interested in
When a signal travels across network medium, it signal loses strength the further it gets from the transmitting station, to the
neonofarm [45]

Answer:

Attenuation.

Explanation:

Attenuation means a gradual reduction in the strength of a signal as it moves from station to station which may even cause the receiving station to misinterpret the signal. Any signal can be attenuated - digital or analog.

Attenuation is often caused by weakness, fatigue or passiveness of networking cables and connectors. It could also be caused by noise and long distance.

To get around this, the network device(s) will often resend signals multiple times over just to ensure that at least one of the signals gets there and is interpreted correctly.

3 0
3 years ago
Sandy has an entry-level position in a graphic design company. She wants to learn more about the company and the skills she shou
Yakvenalex [24]
The answer should have been B, what was the answer?
8 0
2 years ago
Read 2 more answers
Mary is proofreading an eBook. Sometimes she has to scroll several pages at a time. Which key on the numeric keypad will help he
Leto [7]
The number key 2 will help her scroll down.
3 0
3 years ago
Read 2 more answers
Create a new method in your language called Times Print. This should be a void method. It should accept exactly two numeric valu
user100 [1]

Answer:

The code commented is given below, also the lines that start with # are comments that explains the code.

# Create a function named times_print that receives 2 values x and y

def times_print(x, y):

   # Print the formatted string

   print("The value of {} times {} is {}".format(x,y,x*y))

# Create the main function

def main():

   # Call the funciton times_print 3 times with different values

   times_print(2,3)

   times_print(4,5)

   times_print(5,6)

# Execute the main function

main()

Explanation:

The code was written using Python 3.5, and here I attach the screenshots of the program running:

8 0
3 years ago
Next, Adnan decides to recreate the structure on the
Lena [83]

Answer:

a square and a rectangle

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • Where is the insert function button found in microsoft excel?
    11·1 answer
  • is this website just for a bunch of lazy kids bumming off answers? Because if that were the case I'd be one of them.
    9·1 answer
  • Write a function max arguments. write a program that reads three floating-point numbers, uses the max function, and displays the
    5·1 answer
  • The source code of a java program is first compiled into an intermediate language called java ____, which are platform-independe
    8·1 answer
  • Peter has recently bought a media player and a digital camera he wants to buy a memory card and then use devices which memory do
    11·2 answers
  • Almost immediately after a server migration project, employees are complaining that they can't reach the Internet. You sit down
    8·1 answer
  • Calvin needs to design a simple yet professional interface for his users. Which option should he implement?
    9·2 answers
  • If you wanted to create a line of code that would add ten to the user’s current score, which code should you use?
    12·2 answers
  • There u go i did thereeeeeeeeeeeeeeeeeeeeeee
    13·2 answers
  • What are the four major software packages of microsoft​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!