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

PLZZZ HELP!!!

Computers and Technology
1 answer:
kifflom [539]3 years ago
3 0

Answer:

D the answer is D or c one of those 2

You might be interested in
Write a java program that accepts the ingredients for a recipe in cups and converts to ounces
Tanzania [10]

Answer:

Explanation:

public static int cupsToOunces (int cups) {

   

       int ounces = cups * 8;

       return ounces;

       

   }

This is a very simple Java method that takes in the number of cups in the recipe as a parameter, converts it to ounces, and then returns the number of ounces. It is very simple since 1 cup is equal to 8 ounces, therefore it simply takes the cups and multiplies it by 8 and saves that value in an int variable called ounces.

6 0
3 years ago
What is a spreadsheet​
Delicious77 [7]
A spreadsheet function that indicates the average of a group of numbers in a range.
8 0
2 years ago
Write a Java class to perform the following: 1. Write a method to search the following array using a linear search, ( target ele
Alina [70]

Answer:

Check the explanation

Explanation:

Linear search in JAVA:-

import java.util.Scanner;

class linearsearch

{

  public static void main(String args[])

  {

     int count, number, item, arr[];

     

     Scanner console = new Scanner(System.in);

     System.out.println("Enter numbers:");

     number = console.nextInt();

   

     arr = new int[number];

     System.out.println("Enter " + number + " ");

     

     for (count = 0; count < number; count++)

       arr[count] = console.nextInt();

     System.out.println("Enter search value:");

     item = console.nextInt();

     for (count = 0; count < number; count++)

     {

        if (arr[count] == item)

        {

          System.out.println(item+" present at "+(count+1));

         

          break;

        }

     }

     if (count == number)

       System.out.println(item + " doesn't found in array.");

  }

}

Kindly check the first attached image below for the code output.

Selection Sort in JAVA:-

public class selectionsort {

   public static void selectionsort(int[] array){

       for (int i = 0; i < array.length - 1; i++)

       {

           int ind = i;

           for (int j = i + 1; j < array.length; j++){

               if (array[j] < array[ind]){

                   ind = j;

               }

           }

           int smaller_number = array[ind];  

           array[ind] = array[i];

           array[i] = smaller_number;

       }

   }

     

   public static void main(String a[]){

       int[] arr = {9,94,4,2,43,18,32,12};

       System.out.println("Before Selection Sort");

       for(int i:arr){

           System.out.print(i+" ");

       }

       System.out.println();

         

       selectionsort(arr);

       

       System.out.println("After Selection Sort");

       for(int i:arr){

           System.out.print(i+" ");

       }

   }

}  

Kindly check the second attached image below for the code output.

Bubble Sort in JAVA:-

public class bubblesort {

   static void bubblesort(int[] array) {

       int num = array.length;

       int temp = 0;

        for(int i=0; i < num; i++){

                for(int j=1; j < (num-i); j++){

                         if(array[j-1] > array[j]){

                           

                                temp = array[j-1];

                                array[j-1] = array[j];

                                array[j] = temp;

                        }

                         

                }

        }

   }

   public static void main(String[] args) {

               int arr1[] ={3333,60,25,32,55,620,85};

               

               System.out.println("Before Bubble Sort");

               for(int i=0; i < arr1.length; i++){

                       System.out.print(arr1[i] + " ");

               }

               System.out.println();

                 

               bubblesort(arr1);

               

               System.out.println("After Bubble Sort");

               for(int i=0; i < arr1.length; i++){

                       System.out.print(arr1[i] + " ");

               }

 

       }

}  

Kindly check the third attached image below for the code output.

Binary search in JAVA:-

public class binarysearch {

  public int binarySearch(int[] array, int x) {

     return binarySearch(array, x, 0, array.length - 1);

  }

  private int binarySearch(int[ ] arr, int x,

        int lw, int hg) {

     if (lw > hg) return -1;

     int middle = (lw + hg)/2;

     if (arr[middle] == x) return middle;

     else if (arr[middle] < x)

        return binarySearch(arr, x, middle+1, hg);

     else

        return binarySearch(arr, x, lw, middle-1);

  }

  public static void main(String[] args) {

     binarysearch obj = new binarysearch();

     int[] ar =

       { 22, 18,12,14,36,59,74,98,41,23,

        34,50,45,49,31,53,74,56,57,80,

        61,68,37,12,58,79,904,56,99};

     for (int i = 0; i < ar.length; i++)

        System.out.print(obj.binarySearch(ar,

           ar[i]) + " ");

     System.out.println();

     System.out.print(obj.binarySearch(ar,19) +" ");

     System.out.print(obj.binarySearch(ar,25)+" ");

     System.out.print(obj.binarySearch(ar,82)+" ");

     System.out.print(obj.binarySearch(ar,19)+" ");

     System.out.println();

  }

}

Kindly check the fourth attached image below for the code output

7 0
2 years ago
What is the most important trait of the first pilot project in the AI Transformation Playbook?
MissTica

Answer:

Succeed and show traction within 6-10 months.

Explanation:

Ai (Artificial Inteliigence), also known as machine intelligence, is a branch of computer science that is specialized in making smart machines that are capable of doing human tasks

AI Transformation Playbook is a guide to use AI in enterprises successfully, written by Co-founder of Google Brain, Andrew Ng. In his guide, he unveiled the steps that can be followed to successfully installing AI in enterprises, companies, etc.

The most important trait of the first pilot projects is that it succeeds and begins to show traction within 6-10 months.

In his guide, he summarised five steps to install AI in enterprises. The first step is to 'Execute pilot projects to gain  momentum.'

The most important trait of beginning with AI projects is that it succeeds first before being most valuable projects. The success is important as it will help to achieve familiarity and will help other people of the company to invest in this project more.

This success begins to show tractions within 6-12 months of its success.

8 0
3 years ago
This program is to compute and write to a file the GPA for student scores read from an input file. The point values of the grade
VARVARA [1.3K]

Answer:

#Take input from the user

filename=input('Enter name of input file: ')

total_units=0#Total number of units for a student

total_score=0#Total score of a student

#Assign a score to each grade. I have reduced 0.33 for each grade. Change here if you need to

grade={'A':4.0,'A-':3.67,'B+':3.34,'B':3.01,'B-':2.68,'C+':2.35,'C':2.02,'C-':1.69,'D+':1.36,'D':1.03}

try:

with open(filename,"r") as input_file:#Open the file for input(reading)

output_file=open("GPA_output.txt","w") #Create and open GPA_output.txt if it doesn't exist for writing

for student_record in input_file:#read from input file

if("," in student_record):#if there is a , that means this is the student name

student_name=student_record.strip('\n')#Remove \n from student name

continue

else:

if(" " in student_record):#If a line contains spaces then its the student's grades for a course

student=student_record.split(" ")#Split to find the coursename, units and grade

#student[0]=coursename student[1]=units student[2]=grade

total_units+=int(student[1])#Calculate total units for 1 student

total_score+=int(student[1])*grade[student[2].strip('\n')]#Find the total score of a student

#grade[student[2]] will lookup for the score that we initialized earlier

#if student has a grade as A then this will look up as grade['A'] which will return 4

#Find the total score as product of this grade and units for this course

continue

else:

if(total_units>0):#Check if score has been calculated for a student earlier

print("in")

GPA=total_score/total_units#Calculate the GPA

output_file.write("%-26s%.2f\n" % (student_name, GPA))#Write the GPA and Student Name in the required format

total_units=0#reset the units

total_score=0#reset the score

if(total_units>0):#Essential for the case when the file doesn't end with a new line(Check if total_units is not 0) which means a record is pending

#to be written to the file

GPA=total_score/total_units#Calculate the GPA

output_file.write("%-26s%.2f\n" % (student_name, GPA))#Write the GPA and Student Name in the required format

total_units=0#reset the units

total_score=0#reset the score

input_file.close()#Close the input file

output_file.close()#Close the output file

except IOError as e:

print("Problem in Opening the required file")#Print a message if file cannot be opened

Explanation:

The program has been tested for all 3 scenarios mentioned i.e.

a. If the file ends without \n

b. If the file ends with 2 \n

c. If the file ends with 1 \n

PS: The Program will run irrespective of how it ends. Even if there are many \n at the end of file, the program will be fine.

3 0
2 years ago
Other questions:
  • Professor Zak allows students to drop the four lowest scores on the ten 100 point quizzes she gives during the semester. Design
    13·1 answer
  • You are the network administrator for a school system. Your boss informs you that she is thinking of implementing a BYOD program
    15·2 answers
  • Which text features does this section contain? Check all that apply.
    15·1 answer
  • How has technology effected the way we communicate?
    5·1 answer
  • Determine the factors using computer failures and defects​
    8·1 answer
  • What does advance mean​
    6·1 answer
  • What is your impression on the subject fundamentals of database systems?​
    7·1 answer
  • 9.
    8·1 answer
  • to allow excel to change the cell references in a formula or function from row to row or column to column as you fill with it, y
    13·1 answer
  • Write a function called st_dev. st_dev should have one
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!