Sue says that she ran the Huffman coding algorithm for the four characters, A, C, G, and T, and it gave her the code words, 0, 10, 101, 110, respectively. Give examples of four frequencies for these characters that could have resulted in these code words or argue why these code words could not possibly have been output by the Huffman coding algorithm.

Answers

Answer 1

Answer:

10 is a prefix of 101, so in a stream you couldn't tell these a part. So this cannot be a valid Huffman code.


Related Questions

1 #include 2 3 int max2(int x, int y) { 4 int result = y; 5 if (x > y) { 6 result = x; 7 } 8 return result; 9 } 10 11 int max3(int x, int y, int z) { 12 return max2(max2(x,y),z); 13 } 14 15 int main() { 16 int a = 5, b = 7, c = 3; 17 18 printf("%d\n",max3(a, b, c)); 19 20 printf("\n\n"); 21 return 0; 22 } What number is printed when the program is run?

Answers

Answer:

7

Explanation:

#include <stdio.h>

int max2(int x, int y) {

   int result = y;

   if (x > y) {

       result = x;

   }

   return result;

}

int max3(int x, int y, int z) {

   return max2(max2(x,y),z);

}

int main() {

   int a = 5, b = 7, c = 3;

   printf("%d",max3(a, b, c));

   printf("");

   return 0;

}

Hi, first of all, next time you post the question, it would be nice to copy and paste like above. This will help us to read the code easily. Thanks for your cooperation.

We start from the main function:

The variables are initialized → a = 5, b = 7, c = 3

max3 function is called with previous variables and the result is printed → printf("%d",max3(a, b, c));

We go to the max3 function:

It takes 3 integers as parameters and returns the result of → max2(max2(x,y),z)

Note that max2 function is called two times here (One call is in another call actually. That is why we need to first evaluate the inner one and use the result of that as first parameter for the outer call)

We go to the max2 function:

It takes 2 integers as parameters. If the first one is greater than the second one, it returns first one. Otherwise, it returns the second one.

First we deal with the inner call. max2(x,y) is max2(5,7) and the it returns 7.

Now, we need to take care the outer call max2(7, z) is max2(7, 3) and it returns 7 again.

Thus, the program prints 7.

Arrange the computers in the order fastest to slowest: Minicomputer, Supercomputer, Personal Computer and Mainframe.

Answers

Answer:

supercomputer, mainframe, personal computer, minicomputer

Explanation:

Immersive Reader
We don't have to call our function f every time; create a function called times-ten that should take a parameter x and return x * 10. Once you've created the function, run times-ten(50).
Input Output
1 10
12 120
31 310
50 500

Answers

Answer:

1 10

6yx

Explanation:

b or c isn't the best answer

Answers

Correct of courseeee

Consider an allocator on a 32-bit system that uses an implicit free list. Each memory block, either allocated or free, has a size that is a multiple of four bytes. Thus, only the 30 higher order bits in the header and footer are needed to record block size, which includes the header and footer and is represented in units of bytes. The usage of the remaining 2 lower order bits is as follows: bit 0 indicates the use of the current block: 1 for allocated, 0 for free. bit 1 indicates the use of the previous adjacent block: 1 for allocated, 0 for free Below is a helper routine defined to facilitate the implementation of free (void *P). Which option, if any, will complete the routine so that it performs the function properly?\
Note: "size" in the answers indicates the size of the entire block /* given a pointer to a valid block header or footer, returns the size of the block */
int size(void *hp)
{
int result;
__________;
return result;
}
1. result=(*(int *)hp)&(-7)
2. result=((*(char *)hp)&(-5))<<2
3. result=(*(int *)hp)&(-3)
4. result=(*hp)&(-7)
5. None of these

Answers

Answer:

result=(*(int *)hp)&(-3)

Explanation:

The result above would release the pointer or address of the integer data type with 3 memory blocks needed by the allocator.

Complete the sentences describing a computer innovation.

