7.4 code practice question 2 edhesive

Answers

Answer 1

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"

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

weight = int(input("Is it weighted? (1 = yes, 0 = no)"))

gpa = GPAcalc(grade, weight)

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

Explanation:

I hope this helps!

Answer 2

The code practice question illustrates the use of conditional statements.

The execution of a conditional statement depends on its truth value

The program in Python, where comments are used to explain each line is as follows:

#Start by initializing the dictionary

dict = {"a": 4, "b": 3, "c": 2, "d": 1, "f": 0}

#This gets input for grade

grade = input().lower()

#This gets input for the weighted average

weighted = int(input())

#If the weighted average is 1, and the grade is in the dictionary

if weighted == 1 and grade in dictionary:

   #This prints the GPA score

   print("Your GPA score is: "+str(dict[grade] + 1))

#If the weighted average is 0, and the grade is in the dictionary

elif weighted == 0 and grade in dictionary:

   #This prints the GPA score

   print("Your GPA score is : "+str(dict[grade]))

#Otherwise

else:

   #The grade is invalid

   print("Invalid")

Read more about similar programs at:

brainly.com/question/19117781


Related Questions

What would happen if computers only had input devices?
Computers would process and display data.
O Computers would receive input and process data.
Computers would receive input, process, and print data
Computers would receive input and display data.

Answers

Answer:

B. Computers would receive input and process data

Explanation:

Without and output device, the computer can't display the data so they would only be able to receive and process the data but not display it.

as we move up a energy pyrimad the amount of a energy avaliable to each level of consumers

Answers

Explanation:

As it progresses high around an atmosphere, the amount of power through each tropic stage reduces. Little enough as 10% including its power is passed towards the next layer at every primary producers; the remainder is essentially wasted as heat by physiological activities.

A for-loop statement can iterate over many items in

a function.

a variable.
a list.

a pass statement.

Answers

A list ..............

Answer: a list. This is the correct answer I checked it out and got it right.

Explanation:

A for-loop statement can iterate over many items in a list. This is the correct answer I checked it out and got it right.


dash+dash=100
Both dash and dashare prime numbers.
How many different solutions can you find​

Answers

Answer:

6

Explanation:

97+3 = 100

89+11 = 100

83+17 = 100

71+29 = 100

59+41 = 100

53+47 = 100

I counted them using excel, see pic.

Answer:

?

Explanation:

?

Choose the best answer in each of the drop-down menus.

Answers

Answer:

whata r in the windows pls list them

Explanation:

How did early games in generation 1 or 2 influence zelda botw

Answers

Answer:

Open world exploration and inventory management

Explanation:

In the first Zelda game (NES) and Zelda ii (NES) there were very early open world mechanics along with inventory management.

Answer:

5 or 4

Explanation:

I know that Zelda 1 and Windwaker were inspristions, and then we have Ocarina of Time for the Korok forest, Gerudo Desert, and etc. And A Link to the Past was where Kakriko Village originated and the same theme was used for Botw as an easter egg. You may not believe me, but it's in there. But if you wanna get techinical, tons of outfits from the old games are in botw thanks to the dlcs, so...all of them actually are what botw is on.

IF YOU LOVE GOD HELP ME......What should be covered in the conclusion of a presentation?

A.
the agenda or purpose of your presentation
B.
real-world examples of the points you make
C.
an animation illustrating what you want to say
D.
a summary of the important points

Answers

Answer:

D.

a summary of the important points

D should be correct

These are the records and traces an individual leaves behind as they use the internet
1 point

Digital Path

Digital map

Digital foot

Digital footprints

Answers

Answer:

Option D. Digital footprints

Explanation:

Digital footprint is all the stuff you leave behind as you use the Internet.

Digital footprints fs it’s the best

Use the table on the right to convert from decimal to binary.

The decimal value of binary 1000 is 10.
The decimal value of binary 1100 is 12.

The decimal value of binary 1001 is 11.

The decimal value of binary 1110 is E.

Answers

Answer:

The decimal value of binary 1100 is 12

Explanation:

on edge

If a Magnet is Positive what will happen?
A. Metal will be Attracted
B. Metal will not be Attracted

Answers

Answer:

Your answer is A :)

Explanation:

You see, if a magnet is positive it means it will attract metal.

Hope this helps!

Have a good day, Pots ❤

Answer:

a

Explanation:

Please help me with these short questions >..

Answers

Answer:

bmjcmbbobnkpkkjkbk

Explanation:

vuvkopbbkvkhovjlplbkp

What are the limitations of the ASCII character set? State why it is limited in this way?

