In Python which is the correct method to load a module math?

Answers

Answer 1

Answer: The math module is a standard module in Python and is always available. To use mathematical functions under this module, you have to import the module using import math .

Explanation:


Related Questions

Write a program that reads the student information from a tab separated values (tsv) file. The program then creates a text file that records the course grades of the students. Each row of the tsv file contains the Last Name, First Name, Midterm1 score, Midterm2 score, and the Final score of a student. A sample of the student information is provided in StudentInfo.tsv. Assume the number of students is at least 1 and at most 20.
The program performs the following tasks:
Read the file name of the tsv file from the user.
Open the tsv file and read the student information.
Compute the average exam score of each student.
Assign a letter grade to each student based on the average exam score in the following scale:
A: 90= B: 80=< X < 90
C: 70=< X < 80
D: 60=< X < 70
E: X < 60
Compute the average of each exam.
• Output the last names, first names, exam scores, and letter grades of the students into a text file named report.txt.
• Output one student per row and separate the values with a tab character.
• Output the average of each exam, with two digits after the decimal point at the end of report.txt. Hint: Use the setprecision manipulator to format the output.
Ex: If the input of the program is:
StudentInfo.tsv
and the contents of Studentinfo tsv are:
Barrett Edan 70 45 59
Bradshaw Reagan 96 97 88
Charlton Caius 73 94 80
Mayo Tyrese 88 61 36
Stern Brenda 90 86 45
the file report.txt should contain:
Barrett Edan 70 45 59 F
Bradshaw Reagan 96 97 88 A
Charlton Caius 73 94 80 B
Mayo Tyrese 88 61 36 D
Stern Brenda 90 86 45 C
Averages: midtermi 83.40, midterm2 76.60, final 61.60

Answers

#include
#include
#include
#include
#include
#include


using namespace std;

// Class student required to store the data
class Student{
public:
string lname;
string fname;
int marks[3];
char grade;

// Function which generates the grade for student
void calculate_grade(){
double sum = 0;
for(int i=0;i<3;i++){
sum+= marks[i];
}
double average = sum/3;
if(average>=90 && average<100)
this->grade = 'A';
else if(average>=80)
this->grade = 'B';
else if(average>=70)
this->grade = 'C';
else if(average>=60)
this->grade= 'D';
else this->grade = 'F';
}
};

// This function reads the file , and creates a vector of Students data
vector read_file(string fileName){

// Opening the file
fstream fin;
fin.open(fileName);


// Temp variables
vector list;
vector row ;
string line, word, temp;

// Read the data into vector
while(getline(fin,line)){
row.clear();
stringstream s(line);

while(getline(s,word,'\t')){

row.push_back(word);

}
Student st;
st.fname = row[0];
st.lname = row[1];
st.marks[0] = stoi(row[2]);
st.marks[1] = stoi(row[3]);
st.marks[2] = stoi(row[4]);
st.calculate_grade();
list.push_back(st);
}
fin.close();
return list;
}

// This function takes filname to be output as input, and list of student
void writeFile(string filename, vector list){

// Opening the new file
ofstream fin(filename);
for(int i=0;i string line = list[i].fname+"\t"+list[i].lname+"\t"+to_string(list[i].marks[0])+"\t"
+to_string(list[i].marks[1])+"\t"+to_string(list[i].marks[2])+"\t"+list[i].grade+"\n";
fin<
}


// Find the stats required
double average1 =0,average2 =0 ,average3 = 0;
for(int i=0;i average1+=list[i].marks[0];
average2+=list[i].marks[1];
average3+=list[i].marks[2];
}
average1/=list.size();
average2/=list.size();
average3/=list.size();

// Writting the stats
fin<<"\n"<<"Average: "<<"mid_term1 "<
// Closing the file
fin.close();
}
int main(){

// Taking the input
cout<<"Enter the filename: ";
string filename;
cin>>filename;
vector list;

// Reading and Writting to the file
list = read_file(filename);
writeFile("report.txt",list);


}

At what layer in the TCP/IP protocol hierarchy could a firewall be placed to filter incoming traffic by means of:

a) message content
b) source address
c) type of application​​

Answers

The answer is c) type of application

The most significant protocol at layer 3, often known as the network layer, is the Internet Protocol, or IP.The IP protocol, the industry standard for packet routing among interconnected networks, is the source of the Internet's name.  Thus, option C is correct.

