Answers

Answer 1
What is question number 3

Related Questions

Consider a memory-management system based on paging. The total size of the physical memory is 2 GB, laid out over pages of size 8 KB. The logical address space of each process has been limited to 256 MB. a. Determine the total number of bits in the physical address. b. Determine the number of bits specifying page replacement and the number of bits for page frame number. c. Determine the number of page frames. d. Determine the logical address layout.

Answers

Answer:

A. 31 bits

B. 13 bits, 18 bits

C. 256k

Explanation:

A.

We have total size of physical memory as 2gb

This means that 2¹ x 2³⁰

Using the law of indices,

= 2³¹

So physical address is equal to 31 bits

B.

We get page size = 8kb = 2³

1 kb = 2¹⁰

2³ * 2¹⁰ = 2¹³

So page replacement = 13 bits

Page frame number

= physical address - replacement bits

= 31 - 13

= 18 bits

C.

The number of frames is given as

2¹⁸ = 2⁸ x 2¹⁰ = 256K

So number of frames = 256K

D

Logical add space is 256K

Page size= physical pages = 8kb

Logical address layout= 28biys

Page number = 15 bits

Displacement = 12 bits

256k/8k = 32 pages in address space process

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")

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.


2. Which of the following is a shortcut key to Exit from any operation?
a) Ctrl+R
b) Ctrl+Q
c) Ciri-Y

Answers

Answer:

Its b) Ctrl+Q. Hope it helps.

Explanation:

Answer:

ctrl r

Explanation:

ctrl r is redo

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))

Which of the followings is/are true about RISC (Reduced instruction set computing)?

a. RISC (Reduced instruction set computing) architecture has a set of instructions, so high-level language compilers can produce more efficient code
b. It allows freedom of using the space on microprocessors because of its simplicity.
c. Many RISC processors use the registers for passing arguments and holding the local variables.
d. RISC functions use only a few parameters, and the RISC processors cannot use the call instructions, and therefore, use a fixed length instruction which is easy to pipeline.
e. All of the above.

Answers

Answer:

e. All of the above.

Explanation:

An instruction set architecture (ISA) can be defined as series of native memory architecture, instructions, addressing modes, external input and output devices, virtual memory, and interrupts that are meant to be executed by the directly.

Basically, this set of native data type specifies a well-defined interface for the development of the hardware and the software platform to run it.

The two (2) main types of architectural design for the central processing unit (CPU) are;

I. Complex instruction set computing (CISC): it allows multi-step operation or addressing modes to be executed within an instruction set. Thus, many low-level operations are being performed by an instruction.

II. Reduced instruction set computing (RISC): it allows fixed length instructions and simple addressing modes that can be executed within a clock cycle.

All of the following statements are true about RISC (Reduced instruction set computing) because they are its advantages over complex instruction set computing (CISC);

a. RISC (Reduced instruction set computing) architecture has a set of instructions, so high-level language compilers can produce more efficient code.

b. It allows freedom of using the space on microprocessors because of its simplicity.

c. Many RISC processors use the registers for passing arguments and holding the local variables.

d. RISC functions use only a few parameters, and the RISC processors cannot use the call instructions, and therefore, use a fixed length instruction which is easy to pipeline.

The options that are true about RISC (Reduced instruction set computing) is; E: all of the above

We are dealing with instruction set computing which is a sequence of instructions, addressing modes, external input & output devices, virtual memory, and other interruptions that are designed to be executed by the user directly.

Now, in architectural design meant for the central processing unit (CPU) the benefit of a Reduced instruction set computing (RISC) is that it is a type that allows for a fixed length of instructions with simple addressing styles that can be executed within a clock cycle.

Looking at all the given options, we can say they are all true about RISC (Reduced instruction set computing) as they possess advantages over the other type of instruction set computing called complex instruction set computing (CISC).

Read more about instruction set computing at; https://brainly.com/question/17493537

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.

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:

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. 

In order to restrict editing to a document, a user will go to Review, , Restrict Editing, and will then select what kinds of editing are allowed.

Answers

Answer: drafting

Explanation:

Do any of these algorithms (Random Allocation, Round-Robin, Weighted Round-Robin, Round-Robin DNS Load Balancing, and Least Connections) compromise security?

Answers

Answer:

yes and

Explanation:

why do you need to know about a buildings security are you going to rob it ???

______________ 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

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

2. What is the implication of media killings in the Philippines?​

Answers

Answer:

Throughout the clarification below, the description of the query is mentioned.

Explanation:

In the Philippines, the Implication of media indicates that perhaps the Philippines isn't a safe environment for reporters, and therefore more remains to be improved to change this pattern.But it didn't start underneath Duterte before you could even say that, as well as he didn't order strikes. If he had instructions in which he would criticize, for perhaps a long period presently Ressa had died as one of his other very resolute and influential media commentators.

