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
jok3333 [9.3K]
2 years ago
15

Python 3.8.2 detais

Computers and Technology
1 answer:
olga2289 [7]2 years ago
5 0

Answer:

me dont know

Explanation:

You might be interested in
The mathematical constant Pi is an irrational number with value approximately 3.1415928... The precise value of this constant ca
tatiyna

Answer:

I am writing a Python program:

def approxPIsquared(error):

   previous = 8

   new_sum =0

   num = 3

   while (True):

       new_sum = (previous + (8 / (num ** 2)))

       if (new_sum - previous <= error):

           return new_sum

       previous = new_sum

       num+=2    

print(approxPIsquared(0.0001))

Explanation:

I will explain the above function line by line.

def approxPIsquared(error):  

This is the function definition of approxPlsSquared() method that takes error as its parameter and approximates constant Pi to within error.

previous = 8     new_sum =0      num = 3

These are variables. According to this formula:

Pi^2 = 8+8/3^2+8/5^2+8/7^2+8/9^2+...

Value of previous is set to 8 as the first value in the above formula is 8. previous holds the value of the previous sum when the sum is taken term by term. Value of new_sum is initialized to 0 because this variable holds the new value of the sum term by term. num is set to 3 to set the number in the denominator. If you see the 2nd term in above formula 8/3^2, here num = 3. At every iteration this value is incremented by 2 to add 2 to the denominator number just as the above formula has 5, 7 and 9 in denominator.

while (True):  This while loop keeps repeating itself and calculates the sum of the series term by term, until the difference between the value of new_sum and the previous is less than error. (error value is specified as input).

new_sum = (previous + (8 / (num ** 2)))  This statement represents the above given formula. The result of the sum is stored in new_sum at every iteration. Here ** represents num to the power 2 or you can say square of value of num.

if (new_sum - previous <= error):  This if condition checks if the difference between the new and previous sum is less than error. If this condition evaluates to true then the value of new_sum is returned. Otherwise continue computing the, sum term by term.

return new_sum  returns the value of new_sum when above IF condition evaluates to true

previous = new_sum  This statement sets the computed value of new_sum to the previous.

For example if the value of error is 0.0001 and  previous= 8 and new_sum contains the sum of a new term i.e. the sum of 8+8/3^2 = 8.88888... Then IF condition checks if the

new_sum-previous <= error

8.888888 - 8 = 0.8888888

This statement does not evaluate to true because 0.8888888... is not less than or equal to 0.0001

So return new_sum statement will not execute.

previous = new_sum statement executes and now value of precious becomes 8.888888...

Next   num+=2  statement executes which adds 2 to the value of num. The value of num was 3 and now it becomes 3+2 = 5.

After this while loop execute again computing the sum of next term using       new_sum = (previous + (8 / (num ** 2)))  

new_sum = 8.888888.. + (8/(5**2)))

This process goes on until the difference between the new_sum and the previous is less than error.

screenshot of the program and its output is attached.

6 0
3 years ago
You are asked to install a device that will combine several connections to the Internet and provide the sum of the available net
ch4aika [34]

Answer:

load balancer.

Explanation:

Based on the scenario being described within the question it can be said that you are being asked to install a load balancer. This is a device that behaves as a reverse proxy in order to correctly and efficiently distribute all the network traffic across various servers in order to increase the amount of users that can use the server at the same time.

8 0
3 years ago
Read 2 more answers
How to change my ip address
Ostrovityanka [42]

you can use a vpn (virtual proxy network) that is the easiest way and the fastest

8 0
3 years ago
Read 2 more answers
Modify the code below to do the following:
Kitty [74]

Answer:

The code is appropriately given below with comments for better understanding

Explanation:

#include <linux/init.h>

#include <linux/module.h>

#include <linux/kernel.h>

#include <linux/hash.h>

#include <linux/gcd.h>

#include <asm/param.h>

#include <linux/jiffies.h>

/* This function is called when the module is loaded. */

static int simple_init(void)

{

  printk(KERN_INFO "Loading Module\n");

  printk(KERN_INFO "These are the HZ: %d\n", HZ);

  printk(KERN_INFO "These are the jiffies: %lu\n", jiffies);

  printk(KERN_INFO "Golden Ratio is: %lu\n", GOLDEN_RATIO_PRIME);  

  return 0;

}

/* This function is called when the module is removed. */

static void simple_exit(void) {

  printk(KERN_INFO "Removing Module");

  unsigned long a = gcd(3300, 24);

  printk(KERN_INFO "Greatest Common Denominator between 3,300 and 24 is: %lu\n", a);

  printk(KERN_INFO "These are the jiffies: %lu\n", jiffies);

}

/* Macros for registering module entry and exit points. */

module_init( simple_init );

module_exit( simple_exit );

MODULE_LICENSE("GPL");

MODULE_DESCRIPTION("Simple Module");

MODULE_AUTHOR("SGG");

7 0
3 years ago
what are some of the challenges that could arise from setting up a file management system on a computer
seropon [69]
A virus maybe or ransomware
7 0
3 years ago
Other questions:
  • If you are a driver under 21 with a breath or blood alcohol level of ____ or higher, you will be required to attend a substance
    11·2 answers
  • What standard linux utility is used to install and configure software on centos operating systems?
    8·1 answer
  • You manage an NLB cluster composed of three servers: Server1, Server2 and Server3. Your maintenance schedule indicates that Serv
    15·1 answer
  • To combat piracy, many software publishers require users to type in a(n) ____ code, a sequence of numbers and letters in order t
    10·1 answer
  • Going to Grad School! In the College of Computing and Software Engineering, we have an option for students to "FastTrack" their
    11·1 answer
  • _____________ describes the abstraction of web-based computers, resources, and services that system developers can utilize to im
    9·1 answer
  • What is not true of credit scores?
    11·1 answer
  • When specifying keywords to conduct an internet search, which of the following parts of speech will be the most useful??
    6·1 answer
  • Which of the following statements is true?A)Implicit data type conversion is performed when you mix values of different data typ
    5·1 answer
  • To excel at these professions, you need to be able to combine an eye for elegant design with a mind that delights in efficient o
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!