Software and technology that allow people to work together on a task are known as ____?​

Answers

Answer:

Collaboration

Answer:

Software and technology that allow people to work together on a task are known as collaboration tools

Explanation:



8.6 Code Practice: Question 2

Instructions

Copy and paste your code from the previous code practice. If you did not successfully complete it yet, please do that first before

completing this code practice.

ate

After your program has prompted the user for how many values should be in the array, generated those values, and printed the

whole list, create and call a new function named sumarray. In this method, accept the array as the parameter. Inside, you should

sum together all values and then return that value back to the original method call. Finally, print that sum of values.

Sample Run

How many values to add to the array:

8

[17, 99, 54, 88, 55, 47, 11, 97]

Total 468

Answers

Answer:

In Java:

import java.util.*;

public class Main{

public static int sumArray(int []arr, int lent){

    int sum = 0;

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

     sum+=arr[i];

 }

 return sum; }

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 System.out.print("Number of elements: ");

 int lent = input.nextInt();

 Random rd = new Random();

 int [] intArray = new int[lent];

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

     intArray[i] = rd.nextInt(100)+1;

 }

 System.out.print("Total: "+sumArray(intArray,lent));

}

}

Explanation:

No previous code was provided; So, I had to write the program from scratch (in Java)

Also, the elements of the array were generated randomly

See attachment for program source file where I used comments for explanatory purpose.

Suzanne is following a fad diet. She has started to experience low energy during her workouts, and on a recent trip to the doctor, she found out she has high cholesterol. Which fad diet is Suzanne most likely following?

Answers

Answer:

Hi mate....

Explanation:

This is ur answer....

--> Suzanne just facing low carbohydrates....

hope it helps you,

mark me as the brainliest pls....

Follow me!

Answer:

A.

low-carbohydrate

Explanation:

List an example of application software used in spreadsheet​

Answers

Answer: Microsoft Excel

Explanation:

Answer:

LibreOffice Calc

I like it because it is not OVERPRICED like Microsoft Excel. It is a very good spreadsheet program. It comes with popular linux distros like ubuntu. Microsoft Excel is also one of them.

I forgot to say LibreOffice Calc is free. Just in case you want it and can't get Microsoft Excel, or you just don't want to pay for it.

ROCK-PAPER-SCISSORS Write a program that plays the popular game of rock-paper-scissors. (A rock breaks scissors, paper covers rock, and scissors cut paper). The program has two players and prompts the users to enter rock, paper or scissors. Your program does not have to produce any color. The color is there just to show you what your program should be inputting and outputting. The writing in blue represents output and writing in red represents input. Here are some sample runs:

Answers

Answer:

In Python

print("Instruction: 1. Rock, 2. Paper or 3. Scissors: ")

p1 = int(input("Player 1: "))

p2 = int(input("Player 2: "))

if p1 == p2:

   print("Tie")

else:

   if p1 == 1: # Rock

       if p2 == 2: #Paper

           print("P2 wins! Paper covers Rock")

       else: #Scissors

           print("P1 wins! Rock smashes Scissors")

   elif p1 == 2: #Paper

       if p2 == 1: #Rock

           print("P1 wins! Paper covers Rock")

       else: #Scissors

           print("P2 wins! Scissors cuts Paper")

   elif p1 == 3: #Scissors

       if p2 == 1: #Rock

           print("P2 wins! Rock smashes Scissors")

       else: #Paper

           print("P1 wins! Scissors cuts Paper")

Explanation:

This prints the game instruction

print("Instruction: 1. Rock, 2. Paper or 3. Scissors: ")

The next two lines get input from the user

p1 = int(input("Player 1: "))

p2 = int(input("Player 2: "))

If both input are the same, then there is a tie

if p1 == p2:

   print("Tie")

If otherwise

else:

The following is executed if P1 selects rock

   if p1 == 1: # Rock

If P2 selects paper, then P2 wins

       if p2 == 2: #Paper

           print("P2 wins! Paper covers Rock")

