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
KiRa [710]
4 years ago
13

Write a conditional expression that assign the value 0 to a credits variable if it is less than 0; otherwise the value of the cr

edits variable remains unchanged.
Computers and Technology
2 answers:
Svetach [21]4 years ago
6 0

Answer:

credits = (credits < 0) ? 0 : credits;

Explanation:

This is the ternary conditional operator.

grin007 [14]4 years ago
3 0

Answer:

void updateCredit(float credit){

if credit < 0.0

credit = 0.0;

}

Explanation:

I am going to write a C function for this.

The input is your credit value, and it has just a conditional to verify if it is not negative.

void updateCredit(float credit){

if credit < 0.0

credit = 0.0;

}

You might be interested in
_______ imaging technology defines locations in the brain where neurons are especially active using safe radioactive isotopes to
Radda [10]

Answer:

Positron Emission Tomography (PET)

Explanation:

4 0
3 years ago
Read 2 more answers
import java.util.ArrayList; // Needed for ArrayList class /** This program demonstrates how to store BankAccount objects in an A
slega [8]

Answer:

import java.util.ArrayList; // Needed for ArrayList class

/** This program demonstrates how to store BankAccount objects in an ArrayList. */

// Class ArrayListDemo6 is defined

public class ArrayListDemo6 {

// main method that begin program execution

public static void main(String[] args) {

// Create an ArrayList to hold BankAccount objects.

// The arraylist is called list

ArrayList list = new ArrayList();

// Add three BankAccount objects to the ArrayList.

list.add(new bankAccount(100.0)); list.add(new bankAccount(500.0)); list.add(new bankAccount(1500.0)); // Display each item using a for loop

for (int index = 0; index < array.size(); index++)

{ BankAccount account = list.get(index);

System.out.println("Account at index " + index + "\nBalance: " + account.getBalance());

}

}

}

Explanation:

The code is written in Java and more comments has been added to make it more explanatory.

The code snippet is a demonstration on Arraylist.

First Arraylist is imported. Then, ArrayListDemo6 class is defined. Then the main method which begin program execution.

Inside the main method, a new Arraylist is created called list.

Then we add three BankAccount object to the list.

Lastly, we use a for loop to display each added BankAccount object.

7 0
3 years ago
Which sentences describe the use of web development tools?
Volgvan
1 and 4 are both true, Although it looks like  1. being your correct answer.
5 0
4 years ago
Consider the following code: x = int(input("Input an integer: ")) if (x &gt;= 0): print("Yay!") else: print("Boo!") It outputs "
Fed [463]
<h2>You have to apply the given condition in if loop.</h2>

Explanation:

if((x>=0) && (x%2==0))  

print("Yay!")

else

print("Boo!")

if((x>=0) && (x%2==0))  this statement is enough to check given expectation. the value of x is positive that is checked using  x>=0 and also the positive integer should be an even number is checked using the condition (x%2==0). The "&&" operator is used to check whether both the condition is true. So if the value of "x" is positive and even, "Yah!" will be printed. Otherwise "Boo!" will be printed.

All the other choice goes invalid becoz (x%2==1) will be true only if the number is an odd number.

7 0
3 years ago
Cultural differences may make it difficult for team members to _____. Select 4 options.
ludmilkaskok [199]

Answer:

A) collaborate with each other

C) achieve business objectives

D) understand each other

E) resolve conflict and problems

Explanation:

Well lets use the process of elimination. If there are cultural differences then there are different cultures involved. So B doesn't work because it's multicultural when there is different cultures. And you need 4 answers out of 5, so all you need to do is eliminate one answer.

Good Luck! You got this!

6 0
3 years ago
Other questions:
  • which type of website would a business selling merchandise on the internet use? A person B information C commercial D social
    9·1 answer
  • According to many experts how often should files be backed up
    12·2 answers
  • MULTIPLE CHOICE!!!
    5·2 answers
  • SHOW ALL YOUR WORK. REMEMBER THAT PROGRAM SEGMENTS ARE TO BE WRITTEN IN JAVA.
    13·1 answer
  • (Bible)<br> Sin may be an inward thought or an outward act. True False
    11·2 answers
  • Analyzing the role of elements in audio editing and Video
    7·1 answer
  • B) Describe the computer processing that is required to maintain the correct growing<br>conditions.​
    13·1 answer
  • NEXT
    15·2 answers
  • Create a function called sphereVolume that determines the volume of a sphere with a given radius and prints the result to the sc
    9·1 answer
  • What are two drawbacks of using netbook ? (Choose two)
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!