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
max2010maxim [7]
3 years ago
11

Code a Boolean expression that tests if a decimal variable named currentSales is greater than or equal to 1000 or a Boolean vari

able named newCustomer is equal to true. Code this statement so both conditions will always be tested, and code it in the shortest way possible.
Computers and Technology
1 answer:
inysia [295]3 years ago
3 0

Answer:

public class ANot {

   public static void main(String[] args) {

   //Scanner in = new Scanner (System.in);

   boolean newCustomer = true;

   double currentSales =1000;

   if (newCustomer||(currentSales>=1000)){

       System.out.println("New Customer is true and current sales is greater or equal to 1000");

   }

   }

Explanation:

  1. The code is given in Java progamming language
  2. Create and initialize the variables (Boolean and double) as required by the question
  3. Use the if statement with the OR operator (||) to test both condition
You might be interested in
Mikaya works in the planning department
Sonja [21]

Answer:

I don't understand need more information mate.

Explanation:

5 0
3 years ago
Read 2 more answers
______ includes websites that encourage interaction and connection among people, businesses, and organizations.
Mice21 [21]
That answer would be, (B) Search Engines
6 0
3 years ago
What are the preset formulas in a spreadsheet called?
Oksanka [162]
They are called functions on a spreadsheet.
5 0
4 years ago
Read 2 more answers
def getCharacterForward(char, key): """ Given a character char, and an integer key, the function shifts char forward `key` steps
zhenek [66]

Answer:

  1. def getCharacterForward(char, key):  
  2.    charList = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  3.    if(len(char) > 1):
  4.        return None  
  5.    elif(not isinstance(key, int)):
  6.        return -1
  7.    else:
  8.        index = charList.find(char)
  9.        if(index + key <= 25):
  10.            return charList[index + key]
  11.        else:
  12.            return charList[(index + key)% 26]
  13. print(getCharacterForward("C", 4))
  14. print(getCharacterForward("X", 4))

Explanation:

Firstly, define a charList that includes all uppercase alphabets (Line 2). We presume this program will only handle uppercase characters.

Follow the question requirement and define necessary input validation such as checking if the char is a single character (Line 4). We can do the validation by checking if the length of the char is more than 1, if so, this is not a single character and should return None (Line 5). Next, validate the key by using isinstance function to see if this is an integer. If this is not an integer return -1 (Line 6 - 7).

Otherwise, the program will proceed to find the index of char in the charList using find method (Line 9). Next, we can add the key to index and use the result value to get forwarded character from the charList and return it as output (Line 11).

However, we need to deal a situation that the char is found at close end of the charList and the forward key steps will be out of range of alphabet list. For example the char is X and the key is 4, the four steps forward will result in out of range error. To handle this situation, we can move the last two forward steps from the starting point of the charList. So X move forward 4 will become B. We can implement this logic by having index + key modulus by 26 (Line 13).  

We can test the function will passing two sample set of arguments (Line 15 - 16) and we shall get the output as follows:

G

B

8 0
3 years ago
PLEASE ILL MARK BRAINLIEST
Minchanka [31]

Answer:

it is a capsid

5 0
3 years ago
Other questions:
  • 2. Which of the following fonts is most legible for a block of text? What font size and color would you choose if you were writi
    11·2 answers
  • What are the advantages of Napier bones?​
    15·1 answer
  • ENG103 DISCUSSION BOARD 5
    12·1 answer
  • Dave wants to host a website and he needs an operating system that is free of cost. Which operating system should he use?
    11·1 answer
  • When designing a user interface, you can choose between the _______ or ______ layout Group of answer choices
    6·1 answer
  • Recent advances in information technologies (IT) have powered the merger of online and offline retail channels into one single p
    10·1 answer
  • What is an example of using the Internet of Things (IoT) to deliver innovative Cloud-based solutions to customers?
    14·1 answer
  • Is it possible to construct a wait-free n-thread PeekableStack(2) object from an arbitrary number of atomic Stack objects and at
    11·1 answer
  • What is the difference between a crosstab query and a subquery?
    11·2 answers
  • write a recursive function that accepts an integer argument, n. the function should display n lines of asterisks on the screen,
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!