What are the TCP/IP protocol hierarchy could a firewall?

Application-layer firewalls operate at the TCP/IP stack's application level (all browser traffic, or all telnet or ftp traffic, for example), and thus have the ability to intercept any packets going to or from an application. They stop different packets (usually dropping them without acknowledgment to the sender).

Firewalls are frequently positioned at a network's edge. An external interface is the one that is located outside the network, while an internal interface is the one that is located inside the firewall.

Therefore, The terms “unprotected” and “protected,” respectively, are sometimes used to describe these two interfaces.

Learn more about TCP/IP here:

https://brainly.com/question/27742993

#SPJ2

Alexis plans to stop trading once she lose 5% of her account balance, her account balance is $215.00. How much money is she willing to lose ?

Answers

Answer:

She's willing to lose $10.75.

Explanation:

$215.00 * .05 = answer

         or

$215.00 * .95 = x

$215.00 - x = answer

Write a program that generates 100 random numbers and keeps a count of how many of those random numbers are even and how many of them are odd.

Answers

Answer:

import random

numbers = []

even = 0

odd = 0

for i in range(100):

   numbers.append(random.randint(1, 200))

for i in range(100):

   if numbers[i] % 2 == 0:

       even += 1

   else:

       odd += 1

print("Even:", even)

print("Odd:", odd)

Explanation:

Gg ez.

hi hi hihihihihivvv hihihihihihi v vhi

Answers

Answer: hihihihihihiihihi hihihihiihihih

Explanation: hi.

I really need help with this question! Please help!

Answers

Answer:

(C) Emma goes to sleep late and does not set an alarm.

Explanation:

Decomposing a problem is setting a back drop inference as to (WHY?) something happens . So Emma woke up late , the only reasonable (WHY?) in this question would be (C)

explain the use of mail merge feature.
pls help​

Answers

Mail Merge is a handy feature that incorporates data from both Microsoft Word and Microsoft Excel and allows you to create multiple documents at once, such as letters, saving you the time and effort of retyping the same letter over and over.

list 3 things needed in order to complete mail merge process.



pls help me!​

Answers

There are three documents that are involved in the mail merge process:

1- the main document
2- the data source
3- the merged document.

state an application that would be better to write c++ than java and give a rationale for your answer

Answers

Microsoft Visual Studio is the best deal

check image dont answer if you dont know please

Answers

Answer:

Explanation:

1-2nd option

2-1st option

3-last option

hope this helps!! have a good rest of ur day!! <3

VPN or Proxy is safer?

Answers

Proxy chain is safer

I have a D in one of my majors, I got a lot of 70s and I'm failing music. im in middle school. Will I be held back? Please answer this

Answers

Answer:

probably sorry it will be okay

Depends on where you’re from and what grading scale is used. I wouldn’t say you’re ruined if you push hard the rest of the year.

Diane, a developer, needs to program a logic component that will allow the user to enter a series of values

Answers

The Examples Of Users:FormTableQueryThe Answers Are:Formatted summary of information from a database

User-friendly interface for adding to or retrieving information from a database

Stores raw data in a relational database

Retrieves specific information from a database. Can also be used to update, edit, and remove dataHope it helps*^-^*All Correct!?

Write a python program to calculate the sum of three numbers and as well require the user to input the numbers.​

Answers

Answer:

numbers = []

for i in range(3):

 numbers.append(eval(input("Enter number: ")))

print('Sum is:', sum(numbers))

Explanation:

You want to use a loop to prevent repeating your code.

Answer:

numbers = []

for i in range(3):

numbers.append(eval(input("Enter number: ")))

print('Sum is:', sum(numbers))

If a client must wait too long for software that works, he might attempt to add requests for more and more features to be added to the program. This is known as ________.

Answers

Answer:

scope creep

Explanation:

Your job is to protect your company's information assets. What security objectives
should you address?
1) Assets, liabilities, and threats
2) Common vulnerabilities and exposures
3) Confidentiality, integrity and availability
4) Risks, threats and vulnerabilities

Answers

Answer:3

Explanation: The CIA Triangle is the basis of all Security related needs.

Brainliest if correct. 5. if you wanted b show how many employees at your office ride a bicycle to work in
comparison to the number of employees who drive a car, take public transportation,
or walk wihat visual would be best? (1 point)

Answers

Answer:

I believe a bar graph would be best for me. What are your answer options though?