If P2 selects scissors, then P1 wins

       else: #Scissors

           print("P1 wins! Rock smashes Scissors")

The following is executed if P1 selects paper

   elif p1 == 2: #Paper

If P2 selects rock, then P1 wins

       if p2 == 1: #Rock

           print("P1 wins! Paper covers Rock")

If P2 selects scissors, then P2 wins

       else: #Scissors

           print("P2 wins! Scissors cuts Paper")

The following is executed if P1 selects scissors

   elif p1 == 3: #Scissors

If P2 selects rock, then P2 wins

       if p2 == 1: #Rock

           print("P2 wins! Rock smashes Scissors")

If P2 selects paper, then P1 wins

       else: #Paper

           print("P1 wins! Scissors cuts Paper")

What information is required for a complete citation of a website source?
the title, volume number, and page numbers
the responsible person or organization and the website URL
the responsible person or organization, date accessed, and URL
the responsible person or organization and the date accessed

Answers

Answer:

I believe that the answer is C.

Explanation:

Answer:

think the answer is:

the responsible person or organization, date accessed, and URL

Explanation:

have a nice day

Which search strategy is most similar to greedy search?

A.
depth-first search
B.
breadth-first search
C.
bidirectional search
D.
uniform-cost search

Answers

Answer:

I think the answer would be A.

Explanation:

If I'm wrong plz let me know (I think I may be wrong)

Write a program that asks the user to guess the next roll of a six-sided die. Each guess costs $ 1. If they guess correctly, they get $ 100.00. The player will start out with a $10.00 bank. Each time he (or she) guesses incorrectly you will subtract $1.00 from their bank. Each time they guess correctly, you add $10.00 to their bank. Print the total winnings or losses at the end of the game. You can simulate the toss of the dice using the RandomRange function (Don't forget to Randomize).

Answers

Answer in python:

import random

money = 10

winnings = 0

def main():

global winnings

global money

dice_num = random.randrange(1,6)

input_str = "Guess the dice number. You have $"+str(money)+" > "

input_num = input(input_str)

if int(input_num) == dice_num:

 money = money + 10

 winnings = winnings + 10

else:

 money = money - 1

if money < 0:

 print("You lose. You won "+str(winnings)+" times. Press enter to try again")

 useless_variable = input()

 main()

else:

 main()  

main()

Explanation:

- A blacksmith is shoeing a miser's horse. The blacksmith charges ten dollars for his work. The miser refuses to pay. "Very well", says the blacksmith, "there are eight nails in each horseshoe. The horse has four shoes. There are 32 nails in all. I will ask you to pay one penny for the first nail, two pennies for the next nail, four pennies for the next nail, eight pennies for the next nail, sixteen pennies for the next, etc. until the 32nd nail". How much does the miser have to pay?​

Answers

Answer:

1+ 2^31= 2,146,483,649 pennies.

in Dollars- $21,464,836.49

edit for total=

42, 929,672. 97

Explanation:

,

8
A
Remains samo
Increases
Fluctuates
Decreases
9.
If the forward voltage in a diode is increased, the width of depletion region
Federal Board Past Board Paper 20/20
B
D.
The half life of 191 sr is 9.70 hours. What is decay constant?
A. 1.99x10 *s-
B
1.99x10's.'
D.
The ratio of minimum to maximum wavelength in Balmer series is:
A. 1/4
B.
5/9
D. 5/36
When a battery of cmf "E" and internal resistance "r" is connected across external
1.6x1045-1
1.69x 651
10
3/4
11
1
B.
D.
13.
B.
resistance R, the power consumed in R is max when T/R is
A. 1/2
C.
0
12.
A consequence of Einstein's theory of relativity is:
A.
moving clocks run more slowly than when they are at rest.
B moving rods are longer than when they are at rest.
light exhibits both wave and particle properties.
the laws of physics must appear the same to all observers moving with
uniforın velocity relative to each other.
If input power and output power of an electric motor are 540 W and 382 W
respectively. Then the efficiency is:
A. 100%
91%
C. 71%
D. 51%
14.
A wire has a resistance of 121. It is bent in the form of a circle. The effective
resistance between the two points on any diameter of the circle is:
A. 12Ω
2412
C. 612
D. 302
15.
The constant a of a transistor is 0.95. What would be the change in the collector
current corresponding to a charge of 0.4 mA in the base current in common-
emitter arrangement?
A. 8.6 mA
B. 7.6 mA
C. 10.6 mA
D. 10 mA
B.
16.
The velocity at which the relativistic length of a body reduces to half of its
original length is:
A. V =
B. V =
узс
C. V
D.
V =
2
3c
2
2
C
17.
The speed of electrons in 2nd Bohr orbit is:
A. 1.095 x106m/s
B.
C. 2.19 x 108m/s
D.
1.92 x106m/s
13.6 x107m/s.​

Answers

Answer:

i need more

Explanation:

i need more

is technology oversold

Answers

Answer:

no

Explanation:

Answer:

no

Explanation:

if u can still pay for using phones, computers, etc. then we will still have technology

For this program you will build a simple dice game called Pig. In this version of Pig, two players alternate turns. Players each begin the game with a score of 0. During a turn a player will roll a six-sided die one or more times, summing up the resulting rolls. At the end of the player's turn the sum for that turn is added to the player's total game score If at any time a player rolls a 1, the player's turn immediately ends and he/she earns O points for that turn (i.e. nothing is added to the player's total game score). This is called "pig". After every roll that isn't a 1, the player may choose to either end the turn, adding the sum from the current turn to his/her total game score, or roll again in an attempt to increase the sum. The first player to 50 points wins the game
Details
Open a text editor and create a new file called pig.py. In the file
Write a function called print_scores that has four parameters - these hold, in this order, the name of the first player (a string), his/her score (an int), the second player's name (a string), and score (an int).
The function will
Print the following message, using the current parameter values for the player names and scores (NOT necessarily Ziggy, 18, Elmer, and 23) -SCORES Ziggy:18 Elmer 23--
Print an empty line before this line
There is a single tab between SCORES and the name of player 1 .
There is a single tab between player 1's score and player 2's name .
Every other gap is a single space