Answers

The problem with ASCII or extended ASCII is that the ASCII system can only represent up to 128 (or 256 for EASCII) different characters. The limitation on the number of character sets means representing character sets for several different language structures is not possible.

sunglasses sunglasses sunglasses sunglasses sunglasses sunglasses sunglasses sunglasses sunglasses sunglasses i am a failure sunglasses sunglasses sunglasses sunglasses sunglasses sunglasses sunglasses sunglasses sunglasses sunglasses sunglasses sunglasses sunglasses sunglasses

Answers

Answer:

SUNGLASSES!!!!! Also, side note, you're not a failure!

EISDHUOSHSD ITS WORLD WIDE HANDSOME

When is it appropriate to delete an entire row or column as opposed to deleting the data in the row or column

Answers

Answer:

huh wdym

Explanation:

The main difference between \f and \r is that \f produces a

Answers

Answer:

\f is a formfeed, \r is just a carriage return.

Explain why RAM is used to store running programs rather than the hard disk

Answers

Answer:

it would take up too much space and it would put too much stress on the processer.

Explanation:

After you have located a program name from the Start menu, in order to create a shortcut on the desktop.

Answers

Answer: wut am I suppose to do

Explanation: thx for the free points :)

The binary number represented by the voltage graph below is

Answers

Answer:

The binary number represented by the voltage graph is bits

Explanation:

Answer:

Heres both answers and how to read them

Explanation:

100% on the quiz

why is video game addiction a real problem?​

Answers

Video game addiction is a real problem because it starts interfering with school and other activies such as spending time with family, or being active. It slowly starts taking away your motivation to do anything else and all you want to do is play the game

Well, truthfully there is no such thing as video game addiction.

You see, playing video games is fun, and sure, sometimes some kids (or adults sometimes too) like to play for a lot longer than others would like them to, however, video gaming is a very good thing in many cases. You see, for example, there are gamers who have made a very large impact on the definition of success. Like Jaden Ashman (he was born in the UK) who won the Fortnite World Cup, and signed a contract with the Fortnite team Lazarus. This made Jaden earn over $60,000 a year. Parents and other people may believe that kids can be addicted to video games, but there have always been the people who prove them wrong. We as people get our own assumptions of what is or isn't addicting, video games among them, but we (the younger generation of gamers) know more insight than those others. People just need to re-define the definition of addiction.

Hope this helps and have a nice day.

-R3TR0 Z3R0

35 points!!!!! Brainliest to best answer!
Please don't just answer for the points!!!!!!!!!!!!
Kim's father's company has expanded many times. Therefore, the company's volume of data has also increased. The employees of that company have problems with accessing large volumes of data. Which computer network should she choose so that the employees can access the huge amount of data easily?

A. VPN

B. LAN

C. WLAN

D. PAN

E. SAN

Answers

Answer:

the answer is E. SAN

Explanation:

Answer:

VPN

Explanation:

B. Write your thoughts about the following in your notebook.
1. How will you safely use the computer when you are online?
2. How can one use the computer or mobile devices for business?
3. What would you do if you encounter unsafe and questionable content
or messages?​

Answers

1. stay with adult supervision

2. check on the web and create a site for it

3. quickly remove it and try not to read it

Explanation:

I really hope this helps

please mark as brainliest

Use the drop-down menu to correctly identify the numbering system.

This numbering system uses 8 symbols:
This numbering system uses 0 and 1:
This numbering system uses 16 symbols:
This numbering system uses 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9:
This numbering system uses 2 symbols:
This numbering system uses 10 symbols:
This numbering system uses numbers and letters:
This numbering system uses 0, 1, 2, 3, 5, 6, and 7:

Answers

This numbering system uses 8 symbols: octal number

This numbering system uses 0 and 1: binary number

This numbering system uses 16 symbols: hexadecimal

This numbering system uses 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9: decimal number system

This numbering system uses 2 symbols: binary number system

This numbering system uses 10 symbols:   decimal number system

This numbering system uses numbers and letters:   hexadecimal number system

This numbering system uses 0, 1, 2, 3, 5, 6, and 7:   octal number system

This numbering system uses 8 symbols is octal number and that of  0 and 1 is binary number.

What is numbering system?

Other are:

The numbering system that uses 16 symbols: hexadecimal.The numbering system that uses 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9: decimal.The numbering system that uses 2 symbols: binary.The numbering system that  uses 10 symbols:   decimal.The numbering system that uses numbers and letters:   hexadecimal.This numbering system uses 0, 1, 2, 3, 5, 6, and 7:   octal.

The numbering system  is known to be often used in  computer.

