answer.
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
Nutka1998
2 days ago
6

PLEASE HELP PROGRAMMING WILL GIVE BRAINLIEST

Computers and Technology
1 answer:
maria [879]2 days ago
5 0
The fourth option is the correct answer.
You might be interested in
(Java) Which of the following code segments correctly declare a Strings and gives it a value of "fortran".
maria [879]

Response:

IT F

Clarification:

8 0
1 month ago
To encourage good grades, Hermosa High School has decided to award each student a bookstore credit that is 10 times the student’
amid [800]

Answer:

// here's the Java code.

import java.util.*;

// definition of the class

class BookstoreCredit

{

/* method that prints a message including the name and grade point */

   public static void fun(String name,double grade)

   {

// multiplying grade by 10

       grade=grade*10;

// display the message

       System.out.println(name+"\'s average grade is $"+grade);

   }

// main method for the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // scanner instance to read input

       Scanner s=new Scanner(System.in);

        // declaring variables

      String s_name;

      double grade;

      System.out.print("Please enter the name:");

      s_name=s.nextLine();

      System.out.print("Please enter the grade point:");

      grade=s.nextDouble();

   }catch(Exception ex){

       return;}

}

}

Explanation:

Define a string variable named s_name and a double variable named grade. Obtain the name and grade from the user, then invoke the fun() method with these parameters, which will multiply the grade by 10 and output a message that includes the student's name along with their average grade.

Output:

Please enter the name:john

Please enter the grade point:3.2

john's average grade is $32.0

7 0
18 days ago
Need 2.5 Code Practice Answers
Natasha_Volkova [890]

Answer:

import random

random.seed(1,10) # Note: seed takes one argument, so this line has an error

a = random.randint(1, 10)

b = random.randint(1, 10)

print("Calculate: " + str(a) + " X " + str(b) + "?")

ans = int(input("Your answer: "))

if ans == a * b:

print("Well done!")

else:

print("That's wrong!")

Explanation:

4 1
1 month ago
Read 2 more answers
The is_positive function should return True if the number received is positive, otherwise it returns None. Can you fill in the g
zubka84 [936]

Question:

The function is_positive should yield True if the supplied number is positive; otherwise, it gives None. Can you fill in the blanks accordingly?

def is_positive(number):

       if  _____ :

           return _____

Answer:

def is_positive(number):

   if (number > 0):

       return True

  else:

       return "None"

---------------------------------------------------------------------------------

Code Test and Sample Output:

print(is_positive(6))

>> True

print(is_positive(-7))

>> None

----------------------------------------------------------------------------------

Explanation:

This segment of code is composed in Python.

To explain it further, let's break down the content of each line;

Line 1: Creates a function identified as is_positive which takes in a variable number.i.e

def is_positive(number):

Line 2: Evaluates if the given number is positive; a number qualifies as positive if it exceeds zero. i.e

if (number > 0):

Line 3: Produces a boolean result of True when the input number is positive. i.e

return True

Line 4: Initiates the else block to be executed in case the input number isn’t positive. i.e

else:

Line 5: Returns the string "None" when the number is not positive. i.e

return "None"

When combined, this results in;

===============================

def is_positive(number):

   if (number > 0):

       return True

   else:

       return "None"

================================

An instance test for the code provided an argument of 6 and -7, resulting in True and None respectively. i.e

print(is_positive(6))   = True

print(is_positive(-7))  = None

8 1
1 month ago
Read 2 more answers
Assume the int variables i,lo, hi, and result have been declared and that lo and hi have been initialized. Assume further that r
zubka84 [936]

Answer:

#include <iostream>

using namespace std;

int main() {

   int i, lo=12, hi=45, result=0; // initializing the required variables..

   for(i=lo;i<=hi;i++) // implementing a for loop.

   {

       result+=i; // accumulating the sum of integers..

   }

   cout<<result<<endl; // displaying the resulting total.

return 0;

}

Output:-

969

Explanation:

This program is written in C++. Initially, the variables i, lo, hi, and result are declared, with only lo, hi, and result initialized. A for loop is employed to loop through all values from lo to hi, adding each integer to the result.

5 0
1 month ago
Other questions:
  • In the middle of the iteration, how should a team handle requirement changes from the customer? (1 correct answer)
    7·2 answers
  • Suppose that a scheduling algorithm (at the level of short-term CPU scheduling) favors those processes that have used the least
    10·1 answer
  • Write the definition of a function power_to, which receives two parameters. The first is a float and the second is an integer. T
    5·1 answer
  • Sophie often makes grammatical errors in her document. Which feature of the Spelling and Grammar tool can she use to understand
    15·2 answers
  • Factoring of integers. Write a python program that asks the user for an integer and then prints out all its factors. For example
    13·1 answer
  • Any software or program that comes in many forms and is designed to disrupt the normal operation of a computer by allowing an un
    13·1 answer
  • A 2-dimensional 3x3 array of ints, has been created and assigned to tictactoe. Write an expression whose value is true if the el
    10·1 answer
  • As part of the duties of a digital forensics examiner, creating an investigation plan is a standard practice. Write a 3 to 4 (no
    9·1 answer
  • According to the book, if your CPU usage levels are greater than ________ during most of your work session, a faster CPU can gre
    6·1 answer
  • Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus the person's age. Complete fat_burn
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!