why must a satellite have distinct uplink and downlink frequencies.​

Answers

Answer:

The reason that a satellite must have a distinct uplink and downlink set of frequencies is because they help avoid any type of interference that may occur. The uplink receives the signal and amplifies it so that it can be transmitted to another frequency (downlink).

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:

Which of the following are features of the HTTPS protocol?

Answers

Answer:

All traffic is encrypted. No one on your network can see what is going on (except for knowing where those packets are going to).

The identity of the remote server can be verified using certificates. So you also know that it really is your bank that you are talking to.

Optionally (and not in wide-spread use), the identity of the client can also be verified using certificates. This would allow for secure login to a site using chip cards instead of (or in addition to) password

Hyper Text Transfer Protocol (HTTP) and Secure HTTP are the same protocol from a standpoint of passing or blocking them with a firewall is false.

What are HTTP's (Hyper Text Transfer) fundamental features?

Basic HTTP (Hyper Text Transfer) is the Characteristics. It has the protocol that has enables communication in between web browsers and the servers. It has the protocol for the requests and answers. By default, it connects to the secure TCP connections on port 80.

Hypertext Transfer Protocol Secure (HTTPS) is an add-on to the Hypertext Transfer Protocol. It has been used for safe communication over a computer network and is widely used on the Internet. In HTTPS, the transmit protocol is encrypted using Transport Layer Security(TLS) or, formerly, Secure Sockets Layer(SSL).

The difference between HTTPS uses TLS (SSL) to encrypt normal HTTP requests and responses. HTTPS is the secure version of HTTP, which is the primary protocol used to send data between a web browser and a website.

Learn more about HTML files on:

https://brainly.com/question/10663873

#SPJ3

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

- 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:

,

Look at the following assignment statements:

word1 = "rain"
word2 = "bow"

What is the correct way to concatenate the strings?

1 newWord = word1 == word2

2 newWord = word1 + word2

3 newWord = word1 * word2

4 newWord = word1 - word2

Answers

Answer: number 2 is the correct way to do it

Explanation:

Answer:

2 newWord = word1 + word2

Explanation:

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:

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

Answers

Answer:

supercomputer, mainframe, personal computer, minicomputer

Explanation:

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.

As the network engineer, you are asked to design a plan for an IP subnet that calls for 25 subnets. The largest subnet needs a minimum of 750 hosts. Management requires that a single mask must be used throughout the Class B network. Which of the following lists a private IP network and mask that would meet the requirements?

a. 172.16.0.0 / 255.255.192.0
b. 172.16.0.0 / 255.255.224.0
c. 172.16.0.0 / 255.255.248.0
d. 172.16.0.0 / 255.255.254.0

Answers

Answer:

c. 172.16.0.0 / 255.255.248.0

Explanation:

The address will be 172.16.0.0 while the netmask will be 255.255.248.0.

Thus, option C is correct.

Write the function evens which takes in a queue by reference and changes it to only contain the even elements. That is, if the queue initially contains 3, 6, 1, 7, 8 then after calling odds, the queue will contain 6, 8. Note that the order of the elements in the queue remains the same. For full credit, no additional data structures (queues, stacks, vectors, etc.) should be used. Assume all libraries needed for your implementation have already been included.

Answers

Answer:

Explanation:

The following code is written in Java it goes through the queue that was passed as an argument, loops through it and removes all the odd numbers, leaving only the even numbers in the queue. It does not add any more data structures and finally returns the modified queue when its done.

  public static Queue<Integer> evens(Queue<Integer> queue) {

       int size = queue.size();

       for(int x = 1; x < size+1; x++) {

           if ((queue.peek() % 2) == 0) {

               queue.add(queue.peek());

               queue.remove();

           } else queue.remove();

       }

       return queue;

   }

Which are technical and visual demands
that need to be considered when
planning a project?

Answers

Answer: Resolution or DPI, deliverables, and file types are important technical and visual demands to consider when planning a project.

Explanation: Keep in mind whether or not the project will be published in print or on the Web.

In cell 14, calculate


the profit by


subtracting the


donation from the


streaming revenues.

Answers

Answer:

See Explanation

Explanation:

The question is incomplete as the cells that contains donation and streaming revenues are not given

So, I will make the following assumption:

H4 = Donations

G4 =  Streaming Revenues

So, the profit will be:

Enter the following formula in cell I4

=(G4 - H4)

To get the actual solution in your case, replace G4 and H4 with the proper cell names

In a database table, the category of information is called ______________
Question 2 options:


Record


Tuple


Field


None of the above

Answers

Answer:

the answer is A.) A record

Explanation:

In database, the category of information is A. Record.

