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
Jobisdone [24]
3 years ago
8

It is an array containing information such as headers, paths and script locations wherein it is created by the web server itself

Computers and Technology
1 answer:
Naddik [55]3 years ago
4 0

Answer:

c. $_SERVER

Explanation:

$_SERVER is an array in PHP containing information about headers, paths, and script locations.

Example usage:

echo $_SERVER['HTTP_HOST'];

This will print information about HTTP_HOST header.

echo $_SERVER['DOCUMENT_ROOT'];

This provides information about document root path.

echo $_SERVER['SCRIPT_FILENAME'];

This provides information about the currently executing script.

You might be interested in
Effective nonverbal communication can cause tension.<br><br> True or False
agasfer [191]

Explanation:

When your nonverbal signals match up with the words you're saying, they increase trust, clarity, and rapport. When they don't, they can generate tension, mistrust, and confusion.

4 0
3 years ago
Let's now use our new calculator functions to do some calculations!
Sophie [7]

Answer:

Ans1.

double calc_a;

calc_a=Math.pow(3.0,2.0)+Math.sqrt(9);

Ans2.

double calc_b;

calc_b=((12.0/3.0)-(2.0*4.0));

Ans 3.

double calc_c;

calc_c=(Math.sqrt(16.0)*(7.0+9.0));

Ans 4.

double calc_d;

calc_d=Math.pow(7.0,2.0)/Math.sqrt(49.0);

Explanation:

The expressions are done with Java in answer above.

6 0
3 years ago
This program is to compute and write to a file the GPA for student scores read from an input file. The point values of the grade
VARVARA [1.3K]

Answer:

#Take input from the user

filename=input('Enter name of input file: ')

total_units=0#Total number of units for a student

total_score=0#Total score of a student

#Assign a score to each grade. I have reduced 0.33 for each grade. Change here if you need to

grade={'A':4.0,'A-':3.67,'B+':3.34,'B':3.01,'B-':2.68,'C+':2.35,'C':2.02,'C-':1.69,'D+':1.36,'D':1.03}

try:

with open(filename,"r") as input_file:#Open the file for input(reading)

output_file=open("GPA_output.txt","w") #Create and open GPA_output.txt if it doesn't exist for writing

for student_record in input_file:#read from input file

if("," in student_record):#if there is a , that means this is the student name

student_name=student_record.strip('\n')#Remove \n from student name

continue

else:

if(" " in student_record):#If a line contains spaces then its the student's grades for a course

student=student_record.split(" ")#Split to find the coursename, units and grade

#student[0]=coursename student[1]=units student[2]=grade

total_units+=int(student[1])#Calculate total units for 1 student

total_score+=int(student[1])*grade[student[2].strip('\n')]#Find the total score of a student

#grade[student[2]] will lookup for the score that we initialized earlier

#if student has a grade as A then this will look up as grade['A'] which will return 4

#Find the total score as product of this grade and units for this course

continue

else:

if(total_units>0):#Check if score has been calculated for a student earlier

print("in")

GPA=total_score/total_units#Calculate the GPA

output_file.write("%-26s%.2f\n" % (student_name, GPA))#Write the GPA and Student Name in the required format

total_units=0#reset the units

total_score=0#reset the score

if(total_units>0):#Essential for the case when the file doesn't end with a new line(Check if total_units is not 0) which means a record is pending

#to be written to the file

GPA=total_score/total_units#Calculate the GPA

output_file.write("%-26s%.2f\n" % (student_name, GPA))#Write the GPA and Student Name in the required format

total_units=0#reset the units

total_score=0#reset the score

input_file.close()#Close the input file

output_file.close()#Close the output file

except IOError as e:

print("Problem in Opening the required file")#Print a message if file cannot be opened

Explanation:

The program has been tested for all 3 scenarios mentioned i.e.

a. If the file ends without \n

b. If the file ends with 2 \n

c. If the file ends with 1 \n

PS: The Program will run irrespective of how it ends. Even if there are many \n at the end of file, the program will be fine.

3 0
3 years ago
Explain how a message is transmitted from one computer to another using layers.
nevsk [136]
I need some answer chouices but they use iphones
7 0
3 years ago
Your trying to convince your school that brainly.com is the most effective method to a good tutor and A quick responding site, H
viktelen [127]
I would agree with that Brainly.com is a good place if you need help with homework.
6 0
3 years ago
Other questions:
  • What is the last step in conducting url search
    11·1 answer
  • Clip art, by default, is formatted as a(n) ____, which cannot be moved to a precise location on a page.
    14·1 answer
  • Enhancing and optimizing customer retention and loyalty is a major business strategy.
    15·1 answer
  • design the psuedocode for a program that allows a user to enter 10 numbers, then displays them in the reverse order of their ent
    6·1 answer
  • What is ment by creative middle way solution
    6·1 answer
  • On the seventh day of the iteration, the team realizes that they will not complete 5 of the 13 stories. the product owner says s
    12·1 answer
  • What is the use of form in HTML​
    12·1 answer
  • Write a statement that defines a double variable named result, initialized with the value 6.759.
    5·1 answer
  • What is the exclusive legal right granted to all authors and artists that gives them sole ownership of their work to print, publ
    5·2 answers
  • An IPv4 address has 32 bits, so there are 232 (over 4 billion) possible IPv4 addresses. Since the Internet is gaining devices qu
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!