Conclusively,  it is known to be a kind of systematic process for depicting or showing numbers through the use of a specific set of symbols such as the ones given above.

Learn more about  numbering system from

https://brainly.com/question/17200227

#SPJ2

Different computer applications and their uses.

Answers

Answer:

Application Software Type Examples

Word processing software MS Word, WordPad and Notepad

Database software Oracle, MS Access etc

Spreadsheet software Apple Numbers, Microsoft Excel

Multimedia software Real Player, Media Player

Presentation Software Microsoft Power Point, Keynotes

Explanation:

C) The Cloud makes use of the client-server model.
(i) Explain the roles of the client and server in this relationship.

Answers

Please answer answer question answer

Answer:

But generally the shurikens are considered the best bang for you buck. Followed by the flame vent (if you want to hit apparitions with living weapon) or the Axe for general purpose. The dagger is considered the worst and in many cases actually manages to be WORSE than the piercing variant.

Explanation:


Where do medical students spend most of their first 2 years of medical
school? *

Answers

The first two years
Much of your time will be spent in the classroom and the lab, and the courses you'll take will give you all the fundamentals you need to start learning the art of medicine and patient care.

Does somebody know how to this. This is what I got so far
import java.io.*;
import java.util.Scanner;


public class Lab33bst
{

public static void main (String args[]) throws IOException
{



Scanner input = new Scanner(System.in);

System.out.print("Enter the degree of the polynomial --> ");
int degree = input.nextInt();
System.out.println();

PolyNode p = null;
PolyNode temp = null;
PolyNode front = null;

System.out.print("Enter the coefficent x^" + degree + " if no term exist, enter 0 --> ");
int coefficent = input.nextInt();
front = new PolyNode(coefficent,degree,null);
temp = front;
int tempDegree = degree;
//System.out.println(front.getCoeff() + " " + front.getDegree());
for (int k = 1; k <= degree; k++)
{
tempDegree--;
System.out.print("Enter the coefficent x^" + tempDegree + " if no term exist, enter 0 --> ");
coefficent = input.nextInt();
p = new PolyNode(coefficent,tempDegree,null);
temp.setNext(p);
temp = p;
}
System.out.println();

p = front;
while (p != null)
{

System.out.println(p.getCoeff() + "^" + p.getDegree() + "+" );
p = p.getNext();


}
System.out.println();
}


}

class PolyNode
{

private int coeff; // coefficient of each term
private int degree; // degree of each term
private PolyNode next; // link to the next term node

public PolyNode (int c, int d, PolyNode initNext)
{
coeff = c;
degree = d;
next = initNext;
}

public int getCoeff()
{
return coeff;
}

public int getDegree()
{
return degree;
}

public PolyNode getNext()
{
return next;
}

public void setCoeff (int newCoeff)
{
coeff = newCoeff;
}

public void setDegree (int newDegree)
{
degree = newDegree;
}

public void setNext (PolyNode newNext)
{
next = newNext;
}

}



This is the instructions for the lab. Somebody please help. I need to complete this or I'm going fail the class please help me.
Write a program that will evaluate polynomial functions of the following type:

Y = a1Xn + a2Xn-1 + a3Xn-2 + . . . an-1X2 + anX1 + a0X0 where X, the coefficients ai, and n are to be given.

This program has to be written, such that each term of the polynomial is stored in a linked list node.
You are expected to create nodes for each polynomial term and store the term information. These nodes need to be linked to each previously created node. The result is that the linked list will access in a LIFO sequence. When you display the polynomial, it will be displayed in reverse order from the keyboard entry sequence.

Make the display follow mathematical conventions and do not display terms with zero coefficients, nor powers of 1 or 0. For example the polynomial Y = 1X^0 + 0X^1 + 0X^2 + 1X^3 is not concerned with normal mathematical appearance, don’t display it like that. It is shown again as it should appear. Y = 1 + X^3

Normal polynomials should work with real number coefficients. For the sake of this program, assume that you are strictly dealing with integers and that the result of the polynomial is an integer as well. You will be provided with a special PolyNode class. The PolyNode class is very similar to the ListNode class that you learned about in chapter 33 and in class. The ListNode class is more general and works with object data members. Such a class is very practical for many different situations. For this assignment, early in your linked list learning, a class has been created strictly for working with a linked list that will store the coefficient and the degree of each term in the polynomial.