Answers

Answer:

In Python:

import random

p1name = input("Player 1: "); p2name = input("Player 2: ")

p1score = 0; p2score = 0

playerTurn = 1

print(p1name+" starts the game")

roll = True

while(roll):

   if playerTurn == 1:

       p1 = random.randint(1,6)

       print(p1name+"'s roll: "+str(p1))

       if p1 == 1:

           playerTurn = 2

           roll = True

       else:

           p1score+=p1

           another = input("Another Roll (y/n): ")

           if another == "y" or another == "Y":

               roll = True

           else:

               playerTurn = 2

               roll = True

   else:

       p2 = random.randint(1,6)

       print(p2name+"'s roll: "+str(p2))

       if p2 == 1:

           playerTurn = 1

           roll = True

       else:

           p2score+=p2

           another = input("Another Roll (y/n): ")

           if another == "y" or another == "Y":

               roll = True

           else:

               playerTurn = 1

               roll = True

   if p1score >= 50 or p2score >= 50:

       roll = False

print(p1name+":\t"+str(p1score)+"\t"+p2name+":\t"+str(p2score))

Explanation:

Note that the dice rolling is simulated using random number whose interval is between 1 and 6

This imports the random module

import random

This line gets the name of both players

p1name = input("Player 1: "); p2name = input("Player 2: ")

This line initializes the scores of both players to 0

p1score = 0; p2score = 0

This sets the first play to player 1

playerTurn = 1

This prints the name of player 1 to begin the game

print(p1name+" starts the game")

This boolean variable roll is set to True.

roll = True

Until roll is updated to False, the following while loop will be repeated

while(roll):

If player turn is 1

   if playerTurn == 1:

This rolls the dice

       p1 = random.randint(1,6)

This prints the outcome of the roll

       print(p1name+"'s roll: "+str(p1))

If the outcome is 1, the turn is passed to player 2

       if p1 == 1:

           playerTurn = 2

           roll = True

If otherwise

       else:

Player 1 score is updated

           p1score+=p1

This asks if player 1 will take another turn

           another = input("Another Roll (y/n): ")

If yes, the player takes a turn. The turn is passed to player 2, if otherwise

           if another == "y" or another == "Y":

               roll = True

           else:

               playerTurn = 2

               roll = True

If player turn is 2

   else:

This rolls the dice

       p2 = random.randint(1,6)

This prints the outcome of the roll

       print(p2name+"'s roll: "+str(p2))

If the outcome is 1, the turn is passed to player 1

       if p2 == 1:

           playerTurn = 1

           roll = True

If otherwise

       else:

Player 2 score is updated

           p2score+=p2

This asks if player 2 will take another turn

           another = input("Another Roll (y/n): ")

If yes, the player takes a turn. The turn is passed to player 1, if otherwise

           if another == "y" or another == "Y":

               roll = True

           else:

               playerTurn = 1

               roll = True

If either of both players has scored 50 or above

   if p1score >= 50 or p2score >= 50:

roll is updated to False i.e. the loop ends

       roll = False

This prints the name and scores of each player

print(p1name+":\t"+str(p1score)+"\t"+p2name+":\t"+str(p2score))

What situations might call for nontraditional presentation distribution methods? Check all that apply. web-based training VOIP (Voice over IP) meetings e-books on-the-job training distance education O e-learning informal learning​

Answers

Answer:

I. Web-based training

II. VOIP (Voice over IP) meetings

III. Distance education

IV. e-learning

Explanation:

PowerPoint application can be defined as a software application or program designed and developed by Microsoft, to avail users the ability to create various slides containing textual and multimedia informations that can be used during a presentation.

Some of the features available on Microsoft PowerPoint are narrations, transition effects, custom slideshows, animation effects, formatting options etc.

A nontraditional presentation distribution method typically involves the use of digital based platforms for the presenting informations to the audience.

Hence, the situations that might call for nontraditional presentation distribution methods include;

I. Web-based training

II. VOIP (Voice over IP) meetings

III. Distance education

IV. e-learning

Answer:

(A)

(B)

(E)

(F)

Explanation:

web-based training

VOIP (Voice over IP) meetings

distance education

e-learning

In this assignment we are going to practice reading from a file and writing the results of your program into a file. We are going to write a program to help Professor X automate the grade calculation for a course. Professor X has a data file that contains one line for each student in the course. The students name is the first thing on each line, followed by some tests scores. The number of scores might be different for each student. Here is an example of what a typical data file may look like: Joe 10 15 20 30 40 Bill 23 16 19 22 Sue 8 22 17 14 32 17 24 21 2 9 11 17 Grace 12 28 21 45 26 10 John 14 32 25 16 89 Program details Write a program that: Ask the user to enter the name of the data file. Read the data from the file and for each student calculate the total of the test scores, how many tests the student took, and the average of the test scores. Save the results in an output file (e.g. stats.txt) in the following order: studentName totalScore numberOfTests testAverage Note that the average is saved with 2 decimal places after the decimal point. Validation: Make sure your program does not crash if a file is not found or cannot be open.

Answers

Answer:

In Python:

import os.path

from os import path

fname = input("Filename: ")

if path.exists(fname):

with open(fname) as file_in:

 lines = []

 for line in file_in:

  lines.append(line.rstrip('\n'))

f = open("stat.txt","r+")

f.truncate(0)

f = open("stat.txt", "a")

f.write("Names\tTotal\tSubjects\tAverage\n")