Explanation:

Question 4 A data analyst wants to include a line of code directly in their .rmd file in order to explain their process more clearly. What is this code called

Answers

A line of code that can be inserted directly into a .rmd file is called an inline code.

R Markdown (.rmd file) is a file format that is typically used for making dynamic documents by using R Studio and R programming language. Also, R Markdown files can be used in the following ways:

To save, organize, and document an executable code.To create a record of any cleaning process.To generate reports containing an executable code for stakeholders.

In R Studio, an inline code is a line of code that can be inserted directly into a R Markdown (.rmd file), in order to explain a process more clearly.

Read more on R Markdown here: https://brainly.com/question/25558534

People can use computers for sending ....... writing reports, listening to music and playing games. ​

Answers

Answer:

the answer is messages, emails, texts

Hope This Helps!!!

Answer:

People can use computers for sending   MESSAGES'TEXT'EMAILS   ,writing reports,listening to music and playing games....

A Product Manager has been given responsibility for overseeing the development of a new software application that will be deployed to a group of Accenture clients.

What would be the most time-saving and cost-effective way for the Product Manager to address the new application’s security considerations?


Utilize a DevSecOps approach to incorporate security into the development process from the beginning.


Schedule development of security features after the application’s initial release.


Design the application’s security features after the application’s initial build is complete.


Contract with an external vendor to develop a security solution separately from the main application.


I don't know this yet.

Answers

There are different software that has been developed today. The most time-saving and cost-effective way is to Design the application’s security features after the application’s initial build is complete.

Accenture is known for their work in improving business needs. They are constantly shifting to a new method of delivering information technology.

They are known to embed security into the product development life cycle helps secure the business and also keeping speed and assisting to remove friction.

Learn more about Accenture from

https://brainly.com/question/25737623

What is a shell programming? Write a shell program to get the following details from the student: NAME, AGE, USN and GENDER. Output all the details to the terminal and also display message whether the student is eligible to vote or not

Answers

Shell programs are computer programs designed to run on the Unix/Linux shell

The shell program where comments are used to explain each line is as follows:

#This gets input for NAME

read NAME  

#This gets input for AGE

read AGE  

#This gets input for USN

read USN

#This gets input for GENDER

read GENDER

#This prints the name

echo "Name: $NAME"

#This prints the age

echo "Age: AGE"

#This prints the usn

echo "USN: USN"

#This prints the gender

echo "GENDER: $GENDER"

#The following if condition determines, if the user is eligible to vote or not

if [ $USN -gt 50 ] then

echo "You are not eligible"

else

echo "You are eligible"

Read more about computer programs at:

https://brainly.com/question/13795586

what are organization tools?

Answers

an app or software created to optimize your daily task performance

13) You notice that the row labels in your spreadsheet are 1, 2, 3, 8, 9.
Row labels 4 through 7 are missing. What could cause this?

Answers

Possible reasons for missing out row 4 to 7 are as follows,

Chance of rows from 4 to 7 contain incorrect/ non formatted data.Chance of rows from 4 to 7 are in hidden state.Chance of rows from 4 to 7 are assigned to some other user which does not belongs to your current user.Chance of rows from 4 to 7 were deleted from the sheet.

These are all the possible reasons for missing of row 4 to 7.

Learn more:  https://brainly.com/question/24504878

Define Word Processing

Answers

Answer:

Word Processing refers to the act of using a computer to create, edit, save and print documents. ... Text can be inserted, edited, moved, copied or deleted within your document and the appearance of the text can be modified in numerous ways.

(a) Explain what the following Java components are used for.JListJFrameFLowLayoutJpanelJFrameEventListener(b) Write simple Java codes to illustrate how each one of the above components are implemented.​

Answers

Answer:

Welcome to Gboard clipboard, any text you copy will be saved here.

Explain if a company is responsible for using computer components manufactured using fair trade practices. [9 marks]

Answers

Answer:

Fair trade practices aims at promoting the fair relationships between the buyers and producers. It is a kind of a social movement that makes the producers to provide the better conditions and humane working environment in case of developing countries.

• It also favors and supports the proper and substantial payment to the manufacturers and wages to the labors.

• It is a trading partnership that states the manufacturers to analyze and check their supply sources or resources and provide disclosure if the materials were produced or mined in the areas of conflict or areas of extreme poverty.

Explanation:

can you mark me as brainlist

Answer:

