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
Ierofanga [76]
3 years ago
13

Computer programming 3

Computers and Technology
1 answer:
AfilCa [17]3 years ago
5 0
The first photo of output i still need 2 posts

You might be interested in
Discuss a situation in which you might want to use a floating-point number with a fractional part for a loop control variable. W
serious [3.7K]

Answer:

1. When calculating the division of each number in some range of floating type number.

2. One cannot use real numbers for exact comparison. Two real numbers are rarely equal. Real numbers are have representational errors.

Explanation:

1. In structured programming, we make use of a floating-point number with a fractional part for a loop control variable. a given scenario is when we just want to calculate the division of each number in some range of floating type number. However, the downsides to using a floating-point number with a fractional part for a loop control variable are:

  • They can cause 'off-by-one' failure
  • A floating point number cannot represent all simple fractions exactly

2. The pitfalls of using real numbers for the index variable in a for loop:

  • Two real numbers are hardly equal
  • One cannot use real numbers for exact comparison
  • The existence of representational errors
7 0
3 years ago
_______________________ is a short-term program, typically 30 hours long, in which a therapist, social worker, or trained probat
Semenov [28]

Answer:

Functional Family Therapy

Explanation:

According to my research on different types of therapies, I can say that based on the information provided within the question the therapy being described in this scenario is called Functional Family Therapy. This is a type of therapy aimed at young teens roughly aged 11-18 who are exhibiting violent or negative behaviors and/or substance abuse. The therapist sits down with the child, their parents, and sometimes an officer of the law in order to get to the root of the problem and come up with different solutions that may help the child feel less angry and prone to act out.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

3 0
3 years ago
write a function named get majority last name that accepts as its parameter a dictionary from strings to strings the keys of the
wariber [46]

A function named get majority last name that accepts as its parameter a dictionary from strings to strings the keys of the dictionary represent first names and the values represent last names is python.

Python is a general-purpose, high-level programming language. Its design philosophy prioritizes code readability and heavily employs indentation. Python has dynamic typing and garbage collection. It supports a number of programming paradigms, including structured programming, object-oriented programming, procedural programming, and functional programming (especially this). It is frequently referred to as a "batteries included" language because of its large standard library.

In order to replace the ABC programming language, Guido van Rossum developed Python in the late 1980s. Python 0.9.0 was released in 1991.

Python 2.0, which was released in 2000, included brand-new features like list comprehensions, cycle-detecting garbage collection, reference counting, and support for Unicode.

To know more about python click here:

brainly.com/question/13437928

#SPJ4

5 0
1 year ago
How do new sources of power assist in the development of inventions?
pentagon [3]
<span>New sources of power assist in the development of inventions since t</span>he new inventions would have been worthless without a reliable source of power energy.
3 0
3 years ago
Given a vector of students, the function FinalAvg is supposed to return the average final exam score across all the students in
alexandr1967 [171]

Answer:

The C++ code is given below with appropriate comments

Explanation:

#define CATCH_CONFIG_MAIN //This tells Catch to provide a main()

#include"catch.hpp" //Header for Catch Framework

double FinalAvg( vector <int> students) // Function to calculate average.

{

double sum =0;

int i;

for( i=0;i<v.size();i++) sum+= v[i];

return v.empty() ? 0.0 : (double(sum)/ v.size());

}

vector<int> func(int argvq[ ]) // This function is made because we can not provide vector in command line argument that's why we used array which is then conerted into vector.

{

vector<int> v;

int j;

int l= sizeof(argvq)/sizeof(argvq[0]);

for(j=0;j<l;j++)

v.push_back(argq[j]);

return v;

}

TEST_CASE(" Final Average marks are computed","[func]") // TEST_ CASE macro to take one or more arguments

{

REQUIRE( func(9,5,-7) == 7); // We write our individual test assertions using the REQUIRE macro.

REQUIRE(func(2,4,6,-2) ==4);

}

Explanation Using different IDE:

#include<bits/stdc++.h>

using namespace std;

double FinalAvg(vector<int> students)

{

double sum=0;

for(int i=0;i<v.size();i++) sum+= v[i];

return v.empty() ? 0.0 : (double(sum)/v.size());

}

int main()

{

vector<int> v;

int i;

while(cin>>i&&i>0) v.push_back(i);

cout<<Final Avg(v);

return 0;

}

8 0
3 years ago
Other questions:
  • Why are many otherwise safety-conscious people victims of Internet crime?
    13·1 answer
  • Anti-bullying laws in most states are designed to provide
    14·2 answers
  • Which best explains what a credit score represents
    10·2 answers
  • What cable should i be using to connect my android tablet to the pc?
    13·2 answers
  • Hazel has just finished adding pictures to her holiday newsletter. She decides to crop an image. What is cropping an image?
    10·1 answer
  • What is computer sences​
    6·1 answer
  • What is the role of the memory in a computer ​
    11·1 answer
  • HEPME <br> ZOOM<br> IN <br> STOP<br> GIVIJG<br> ME <br> LINKS <br> !!
    9·1 answer
  • Which of the following is NOT one of the four benefits of using email?
    14·1 answer
  • Guidewords for the word “serpent” may be
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!