for i in range(len(lines)):

 rowsum = 0; count = 0

 nm = lines[i].split()

 for j in nm:

  if (j.isdecimal()):

   count+=1

   rowsum+=int(j)

 average = rowsum/count

 f.write(nm[0]+"\t %3d\t %2d\t\t %.2f\n" % (rowsum, count, average))

f.close()

else:

print("File does not exist")

Explanation:

See attachment for explanation where comments were used to explain each line

For each student, the sum of the marks, total tests were taken and the average of marks is calculated and is stored in an output file, for example, stats.txt.

Python Code:

The code in Python asks the user for an input file name. If the input file is not found an error is printed else the data in the file is processed further.

Try:

  # take input file name

  file = input('Enter name of the data file: ')

# open the input file

  ip = open(file, 'r')

# store the lines from input file in a list

  lines = ip.readlines()

  # close the file

  ip.close()

# open the output file

  op = open('stats.txt', 'w')

# iterate over each line

  for line in lines:

 # split data using space as delimiter

      data = line.split()

 # get name

   name = data[0]

 # get marks and convert them to integer

      marks = list(map(int, data[1:]))

# get sum of marks

      total = sum(marks)

# get number of tests

      length = len(marks)

# calculate average of marks

      avg = total/length

# add the data to output file

      op.write('{} {} {} {:.2f}\n'.format(name, total, length, avg))

# close the output file

  op.close()

print('Stats have been save in the output file')

# catch FileNotFoundError

except FileNotFoundError:

# print error

  print('Error: that file does not exist. Try again.')

Learn more about the topic python code:

https://brainly.com/question/14492046

Which story element refers to the way the story unfolds?
A.
premise
B.
back story
C.
synopsis
D.
plot

Answers

Answer:

D. Plot

Explanation:

The plot is how the story develops, unfolds and move through time.

Which of the following is a/are view/views to display a table in Access?
Question 5 options:


Datasheet view


Design view


Both A and B


None of the above

Answers

Answer:Both A and B

Explanation:

write a BASIC program to find the product of any two numbers​

Answers

Answer:

Print 4 + 4

Explanation:

If you're writing this in the programming language called BASIC, this is how you would add any two numbers.

Which of these describes a database? Check all of the boxes that apply.

is used to perform complex calculations

is a dynamic tool for analyzing related information

is a tool for analyzing raw data

is a way to store, retrieve, manage, and analyze data

Answers

Answer:

The answer is 2,3,4 and the next one is 1,2 and 4

Explanation:

Just did it

EDG 2021

Answer:

first part is 2,3,4

second part is 2,4,5

Explanation:

In ……………cell reference, the reference of a cell does not change. ​

Answers

Answer:

In absolute cell reference, the reference of a cell does not change. 

Complete the function favoriteFlower(). Note that the program will not run as is because the function is incomplete. The purpose of the function is to determine if the given flower is in the top three of my favorite flowers. The starter file defines a list of favorite flowers that is ordered most favorite to least favorite. Please pass the flower name and the flower list as arguments in the function. The expected output is:

Answers

Answer:

What Language? Once you respond with a comment, I will be happy to write the code for you. I write code 24/7 (Because I have nothing better to do), so I will wait for you to comment. Also is there any pre-existing code?

Explanation:

Extend the class linkedListType by adding the following operations: Write a function that returns the info of the kth element of the linked list. If no such element exists, terminate the program. Write a function that deletes the kth element of the linked list. If no such element exists, terminate the program.

Answers

Answer:

Explanation:

The following code is written in Java. Both functions traverse the linkedlist, until it reaches the desired index and either returns that value or deletes it. If no value is found the function terminates.

public int GetNth(int index)

       {

       Node current = head;

       int count = 0;

       while (current != null)

       {

       if (count == index)

       return current.data;

       count++;

       current = current.next;

       }

       assert (false);

       return 0;

       }

public int removeNth(int index)

       {

       Node current = head;

       int count = 0;

       while (current != null)

       {

       if (count == index)

       return current.remove;

       count++;

       current = current.next;

       }

       assert (false);

       return 0;

       }

