Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Making a number list in a .txt file
Post: RE: Making a number list in a .txt file

Ty gruntfutuk, ty all, It works now.
kwak86 General Coding Help 13 6,255 Sep-16-2018, 09:54 PM
    Thread: Making a number list in a .txt file
Post: RE: Making a number list in a .txt file

Thanks volcano63, I also try with a for instruction but now an invalid syntax in line 10, def add_zero(nbr: str, m: int = 6) -> str: return "0" * (m - len(nbr)) + nbr with open("dico2.txt",...
kwak86 General Coding Help 13 6,255 Sep-16-2018, 05:34 PM
    Thread: Making a number list in a .txt file
Post: RE: Making a number list in a .txt file

Thanks gruntfutuk, CMD returns me an invalid syntax with the following code, neitherless no more changes in my editor def add_zero(nbr: str, m: int = 6) -> str: return "0" * (m - len(nbr)) + ...
kwak86 General Coding Help 13 6,255 Sep-16-2018, 05:00 PM
    Thread: Making a number list in a .txt file
Post: RE: Making a number list in a .txt file

Hello, Thanks for your precious help, This code seems ok excepted I cannot reach the line by adding a '\n' expression. As soon as I add a ' behind the variable in the f.write(num_str \n)line, my edi...
kwak86 General Coding Help 13 6,255 Sep-16-2018, 04:12 PM
    Thread: Making a number list in a .txt file
Post: RE: Making a number list in a .txt file

I try to change my indents decreasing the place of else, but the same error still appears. What is a padded value please, I find nothing about it on Google.
kwak86 General Coding Help 13 6,255 Sep-15-2018, 10:48 PM
    Thread: Making a number list in a .txt file
Post: RE: Making a number list in a .txt file

Thank you for answering me, I would like to keep my algorithm, how can I change the syntax for causing it works?
kwak86 General Coding Help 13 6,255 Sep-15-2018, 09:39 PM
    Thread: Making a number list in a .txt file
Post: Making a number list in a .txt file

Hello, I would like making a list of number in a file I can read with notepad. I try this: f=open("dico.txt","w") a=0 while a<=999999: if a<=99999: def add_zero(nbr: str, m: int = 6) ->...
kwak86 General Coding Help 13 6,255 Sep-15-2018, 08:59 PM
    Thread: permutations calculation with a while instruction
Post: RE: permutations calculation with a while instruct...

Thank you, Here a code which seem ok x=input('donnez un nombre') y=int(x) a=1 while y>=1: a=a*y print('Current state:', y, y-1) y=y-1 print(a)
kwak86 General Coding Help 2 2,294 Sep-10-2018, 02:09 PM
    Thread: permutations calculation with a while instruction
Post: permutations calculation with a while instruction

Hi, I wrote this code x=input('donnez un nombre') y=int(x) d=y while d>=1: y=y*(y-1) d=d-1 print(y)but for 4 in input cmd give me 298995972 instead of 24.. why? Best regards,
kwak86 General Coding Help 2 2,294 Sep-09-2018, 08:01 PM

User Panel Messages

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