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

define a function named quarter_num that has one parameter number and return quarter of the number. For example: if we called th

e function quarter_num(10) then, the function should return 2.5
Computers and Technology
1 answer:
IgorLugansk [536]3 years ago
3 0
Idk what programming language you use so

private int quarter_num(int num) {
return num / 4;
}
You might be interested in
The refresh or reload button is in the browser toolbar and usually looks like a pair of curved arrows. Clicking it will ________
docker41 [41]

Your answer would be

D. Restart the downloading process

5 0
4 years ago
Read 2 more answers
Boolean expressions are named after ____
zhuklara [117]
British mathematician George Boole
7 0
3 years ago
How is a computer component, such as a network card, commonly marked for identification?
JulsSmile [24]
It usually is marked either with a sticker or sometimes with a stenciled mark like something.
a network card is a device which usually connects a computer to a network (LAN). A computer has two categories which make it a computer:
Hardware
Software
A network Card is from the Hardware part of the computer.  
4 0
4 years ago
How to add if an statemement on a retrun in react js.
miv72 [106K]

Answer:

Of course, if we think about if statement in Javascript or Typescript logic, it’s the same as in every Javascript or Typescript place.

It’s just if/else like pure javascript, but in this case, we won’t talk about the normal if/else.

In react, we’ll need if statements for the one more thing, it’s the rendering.

It’s named “Conditional rendering”, but to make it simple, let’s stay with “if statement in react”.

There are the two most popular ways to use conditional rendering that we’ll see in the React.js code, and depends on a case, both of them are correct.

The first way that we can use is to define the conditional rendering directly in the components layout.

It’s quick and easy that we’ll use the most, and in some cases, it is the best for performance.

We’ll be using this way in the cases when we have only one condition, more just as “if”, when we would like to render some element when a specified condition is passed.

The second way is the function created to handle specified parts of the layout, and render it conditionally, to do that we can use not only if/else but the switch case as well.

This one way is right to use in cases where we have more conditions, especially the version with switch one.

But it fires the function anyway, so it is no sense to use it when we have one condition.

Let’s take a look at the code examples where I added both ways of doing that:

// The first example with the code inside functional component

function Parent(props) {

 return(

   <>

     {name === "Duomly" && (

       <DuomlyComponent/>  

     )}

   </>

 )

}

// The second example with the additional function

function renderComponent() {

 const name = 'Duomly';

 if (name === 'Duomly') {

   return 'Duomly';

 } else {

   return null;

 }

}

function Parent(props) {

 return renderComponent();

}

Explanation:

3 0
3 years ago
What do these terms have in common? google, yahoo!, bing they are important books. they are internet search engines. they are wo
Vlada [557]
They are Internet search engines.
7 0
4 years ago
Other questions:
  • Web and mobile applications are created for users to only read information. True False
    15·2 answers
  • Which feature of a presentation program’s interface provides a list of commands to create, format, and edit presentations?
    14·2 answers
  • What helps companies and organizations to target masses of people, provide 24/7 services, and deliver better marketing in a chea
    6·1 answer
  • Why do we say that IP provides ""best-effort"" service?
    11·1 answer
  • C. Explain the given term in short:<br>a. Computer Ethics​
    14·2 answers
  • Marly is using her smartphone to review a webpage she created. The formatting and alignment of webpage elements is incorrect. Wh
    7·1 answer
  • Question 1 of 10 Which type of information systems personnel are involved in organizing information so that users can access it
    7·1 answer
  • Consider the following method:
    9·1 answer
  • According to the selection, speech-software developers are still striving to develop speech-recognition technology that —
    5·1 answer
  • What are the nuclear codes?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!