Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: variable referenced before assignment
Post: RE: variable referenced before assignment

Thanks guys, as you advised I assigned the variable inside that second function and I put a while loop after that, and it worked. def main(): number = int(input("Insert the number:")) if numbe...
Niko047 Homework 4 22,979 Aug-04-2017, 04:23 PM
    Thread: variable referenced before assignment
Post: variable referenced before assignment

Hey guys, I was trying to write a function that takes as an argument a number, and according to Newton's formula that states we can estimate the square root of a number by trying several times to "est...
Niko047 Homework 4 22,979 Aug-02-2017, 09:43 PM
    Thread: Easy script problem
Post: RE: Easy script problem

(Jul-22-2017, 03:13 PM)ichabod801 Wrote: Did I say there was anything wrong with the for loops? No. The for loops are fine. In fact that while loop is going to cause you problems, because you have n...
Niko047 Homework 5 3,956 Jul-22-2017, 03:33 PM
    Thread: Easy script problem
Post: RE: Easy script problem

(Jul-22-2017, 01:10 PM)ichabod801 Wrote: It's mainly an indentation problem. You have an outer loop that loops through the distances. You have an inner loop that loops through the characters in the ...
Niko047 Homework 5 3,956 Jul-22-2017, 02:58 PM
    Thread: Easy script problem
Post: Easy script problem

Hey guys, it's me again. As an exercise, I was trying to write a script that "encrypts" a message crypted using  distance x (Caesar's code) and ASCII   code( 32 to 127). I wanted to write a script tha...
Niko047 Homework 5 3,956 Jul-22-2017, 12:38 PM
    Thread: Problem with a simple script
Post: RE: Problem with a simple script

Oh, thanks! Yeah, I first wrote that in Italian and then I translated it, guess I forgot to change some of the words.
Niko047 Homework 2 3,340 Jul-21-2017, 09:02 PM
    Thread: Problem with a simple script
Post: Problem with a simple script

Hi guys! I'm learning python from Kenneth A Lambert's book, and I'm stuck in this exercise. The book asks me to write a script that crypts a message using ASCIIs. I wrote two scripts, one to crypt the...
Niko047 Homework 2 3,340 Jul-21-2017, 08:37 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020