What is a database?

A database simply means the collection of information that can be accessed in future. This is important to safeguard the information.

In this case, in a database table, the category of information is called a record. This is vital to keep documents.

Learn more about database on:

https://brainly.com/question/26096799

An expression that returns a value is known as a​

Answers

Answer:

In computer programming, a return statement causes execution to leave the current subroutine and resume at the point in the code immediately after the instruction which called the subroutine, known as its return address. The return address is saved by the calling routine, today usually on the process's call stack or in a register. Return statements in many languages allow a function to specify a return value to be passed back to the code that called the function.

An expression that returns a value is known as a​ function. Check more about function  below.

What is a function?

A function is often seen as a kind of expression or rule, or law that often tells more about a relationship.

Conclusively, a function is known to often returns a value back to the instruction that is known also to be the function. This is regarded as the differences that exist between a method and a function.

Learn more about function  from

https://brainly.com/question/20476366

We can easily improve the formula by approximating the area under the function f(x) by two equally-spaced trapezoids. Derive a formula for this approximation and implement it in a function trapezint2( f,a,b ).

Answers

Answer:

Explanation:

[tex]\text{This is a math function that is integrated using a trapezoidal rule } \\ \\[/tex]

[tex]\text{import math}[/tex]

def [tex]\text{trapezint2(f,a,b):}[/tex]

      [tex]\text{midPoint=(a+b)/2}[/tex]

       [tex]\text{return .5*((midPoint-a)*(f(a)+f(midPoint))+(b-midPoint)*(f(b)+f(midPoint)))}[/tex]

[tex]\text{trapezint2(math.sin,0,.5*math.pi)}[/tex]

[tex]0.9480594489685199[/tex]

[tex]trapezint2(abs,-1,1)[/tex]

[tex]1.0[/tex]

In this exercise we have to use the knowledge of computational language in python to write the code.

the code can be found in the attachment.

In this way we have that the code in python can be written as:

   h = (b-a)/float(n)

   s = 0.5*(f(a) + f(b))

   for i in range(1,n,1):

       s = s + f(a + i*h)

   return h*s

from math import exp  # or from math import *

def g(t):

   return exp(-t**4)

a = -2;  b = 2

n = 1000

result = Trapezoidal(g, a, b, n)

print result

See more about python at brainly.com/question/26104476

Other Questions
Suppose you can factor x^2 + bx + c as (x + p)(x + q). If c > 0, what could be possible values of p and q?a. p = 5, q = -8b. p = -2, q = 6c. p = -4, q = -7d. p = -13, q = 1 How do you get infinitely many solution? The molar mass of CO2 is 44g/mol. How many grams are in 3 mol CO,? Why did zebra got taught a lesson more successfully? Find the length of a side of a square if its area is:0.49 square units need this asap please Which sentence from the article shows theMAIN problem scientists face when trying totest a parachute on Earth that will be used onMars? 3) Miriam is playing a game with her friends. As part of the game, each player spins a spinner on their turn. The probability that Miriam will spin a 4 on her next turn in . Which statement describes the probability that Miriam will spin a 4 on her next turn?a. likely b. certain c. unlikely d. impossible Why is word choice important in poetry? Which quadratic relation has a y-intercept of 8?O y = 0.5(x + 2)(x + 4)O y = 0.5 (x - 2)(+ 8)O y = 0.5(x2 -2x - 16)O y = 0.5 (x2 -2x + 16) hey pleaseeeeeeeeeeeeeeeeeeeeeeee How can Alan use Utilitarianism to resolve the dispute between Bob and Coot? Your answer should determine who will be affected by Alan's decision how they will be affected how Alan can resolve the issue to produce the greatest balance of happiness over unhappiness for everyone affected by his decision Your answer should be about 250 to 400 words. Solve for p: 1/2p=24And Solve for the variable t in the following equation19+t=23HELP please I'm taking a test!!!!!!!! the price paid for $60 jeans after a 35% discount is applied Which best represents the reaction of calcium and zinc carbonate (ZnCO3) to form calcium carbonate (CaCO3) and zinc? Ca ZnCO3 + CaCO3 Zn Ca + ZnCO3 CaCO3 + Zn CaCO3 + Zn Ca + ZnCO3 CaCO3 + Zn + Ca ZnCO3 Why was Mali a major West African power? Which pair of angles I corresponding angles?1. Angles R and V2. Angles R and S3. Angles R and U 4.Angles R and Y PLS HELP!!! Graph the image above after a translation of 5 units right and 3 units down. Animal cells perform functions using energy that is derived from glucose ( C 6 H 12 O 6 ) . Which molecule is required for animal cells to obtain the MOST energy possible from a molecule of glucose? Which of the following numbers is a perfect square?1 4892 4853 4904 484