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
Lemur [1.5K]
3 years ago
8

Need Help! Asap 7.5 code practice (Edhesive)

Computers and Technology
2 answers:
hram777 [196]3 years ago
7 0

Answer:

def GPAcalc(g, w):

   if g == "a" or g == "A":

       return 4 + w

   elif g == "B" or g == "b":

       return 3 + w

   elif g == "C" or g == "c":

       return 2 + w

   elif g == "D" or g == "d":

       return 1 + w

   elif g == "F" or g == "f":

       return 0 + w

   else:

       return "Invalid"

       

def GPAAV(S, C):

   return S/C

   

Sum = 0

Classes = int(input("How many Classes are you taking? "))

for i in range(0, Classes):

   Grade = (input("Enter your Letter Grade: "))

   Weight = int(input("Is it weighted? (1= yes) "))

   gpa = GPAcalc(Grade, Weight)

   print("Your GPA score is: " + str(gpa))

   Sum = Sum + gpa

print("Your weighted GPA is a " + str(GPAAV(Sum, Classes)) + ".")

Explanation:

This one should work, let me know in the comments.

erma4kov [3.2K]3 years ago
5 0

Answer:

Make main function

def main():

Make some constants for the grades

A = 5.0 or 4.0

B = 4.0 or 3.0

C = 3.0 or 2.0

D = 2.0 or 1.0

F = 1.0 or 0.0

In the main function call the function you made and make sure to use those constants for help

also don't forget to call your main function or nothing will work

Explanation:

Making the main function is good programming practice for your future

Making the constants is also helpful to your programming.

Now how it works you call the function you wrote to calculate the grade.

I don't know how helpful this was this is one of my first answers. I am `also answering how I would do it

You might be interested in
Write Java code that creates an array of n integers myArray, by taking n integers from the user with duplications, and do the fo
skad [1K]

Answer:

this should be what you need

Explanation:

import java.util.*;

public class ABC{

 public static void main(String[] args) {

   int n;

   //create scanner object

   Scanner sc = new Scanner(System.in);

   //ask for size of array

   System.out.print("Enter the size of array (n): ");

   //read the input

   n = sc.nextInt();

   //create an array of n length

   int [] myArray = new int[n];

   //ask user for array elements

   System.out.printf("Enter %d integers: ", n);

   //read array elements

   for(int i =0 ;i <5; i++)

     myArray[i] = sc.nextInt();

   

   //print the elements if myArray

   System.out.print("1 - The values of myArray are: [");

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

     System.out.print(myArray[i]);

     if(i < n-1)

       System.out.print(", ");

   }

   System.out.print("]\n");

   //calculate mean and sum of myArray elements

   int sum = 0;

   double mean = 0;

   for(int i = 0; i < n; i++)

     sum += myArray[i];

   

   mean = (sum*1.0)/n;

   //print the sum and mean of myArray

   System.out.printf("2 - The sum is: %d. The mean is: %.1f\n", sum, mean);

     

   //create an arraylist

   ArrayList<Integer> myArrayList = new ArrayList<Integer>();

   //copy the value of myArray to an arraylist without duplicates

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

     if(!myArrayList.contains(myArray[i]))

       myArrayList.add(myArray[i]);

   }

   sum = 0; mean = 0;

   //display the values of myArrayList

   System.out.print("3 - The values of myArrayList are: [");

   for(int i =0 ; i < myArrayList.size(); i++){

     System.out.print(myArrayList.get(i));

     if(i < myArrayList.size()-1)

       System.out.print(", ");

   }

   System.out.print("]\n");

   //calculate sum and mean of myArrayList elements

   for(int i = 0; i < myArrayList.size(); i++)

     sum += myArrayList.get(i);

   mean = (sum*1.0)/myArrayList.size();

   //print the sum and mean of myArrayList

   System.out.printf("4 - The sum is: %d. The mean is: %.2f\n", sum, mean);

 }

}

3 0
3 years ago
What is the answer to in Microsoft Word you can access the blank from the command command from the mini toolbar what is the corr
fgiga [73]
<span>The correct answer is: Option (C) Underlined

Explanation:
In Microsoft Word (version 2007 and version 2010), the following commands you can use:
1. Bold
2. Highlight Text
3. Font Size
4. Italics
5. Underline
6. Format Painter
7. Increase indent of text
8. Decrease indent of text
9. Increase font size
10. Center text (alignment)

Word count, save as and insert citation commands do not exist in the mini-toolbar. Hence, the correct option is Option (C) Underlined</span>
4 0
3 years ago
Read 2 more answers
A system analyst generally needs to have a number of skills. For example, technical and analytical skills are required for this
polet [3.4K]

Answer: See explanation

Explanation:

Systems analysts are the people who analyse how a particular software, or IT system will be able to fit and meet the needs of their company or client. They are charged with the responsibility of writing requirements for new systems.

Some if the skills required for a system analyst include:

• Flexibility

• Strong analytical skills

• Adaptability

• Initiative

• Interpersonal skills.

• Attention to detail.

• Teamwork skills.

• Written and verbal communication skills.

8 0
3 years ago
To rename a worksheet, you change the text on the ? HELP ASAP
prohojiy [21]
If this is Excel, it would be C. Sheet tab
5 0
3 years ago
bookmark question for later what database did zach choose? microsoft excel microsoft access db2 oracle
Veronika [31]

Zach chooses the databases is Oracle

<h3>Explain about the databases?</h3>

Information that is organized into a database is made available for quick administration, updating, and access. Network databases, object-oriented databases, and hierarchical databases are all types of databases.

According to the TOPDB Top Database index, Oracle is the most widely used database with 32.09% of the market share. Computer databases often hold collections of data records or files containing information, such as sales transactions, customer data, financials, and product information My SQL, with a score of 16.64, is in second place, while SQL Server, with a score of 13.72 percent, is third. Since at least 2006, Oracle has dominated global database searches, making it the most used database not just in 2022.

To learn more about databases refer to:

brainly.com/question/28255661

#SPJ4

5 0
1 year ago
Other questions:
  • By apply styles, _____________ formats are being applied each time.
    6·1 answer
  • How does a combustion engine works?
    7·2 answers
  • Where are the Add Level and Delete Level buttons located? Filter options list Sort &amp; Filter group Sort dialog box Custom fil
    11·1 answer
  • Alright, don't judge me, this is a question that involves my Childhood game PvZ GW 2. So I noticed mods and stuff that get uploa
    12·2 answers
  • How are desktop and mobile operating systems similar?
    5·1 answer
  • Please answer<br><br>NO LINKS​
    7·1 answer
  • What game is this? help mee?
    8·2 answers
  • Which of the following players is on offence
    9·1 answer
  • Suppose that a t-shirt comes in five sizes: S, M, L, XL, XXL. Each size comes in four colors. How many possible t-shirts are the
    11·1 answer
  • Can anyone please give examples of pseudocode in programming? Thanks you very much!
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!