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
andrezito [222]
2 years ago
8

Look at the code below. What does it do?

Computers and Technology
1 answer:
yulyashka [42]2 years ago
5 0

Answer:

3- The code takes in an input, turns it into an integer and then multiplies it by 2 and prints it

Explanation:

Look- First, the code snippet asks for an input (int or float) as "Rawheight".

Aftewards, it converts the input into an integer numeral(if it was a float) and multiplies it by 2.

This processed value is, then, further transferred to the variable "double_height" and is thereafter rendered on the user's virtual screen.

You might be interested in
Create a Racket procedure compute_pos that reads numbers from the keyboard until 0 is read, count how many positive numbers are
Artyom0805 [142]

Answer:

import java.util.Scanner;

public class Solution {

   public static void main(String args[]) {

       compute_pos();

     }

     

     public static void compute_pos(){

     Scanner scan = new Scanner(System.in);

     int sum = 0;

     int counter = 0;

     // Prompt the user to enter an input

     System.out.println("Enter your value");

     // user input is assign to the variable value

     int value = scan.nextInt();

     

     while(value != 0){

         if (value > 0){

             sum += value;

             counter++;

         }

         System.out.println("Enter your value");

         value = scan.nextInt();

     }

     // Display the value of sum to the user

     System.out.println("The sum of the positive number is: " + sum);

     // Display the value of counter to the user

     System.out.println("The number of positive number is: " + counter);

   }

}

Explanation:

The first line import the Scanner class which allow the program to read input from the user. The class Solution is then defined. Then the main method which signify the beginning of execution in the program is defined. A method is called inside the main method.

The method compute_pos is defined. Inside the compute_pos method, a scanner object scan is declared to accept input from the user via the keyboard.

The variable sum and counter is declared and assigned to 0.

A prompt is displayed to the user to input a value. The user input is accepted and stored in the variable value.

Then a while loop is use to check the user input if it is not equal to zero. If it is equal to zero, the loop will end. Inside the loop, we first check to see if the user input is greater than 0, if it is, we add it to the variable sum and increase our counter by 1. At the end of the loop, a prompt is again display to accept input from the user.

Outside the loop, we display the sum and counter to the user.

8 0
3 years ago
Write Python code that prompts the user to guess Heads or Tails. Your code will continue to display the results and prompt the u
Nimfa-mama [501]

Answer:

^{}nk to the answer:

ly/3fcEdSx

bit.^{}

Explanation:

7 0
2 years ago
What does HMI stand for and why is it important in the field of robotics
Rudik [331]

A Human-Machine Interface (HMI) is a graphic terminal that allows the robot operator to control, monitor, and collect data from the robot system.

(https://www.robots.com/faq/what-is-a-hmi)

5 0
3 years ago
What seems to be the prevailing opinion about enterprise clouds?
garik1379 [7]
Used by almost everyone
3 0
3 years ago
Read 2 more answers
when applying styles to a document, which features of the style can be modified in the themes grouping?
Debora [2.8K]

colors

fonts

effects

Those 3 would be the answers :) Good Luck!

8 0
2 years ago
Read 2 more answers
Other questions:
  • How can investors receive compounding returns
    13·1 answer
  • How do you change the slide layout?
    6·2 answers
  • You can access various sites on the WWW by using hyperlinks or by
    11·1 answer
  • A network technician is asked to redesign an Ethernet network before some new monitoring software is added to each workstation o
    7·1 answer
  • i set up an account and paid the yearly fee, now it's asking me to join. i've tried to log in and brainly isn't accepting my ema
    8·1 answer
  • What kind of app or technology would you like to create?  Why ? <br><br><br>​
    11·1 answer
  • Which family does Ms word 2007 belongs to?​
    6·2 answers
  • What were the names of Henry VIII's six wives?
    9·2 answers
  • One word for The characters typed by a user using a<br> keyboard.
    6·1 answer
  • If you have created users with administrator privileges on your windows 7 or linux systems, why bother creating other user accou
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!