class PolyNode
{
private int coeff; // coefficient of each term
private int degree; // degree of each term
private PolyNode next; // link to the next term node

public PolyNode (int c, int d, PolyNode initNext)
{
coeff = c;
degree = d;
next = initNext;
}

public int getCoeff()
{
return coeff;
}

public int getDegree()
{
return degree;
}

public PolyNode getNext()
{
return next;
}

public void setCoeff (int newCoeff)
{
coeff = newCoeff;
}

public void setDegree (int newDegree)
{
degree = newDegree;
}

public void setNext (PolyNode newNext)
{
next = newNext;
}
}

You are expected to add various methods that are not provided in the student version. The sample execution will indicate which methods you need to write. Everything could be finished in the main method of the program, but hopefully you realize by now that such an approach is rather poor program design.

Answers

I have a solution for you but Brainly doesn't let me paste code in here.

The unique identifier for each record in a database table is called the

A. Record Id
B. Id number
C. Primary key
D. Row number

Answers

The answer is C. Primary Key. I hope this helps

Answer:

C

Explanation:

Thank the other person

Christa is designing a web page. She wants an image that reads 5100% Natural!" to be associated in the user's mind with a picture of a new fruit snack. What is the best way for her to do this?


A. use the rule of thirds
B. place the images in close proximity
C. increase the color contrast
D. increase the whitespace​

Answers

Answer: B. Please the images in close proximity.

Please tell me if its right so I can update it!

Can someone please help and answer the 6 questions on the bottom of the page

I’ll give you brainly

Spam answer will be reported please don’t spam

Answers

Ivan rigney

John benson      2

Mark nicholls      4

James  mitchell   7

Paul matthews   13

Neil hooper         8

Identify the causes of installation problems. (Choose all that apply)

Answers

Answer:

the last one

Explanation:

please mark brainliest

Answer: The answers are: A,B,D

edg.

Other Questions
Can someone help me please!!! HELP PLZZZZZZZZZZZZZ ILL GIVE U A JUICE BOX halp me plez I dont wanna fail ( MUST BE A EXPRESSION) Need Help ASAP! You might create a flowchart as part of the ___phase of a software development project.releasetestingdesigncoding Anyone know this question? Which element, that is essential for human life, is found in large amounts in both Earth's atmosphere and oceans?A) heliumB) oxygenC) silicaD) calcium what is another way to write 5/2? Given f(x) = 7x^9, find f^-1 (x). Then state whether f^-1 (x) is a function Help me if youve read the walrus and the carpenter The size of a computer class is limited to 15 people. If 3 seats are still available, to what percent of its capacity is the full classical Lee y escoge la mejor respuesta. Read and select the best answer. La ruina o decadencia de algo es ________. A group of agricultural students went on a field trip to the state fair. Each ticket to enter the fair was 9$ and the parking fee for the groups bus was 25$. How many students went on the field trip if the total cost was 313$? HELP ASAP!!!!! Find the lateral surface area and the total surface area of each figure. round to the nearest tenth if needed. SHOW ALL WORK. (Will give brainliest for correct answer and explanation on what to do)+ please help to solve this The account balances of Paradise Travel Service for the year ended May 31, 20Y6, follow: Fees earned $900,000 Office expense 300,000 Miscellaneous expense 15,000 Wages expense 450,000 Accounts payable 18,000 Accounts receivable 38,000 Cash 52,000 Common Stock 100,000 Land 450,000 Supplies 3,000 $10,000 of dividends were paid during the year. Retained earnings as of June 1, 20Y5, were $300,000. Prepare a balance sheet as of May 31, 20Y6. When entering assets, enter them in order of liquidity. A business owner is aware that the Department of Labor has created rulesthat require overtime pay for employees. When he works his employees morethan 40 hours in one week, he makes sure that he works them less than 40hours the following week. The business owner feels that it is fair to averagethe number of hours worked over the two weeks covered by the pay periodand use that number for calculating overtime pay. A representative of theDepartment of Labor informs him that their regulations do not permit this,Which of the following is true in this situation? At the beginning of the month Kiran had $24 in his school cafeteria account. Use a variable to represent the unknown quantity in each transaction below and write an equation to represent it. Then, represent each transaction on a number line. What is the unknown quantity in each case? 1. In the first week he spent $16 on lunches. How much was in his account then? 2. Then he deposited some more money and his account balance was $28. How much did he deposit? 3. Then he spent $34 on lunches the next week. How much was in his account then? 4. Then he deposited enough money to pay off his debt to the cafeteria, How much did he deposit? 5. Explain why it makes sense to use a negative number to represent Kiran's account balance when he owes money. Find the solution to each equation.3k = 48k=7p = 147p=9m = 216m =8C = 184C=4g = 72g= 4persent of 3000 is whatW please help me with this math question