Reputation: 0 Apprentice
- New Members
- Active Posts:
- 6 (0.01 per day)
- 28-June 12
- Profile Views:
- Last Active:
- Jul 09 2012 01:01 PM
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Favorite Gaming Platform:
- Your Car:
- Dream Kudos:
Posts I've Made
Posted 9 Jul 2012Then you should post your problems here, as soon as you can. We dont know the due date of your assignments. If we can, we will help you. You might want to get a book on Pyhon.
Thank you...!! I'll do that with better communication...
btw for clarification, when you say "post problems here" you are referring to the "Python" forum and not on this thread... yes?
Posted 9 Jul 2012What problems do you have. Post them here and we might be able to help you.
They are more along the lines of homework assignments. I was hoping for more one on one explainations without a "long" wait time (sort of speaking). I posted one assignment, and the help I received was excellent (pointed me in the right direction) - but didn't get to work with it before it was due...
Posted 8 Jul 2012Here is the solution to the problem posted by the instructor...
import math def main(): print("This program prints out a sequence of integer numbers.") print("Each integer is the square root of previous two rounded") print("to the closest whole number.") a, b = eval(input("Please enter the first two integers: ")) L = eval(input("Please enter the length of the sequence: ")) print("The output sequence is: ") print(a) print(B)/> for i in range(L-2): c = round(math.sqrt(a**2 + b**2)) print(c) a = b b = c main()
I haven't posted my final code, but came close... Thank you BloodyInari!!! Thank you again!
Posted 29 Jun 2012Hi, I'm trying to figure this problem.
This program is to get a list (a sequence) of numbers using a given equation, but once it's calculated, the intial two numbers aren't listed...
import math def main(): print ("This program prints a sequence of integer numbers using given square root equation." x, y = eval(input("Please enter the first two integers in sequence:")) z = math.sqrt (x**2 + y**2) n=int(input("Input the length of the sequence:")) for i in range(n): x, y = y, math.sqrt (x**2 + y**2) print ((y)) main()
I worked out a couple bugs but I'm having trouble implementing a couple suggestions... any help will be much appreciated.
import math def main(): print ("This program prints a sequence of integer numbers using given square root equation.") print ("Please enter the first two integers in sequence:") x, y = eval(input()) n=eval(input("Input the length of the sequence:")) print ("The Integer Sequence is:") for i in range(n): z = math.sqrt (x**2 + y**2) print (round(z)) x=y y=z main()
The suggestions are:
-need to loop n-2 times and have the first two integers are printed before the for loop
-need to store the rounded values of variables a and b using multiple assignment instead of storing the non-integer value
again, any help will be much appreciated...!!! Thank you in advance
- Member Title:
- New D.I.C Head
- Age Unknown
- Birthday Unknown
- Programming Languages:
- ...trying to learn python...
- Click here to e-mail me
crowdedchef hasn't added any friends yet.