It is a trading partnership that states the manufacturers to analyze and check their supply sources or resources and provide disclosure if the materials were produced or mined in the areas of conflict or areas of extreme poverty.

Complete the sentence based on the given information.

______ are responsible for analyzing the client business model, whereas _____ are responsible for identifying errors in the software product to confirm that it meets the client model.

Answers

Answer:

blank answer so brainly doesnt delete your question.

Explanation:

Responsible manner in video and audio conferencing​

Answers

Answer:

1.Mute yourself when not speaking.

2.Be on time.

3.Ensure your technology works correctly.

4.Use technology to fully engage remote participants.

Explanation:

Identifies 3 different companies that use Information Systems. Then for each company describe the WHAT the company actually uses, the HOW the company uses it, and the WHY the company needs to implement this system within itself.

Answers

Three companies that use information systems:

IBM:

This company has been using an information management system for transactional and database operations. It was first used in 1968. Till then the system has gone through many modifications as per the changing requirements of the company. The information system used by IBM helps in defining structure for database, an organization for data, query management, database transactions, etc.

Olive:

This company uses a health-based information system. The information system used by this company aims at offering customers and users a regularly updated information base. They can access current research and technical documents. The content is in simple language and accessible in many locations. It gives a portal-like feature that is used to provide data published by experts, key researchers, findings, etc.

Catalyte:

The information system used by this company is a blend of high technology and a diverse workforce. They offer machine learning guided information systems to train candidates, speed up their performance, and generate quality results. Their information systems offer new career options as well as opportunities to develop software using various forums, communities, etc.

The companies that use Information Systems are

Amazon IBMRRE Ventures

How does Ama.zon use information systems?

Ama.zon uses  information systems in a  lot of its business processes as it helps them to have good and improved efficiency in the the area of collection, storage, and analytics of all their customers' information.

Conclusively, IBM uses the information system for:

Keeping of customers information.communicating.Buying and selling etc.

Learn more about  Information Systems from

https://brainly.com/question/14688347


• R7.9 Write enhanced for loops for the following tasks.
a. Printing all elements of an array in a single row, separated by spaces.
b. Computing the maximum of all elements in an array.
2. Counting how many elements in an array are negative.

Answers

Answer:

a is the correct answer

Explanation:

correct me if I'm wrong hope it's help thanks

Other Questions
Select the statement that describes art appreciation. a.) Sam studies a work of art to consider the larger social context involved. b.) While studying a painting depicting a war, Theresa considers how religion and politics had an effect on how the artist illustrated the scene. c.) Erin strives to understand the story behind a work of art she was drawn to. d.) Emily enjoys a work of art she sees at a museum without considering its context or history. A parachutist's rate during a free fall reaches 165 feet per second. What is this rate in meters per second? At this rate, how many meters will the parachutist fallduring 20 seconds of free fall? In your computations, assume that 1 meter is equal to 3.3 feet. Do not round your answers. Reposting this question because of the bots sending links Hi! I'm looking for some proficient actually (accurate) responses. depending on the responses ill probably give brainliest to the most accurate one. about _______ percent of those who seek treatment for a substance use problem tend to relapse and return to using drugs or alcohol after a period of abstinence. A technician should be prepared to complete which of the following task when performing a septic technique which expression is equivalent to a+4a+8a+4a+8 please help me asappppty :D Which of the following is equivalent to 16/3 Solve the equation: 6(x-2) -2x = 4x *1 pointx= -12x = 0-12=0 no solution Lydia noticed that she felt tired and out of breath after walking her dog up a hill in the park. Which area of fitness does she need to improve? Cardiorespiratory Muscular strength Flexibility Body composition so whatllllllllllooolo In this football play the quarterback keeps the ball and goes straight ahead, behind the blocking of the center and the guards.drop backcountersneakdive Find the slope of an equation f(x)=-3sqrt(x) at the point (9,-9) What happens to mRNA after transcription ?A- It is transported to a mitochondrion for respirationB- It exits the cell through the plasma membraneC-It remains in the nucleus to begin translationD-It enters the cytoplasm and goes to a ribosome From a macroeconomic point of view, increases in ____________ are an addition to aggregate demand, while increases in ___________ are a subtraction from aggregate demand. write 15 and 40 ratio simplest form Pls help Ill brainlest ASAP Pleaseeee helpppp asappp the sun`s blank is the layer that emits visible light