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
2. Voltage is:
jenyasd209 [6]
A. The force that moves electrons
6 0
3 years ago
Which of the following is an OOP principle that is represented by putting medicine inside a pill capsule to make it easier to sw
Oksanka [162]

Answer:

4.encapsulation

3 0
2 years ago
Mối quan hệ giữa đối tượng và lớp
Andreas93 [3]

Answer:

please write in english i cannot understand

Explanation:

8 0
3 years ago
An online article in 2001 described a study in which twelve sixth-grade students who had not previously played chess participate
ipn [44]
Bdbxhdhdhdbxbdhdhxhxhdhdhdhdhdhdhdhdhdbdhdhdhdhdhdhrhrhrhrhrhdhdhdhdisisieiejjdidieieieieieiei
6 0
3 years ago
Write a function called rotateRight that takes a String as its first argument and a positive int as its second argument and rota
elena-s [515]

Answer:

The function in Python is as follows:

def rotateRight(strng, d):

   lent = len(strng)

   retString = strng[lent - d : ] + strng[0 : lent - d]

   return retString

Explanation:

This defines the function

def rotateRight(strng, d):

This calculates the length of the string

   lent = len(strng)

This calculates the return string

   retString = strng[lent - d : ] + strng[0 : lent - d]

This returns the return string

   return retString

Addition:

The return string is calculated as thus:

This string is split from the <em>index passed to the function to the last element of the string, i.e. from dth to last.</em>

<em>The split string is then concatenated to the beginning of the remaining string</em>

3 0
3 years ago
Other questions:
  • An LPN/LVN has transferred to a nursing unit and arrives for the first day. The RN checks with the LPN/LVN often throughout the
    11·1 answer
  • Software that people commonly use in the workplace to make their lives easier is called?
    6·1 answer
  • Software designed specifically for managing real estate is an example of ________ software. Select one: A. e-commerce B. vertica
    7·1 answer
  • When Nathanil Inc, a network service provider, introduced 4G data plans, it observed that most of its customers completely stopp
    9·1 answer
  • Ellen has eggs she wishes to trade for grain. However, she cannot find anyone with grain that needs eggs. What is missing for th
    14·1 answer
  • g Statistics are often calculated with varying amounts of input data. Write a program that takes any number of non-negative inte
    12·1 answer
  • Which statement assigns the value 98 to the variable myScore in Python?
    14·2 answers
  • Raj needs to apply sorting to a current list in his Word document.
    9·2 answers
  • 2. Sherry bought the following articles
    7·1 answer
  • Philip took pictures with his smartphone and save them into his computer unless you delete the photos from the computer they wil
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!