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

Write a while loop that prints userNum divided by 2 (integer division) until reaching 1. Follow each number by a space.

Computers and Technology
1 answer:
Ksenya-84 [330]3 years ago
3 0

Answer:

   while(userNum>=1){

       System.out.print(userNum/2+" ");

       userNum--;

        }

Explanation:

This is implemented in Java programming language. Below is a complete code which prompts a user for the number, receives and stores this number in the variable userNum.

<em>import java.util.Scanner;</em>

<em>public class TestClock {</em>

<em>    public static void main(String[] args) {</em>

<em>    Scanner in = new Scanner (System.in);</em>

<em>        System.out.println("Enter the number");</em>

<em>    int userNum = in.nextInt();</em>

<em>    while(userNum>=1){</em>

<em>        System.out.print(userNum/2+" ");</em>

<em>        userNum--;</em>

<em>         }</em>

<em>    }</em>

<em>}</em>

The condition for the while statement is userNum>=1 and after each iteration we subtract 1 from the value of   userNum until reaching 1 (Hence userNum>=1)

You might be interested in
Which of the following statements is correct?
vaieri [72.5K]

Answer:

A

Explanation:

I think is A. or maybe search up the topic of the lesson

7 0
4 years ago
Identify two different uses/applications of data in which biases in word embeddings might cause significant ethical harms, then
olchik [2.2K]

The two different uses or applications of data that is biases in word embeddings and may cause significant ethical harms are:

  • Class immobility
  • Systemic racism

<h3>What are the biases in word embedding?</h3>

Word embeddings is known to be made up of a high level bias such as group stereotypes and prejudice.

The two different uses or applications of data that is biases in word embeddings and may cause significant ethical harms are:

Class immobility
  • Systemic racism

Learn more about biases from

brainly.com/question/24491228

#SPJ1

4 0
2 years ago
How to understand why driving is considered a privilege?
Mnenie [13.5K]
Driving is considered a privilege because you have to be a certain age to start driving and be able to drive by yourself legally. Driving can be dangerous if you are not a safe driver and if you do illegal things while behind the wheel. Driving is also a privilege because you have to be responsible when driving, because the people that are around you or with you, their lives are in your hands.

Your answer is: You need to carry the responsibility of being safe and not harming yourself or others. 

Have an amazing day!
3 0
3 years ago
Describe some of the moral, ethical, and legal issues surrounding responsible use of technology (and the information obtained th
rosijanka [135]

Answer:

Technology must be used in the right manner, and for the right purposes. When the latest in image processing is used to find a new planet through machine learning, we are right. However, when we kill somebody with a gun, we are not right. The bullet can be directed to legs rather than heart, and with continuous love and affection, any heart can be won. Sometimes this is allowed legally, Also it can be ethically correct as some institutions might allow it ethically, and it can be for some morally right as well. However, still, this is not right for some, and that is the almighty. And it's hard to match him morally or ethically. And for him nothing wrong is legal. Coming back to the use of technology in the workplace, you will find that you must follow the ethics of that institution, and your moral value must always be subsidiary to their ethics. And in the 21st century, and particularly in developed domains you will never be asked to sacrifice your moral value, and by the end of next quarter, this might be true for the whole world. Hence, ethics and moral values by then can in all cases be used interchangeably, However, when it comes to being legal, your institution will let you know all the laws, and you need to follow them, and these are applicable to all the institutions, and hence you need not require to sacrifice anything for being legal. Always remember that in the 21st century, you might see some very lethal technologies, and your job in the workplace is to study those technologies with your fullest potential. Issues will arise if you do not work with your fullest potential. And if you will, your moral value will be respected, and you will be easily able to obey their ethics, as no company ever think about even a little bad for their employees. And legally even the director is required to be correct just like you. And what is legal is being decided by the court and not any company. Hence, always try to work with your fullest potential, and never think to harm anybody, or your company. If you do this, you will be the hero of your company very soon.

Explanation:

And remember, the information that you get to know in your company is confidential, and you should not leak it to anybody, and even your relatives. Always keep them hidden inside you, and never ever try to leak them.

3 0
3 years ago
Assuming the user enters integers, how many times will the following program print hi x = int(input()) y = int(input()) if x &gt
raketka [301]

Answer:

It prints "hi" only one time.

Explanation:

It will print the result depending on the if statements. If you look at the if statements, you will see that no matter you enter it is going to be either true for the first if statement or for the second if statement.

Let's say you entered 1 for x and 0 for y, first if statement will print hi, but the second one will not print because x is not smaller or greater than 0.

Let's say you entered 0 for x and 6 for y, second if statement will print hi, but the first one will not print because x is not greater than 0.

3 0
3 years ago
Other questions:
  • Assume that an int variable age has been given a value. Assume further that the user has just been presented with the following
    14·1 answer
  • A digital footprint is all of the information on-line about a person posted by that person or others, ____________. intentionall
    14·1 answer
  • Which data type is most suitable for a password field
    12·1 answer
  • Why did Hunter gatherers moved into the<br>America's?​
    8·1 answer
  • When working with arrays, most programming languages perform ________, which means they do not allow programs to use invalid sub
    5·1 answer
  • What is a function of Agile software development?<br>​
    7·1 answer
  • Viruses which activate themselves after a specific time is called
    10·2 answers
  • Complete the steps for adding a recurring event.
    10·1 answer
  • What feature is available to add a auggestion in the margin of someone else's document.
    11·1 answer
  • What is pseudocode? O A way of describing a set of instructions in text form using plain english O A diagrammatic representation
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!