______________ is a raw fact about a person or an object
Question 1 options:


File


Lookup wizard


Information


Data

Answers

I think its C information. Sowwy if I’m wrong

Write a function called combineArrays(int[], int, int[], int) that accepts in two arrays of ints and the size of the arrays as parameters. The function should then create a new array that is the size of both array combined. The function should copy the elements from the first array into the new array, followed by all the elements from the second array. So if the initial array is {1,2,3,4,5} and the second arrray is {10,20,30} then the new array will be size 8 and contain {1,2,3,4,5,10,20,30}. Then in your main(), create two arrays of different sizes, each at least size 10, and fill them with integers's. Run the arrays through your function created above and print out all three arrays to demonstrate that the concatenation method worked. Then run your method again using the same two original arrays, but in the other order. So if the first time you did array a then array b, the second time do array b then array a. Make sure to delete the new arrays before closing your program.

Answers

Answer:

The function in C++ is as follows:

void combineArrays(int arr1[], int len1, int arr2[], int len2){

   int* arr = new int[len1+len2];

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

       arr[i] = arr1[i];    }

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

       arr[len1+i] = arr2[i];    }

   for(int i=0;i<len1+len2;i++){

       cout<<arr[i]<<" ";    }    

   delete[] arr;  }

Explanation:

This defines the function

void combineArrays(int arr1[], int len1, int arr2[], int len2){

This creates a new array

   int* arr = new int[len1+len2];

This iterates through the first array.

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

The elements of the first array is entered into the new array

       arr[i] = arr1[i];    }

This iterates through the second array.

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

The elements of the second array is entered into the new array

       arr[len1+i] = arr2[i];    }

This iterates through the new array

   for(int i=0;i<len1+len2;i++){

This prints the new array

       cout<<arr[i]<<" ";    }

This deletes the new array

   delete[] arr;  }

See attachment for complete program which includes the main

Write a C++ program to calculate the course score of CSC 126. 1. A student can enter scores of 3 quizzes, 2 exams, and a final exam. The professor usually keeps 1 digit after the point in each score but the overall course score has no decimal places. 2. The lowest quiz score will not be calculated in the quiz average. 3. The weight of each score is: quiz 20%, exams 30%, and the final 50%. 4. The program will return the weighted average score and a letter grade to the student. 5. A: 91 - 100, B: 81 - 90, C: 70 - 80, F: < 70.

Answers

Answer:

In C++:

#include <iostream>

using namespace std;

int main(){

   double quiz1, quiz2, quiz3, exam1, exam2, finalexam,quiz;

   cout<<"Quiz 1: "; cin>>quiz1;

   cout<<"Quiz 2: "; cin>>quiz2;

   cout<<"Quiz 3: "; cin>>quiz3;

   cout<<"Exam 1: "; cin>>exam1;

   cout<<"Exam 2: "; cin>>exam2;

   cout<<"Final Exam: "; cin>>finalexam;

   if(quiz1<=quiz2 && quiz1 <= quiz3){        quiz=(quiz2+quiz3)/2;    }

   else if(quiz2<=quiz1 && quiz2 <= quiz3){        quiz=(quiz1+quiz3)/2;    }

   else{         quiz=(quiz1+quiz2)/2;     }

   int weight = 0.20 * quiz + 0.30 * ((exam1 + exam2)/2) + 0.50 * finalexam;

   cout<<"Average Weight: "<<weight<<endl;

   if(weight>=91 && weight<=100){        cout<<"Letter Grade: A";    }

   else if(weight>=81 && weight<=90){        cout<<"Letter Grade: B";    }

   else if(weight>=70 && weight<=80){        cout<<"Letter Grade: C";    }

   else{        cout<<"Letter Grade: F";    }

   return 0;

}

Explanation:

See attachment for complete program where comments were used to explain difficult lines

what is the correct process for setting up a recurring project for the same client in qbo accountant?

Answers

Answer:

The answer is below

Explanation:

