17 Topics

Member Avatar for
Member Avatar for simplysach

in my i.t lesson we were intoduced to 'raspberry pi' within 'Python' and for my homework i have to explain what we did in the lesson. It says i have to include what 'input' is when coding a programme. Please help and reply as soon as possible and keep in …

Member Avatar for Schol-R-LEA
0
321
Member Avatar for breezett93

Hi Everyone, For a couple weeks, I have been developing a pi approximation program and making little upgrades. Right now, the program asks for an input of iterations and then prints out the approximation. Now, I want to have every iteration printed out into an excel file with an approximation …

Member Avatar for duskoKoscica
0
221
Member Avatar for laleh.97

 We estimate pi.  We assume as in Figure 10 is a side of the square.  The first type, which defines a function IsInCircle Quadrant is the point or not.  intIsInCircle (floatx, floaty);  The number of random points that are inside the square, the Number of …

Member Avatar for rubberman
0
223
Member Avatar for ddanbe

Tadaa! This is my first attempt at writing in Python, trying to solve a good question posed [here](http://www.daniweb.com/software-development/python/threads/32007/projects-for-the-beginner/17#post2016892) #----------------------------------------------------------------------------------------------- # # Python 2.7 # # Calculating area and radius of polygons with known number of sides and the length of this side # Adapted formulas used from this site: http://www.mathwords.com/a/area_regular_polygon.htm …

Member Avatar for vegaseat
1
380
Member Avatar for happygeek

The news wires have been buzzing over the weekend after it emerged that the Raspberry Pi website had been hit by a 'million zombie' Distributed Denial of Service (DDoS) attack during the week. Although the outage was relatively brief, with the Raspberry Pi Foundation admitting the attack with a Twitter …

Member Avatar for LastMitch
1
1K
Member Avatar for fasna

Write a function estimatePi() to estimate and return the value of Pi based on the formula found by an Indian Mathematician Srinivasa Ramanujan. It should use a while loop to compute the terms of the summation until the last term is smaller than 1e-15. The formula for estimating Pi is …

Member Avatar for fasna
0
717
Member Avatar for rosechen

I have to wirte a code for monte carlo pi approximation for a menu driven calculator. here is my code but when i run it it shows me 1 instead of the pi value. can someone tel me what is wrong. double approximatepi(void) { double x,y,z,pi,randomnumber; double r,p,in; int tries; …

Member Avatar for WaltP
0
165
Member Avatar for thecoolman5

hi, I already know how to use setprecision but the function wont let the round go up past 16. [CODE]#include<iostream> #include<stdio.h> #include<math.h> #include<iomanip> using namespace std; int main () { double pi = 3.14159265358979323846264338327950288419716939937510; cout << setprecision(50) << pi << endl; system("pause"); } [/CODE] the output is just 3.1415926535897931 the …

Member Avatar for raptr_dflo
0
3K
Member Avatar for totalanonymity

The homework question said to rearrange statements and remove part of code that made it calculate incorrectly. I'm lost on this and have been searching multiple places and trying different things. This is a beginning C++ class, too, so, for homework in the first half I can't very well be …

Member Avatar for totalanonymity
0
200
Member Avatar for TrustyTony

Little clean up of vegaseat's code for generating pi decimals. Added number of decimals desired and string type return for easy use with ''.join()

Member Avatar for TrustyTony
1
612
Member Avatar for penguino138

Ok so i want to make a program that calculates pi. Ive done that already but it only gives me so many decimal places. I want it to give me tons. Im using Dev C++ if that helps too. Here's my code: [CODE] #include <iostream.h> #include <math.h> int main() { …

Member Avatar for Derek Elensar
0
887
Member Avatar for akase2010

Your task is to write a main program which asks the user for an error value and then calls a function CalculatePi (error) which returns an approximate value of π. The function CalculatePi should use a loop to calculate the above series (*). It should keep two values, currentApproximation and …

Member Avatar for pseudorandom21
-6
108
Member Avatar for akase2010

Im new to c++ and this is our first assignment. I dont even know where to start. Help! Your task is to write a main program which asks the user for an error value and then calls a function CalculatePi (error) which returns an approximate value of π. The function …

Member Avatar for VernonDozier
-1
167
Member Avatar for fereak

Hey, I'm a student, doing VB at college. I've been trying to make a program to compute Pi, and am making good progress, I think I know what to do. However, part of the algorithm requires me to cube a number. The way I'm doing it is having stored the …

Member Avatar for fereak
0
178
Member Avatar for ppl154

i need some help on my pi approximation it's really slow. compile it and see for your self. i think my problem is with my math. it comes out with the wrong first few numbers. i'm trying to use gregory's formula or the advanced version of it.[CODE]#include <iostream> #include <conio.h> …

Member Avatar for Salem
0
133
Member Avatar for Cap'nKirk

Hi, I am trying to build a simple calculator to get x^y, I have found that the '^' symbol is not used in C# and I have to use 'Math.Pow' instead. I have a form with 2 text boxes for input, an rtf box for output and a button for …

Member Avatar for Cap'nKirk
0
373
Member Avatar for vegaseat

This is an update of an earlier version. In this version the string containing the approximated pi value is created directly from the iteration of the generator. This way the program is simplified and can be used with Python2 and Python3 ...

1
545

The End.