Python

Moderators: None (Apply to moderate this forum)
Number of threads: 477
Number of posts: 1160

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Need help with python assigments as sooon as possible Posted by grb215 on 28 Mar 2011 at 10:03 AM
I'm having some trouble with these exercises with posting the square root especially for #2. I can't get it to continue as a loop to figure out the rest of the roots. I'm entirely sure how to go about #3 at all.


#2.) Create a function that accepts a number larger than 2. The function
should return the number of times we should take sqrt of the number
until then number is strictly less than 2.

The main function keeps asking number from the key board. If you
want another number you say 'y' and if not any other letter.

As long as the answer is yes, ask for another number from the key-
board. For each number you apply the function that computes the
above. Then you have to print the input and what is the number of
times we needed to take a sqrt of this number to bring the input into
a number strictly less than 2.

What would be the result if we ask for the number of times we do:
n = n(1/4) until the number is strictly less than 2?


3.)Write a program that finds two digit A and B (dont search the web,
and dont try 'manually') so that we get a two digit number AB (say
A = 9, B = 8 then the number is 89) and so that AB *AB = CAB for
some digit C. Thus if you square AB you get a 3 digit number. The
two last digits in AB^2 are AB but the first digit is some C that may
not related necessarily to A or B.

Report
Re: Need help with python assigments as sooon as possible Posted by GyronMkwebo on 31 Mar 2011 at 7:48 AM
Do you know the concept of recursion? I hope that gives you a hint. And please, write some code to show effort so we can really help you from there.It also helps you develop as a programmer
Report
Re: Need help with python assigments as sooon as possible Posted by friska on 5 Apr 2011 at 4:53 AM
are you still looking?



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.