The correct process for setting up a recurring project for the same client in Quickbooks Online Accountant is as follows:

1. Go to Work, then select create a project

2. Select the Repeat button, then set the frequency and duration

3. Formulate the project and save it.

4. Reopen the project

5. And select the Duplicate button for the proportion of times you want it to recur. This includes assigning the interval, day of the recurrence, and end time.

6. Then select Save.

Firstly, invent a separate project, then pick the repeat button on the right of the screen, specify the frequency and duration. Its frequency can indeed be weekly, biweekly, monthly, and so on.

This project's duration must be determined. This step saves the user time when working on a project. Otherwise, the same actions would have to be done again and over, which would be time-consuming and repetitive.New project and click the continue option to start the process of preparing a recurring project for the same client.This second alternative is not the best method to create a recurring project for the same client. Based on the phase, the initiatives can be generated as many times as necessary.

Therefore, the answer is "first choice".

Learn more:

brainly.com/question/24356450

Other Questions
Which multiplication equation that represents the question: how may 3/8s fits into 5/4 Which type of land usage would increase as the population increases? Write the mixed number as a percent. [tex]1 \frac{1}{4} [/tex] help me please!! a b c or d Which fraction is equivalent to 4 over -9 ? (5 points)A) 4 over 9B) -4 over -9C) 9 over 4D) -4 over 9 On a math quiz, you earn 10 points for each question answered correctly. In the equation below, x represents thenumber of questions that you answer correctly on this quiz, and y represents the total number of points you score onthis quiz. The relationship between these two variables is modeled by the equation y = 10x.What is the independent variable?A)The value of 10 in the equation.B)The total number of points scored on the exam.C)The number of questions answered correctly on the exam.D)The independent variable cannot be determined from the giveninformation. what is the slope, please 18,5 and -18, 5 Please help! Its late! Big grade! Help asap! Extra points!! select all 4 of the correct answers, and I'll give you brainliest 4. Draw Conclusions Examine lines 79-88. Describe Kennedy's shifocus Why might Kennedy make this shift n his argument?5. Cite Evidence Examine lines 112-119. Identify phrases that Kennrepeats. What ideas is he emphasizing with this repetition?6. Evaluate Considering the audience and purpose of Kennedy's speis his argument convincing? Do his conclusions anse ogically fromreasons and evidence he has cited?Speaking and ListeningListen to an audio version of President Kennedy deliver the speech Fifty grams of ice at 0 C is placed in a thermos bottle containing one hundred grams of waterat 6 C. How many grams of ice will melt? The heat of fusion of water is 333 kJ/kg and thespecific heat is 4190 J/kg K.Immersive Reader Luis counts the total number of ducks swimming on a pond each day. On Monday he counts 1 duck. On Tuesday he counts 2 ducks. On Wednesday he counts 4 ducks. On Thursday he counts 8 ducks. If the pattern continues how many ducks will Luis count on Sunday ? And what is the pattern? Rectangle ABCD went through a transformation and is now rectangle A'B'C'D'. Explain two different ways how rectangle ABCD becomes rectangle A'B'C'D'. The ratio of the measures of the sides of a triangle is 8: 15: 17, and its perimeter is 480 in.. Find the measure of the shortest side of the triangle. In MNO, the measure of O=90, the measure of N=38, and OM = 87 feet. Find the length of NO to the nearest tenth of a foot. Using the elimination method, what is the solution to the system of equations? 6x + 6y = 12 6x - 5y = 12 Use the drop-down menus to complete each statement.In Ancient Athens, _______ citizens could serve as jurors on a jury.Jurors would decide the .Citizens received ______ for serving on a jury. A great engineering triumph connected the Atlantic and Pacific Oceans.What was that waterway called?the Suez Canalthe Panama Canalthe Erie Canalthe Grand Canal What is the experimental probability of rolling a number greater than four?A 4/9B 5/18C 1/3D none of the abovehelp me please Can someone help me?What's 4/5 of 55?