Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Dictionary to .txt or .csv file
Post: Dictionary to .txt or .csv file

Hello Everyone, I have been struggling with this assignment for quite sometime. I am attempting to take my code with the dictionary created but I need to take the dictionary data and place it into a ...
stanthaman42 Homework 9 4,645 Aug-07-2018, 08:46 PM
    Thread: Dictionary to .txt or .csv file
Post: RE: Dictionary to .txt or .csv file

(Aug-07-2018, 07:00 PM)Vysero Wrote: (Aug-07-2018, 06:01 PM)stanthaman42 Wrote: need to complete this today... Is this homework? Why are you just coming here today if its due today lol? Unfortunat...
stanthaman42 Homework 9 4,645 Aug-07-2018, 07:04 PM
    Thread: Dictionary to .txt or .csv file
Post: RE: Dictionary to .txt or .csv file

(Aug-07-2018, 05:45 PM)Vysero Wrote: Well in general if you want to convert a working python dictionary to a csv file I would suggest you use the 'csv' module, look here: https://www.idiotinside.co...
stanthaman42 Homework 9 4,645 Aug-07-2018, 06:01 PM
    Thread: Dictionary to .txt or .csv file
Post: RE: Dictionary to .txt or .csv file

(Aug-07-2018, 05:31 PM)Vysero Wrote: @stanthaman42 Could you please explain with specifically what you are having problems with? ie what is your error code? I am not necessarily getting an error, wh...
stanthaman42 Homework 9 4,645 Aug-07-2018, 05:39 PM
    Thread: Dictionary to .txt or .csv file
Post: Dictionary to .txt or .csv file

I have been struggling with this code for some time. I have created a dictionary to be used within python but I want to be able to take that dictionary from the following code and be able to make a .t...
stanthaman42 Homework 9 4,645 Aug-07-2018, 05:05 PM
    Thread: Python output into .txt or .csv file
Post: RE: Python output into .txt or .csv file

(Jul-17-2018, 04:46 PM)ichabod801 Wrote: Well, find_maxPrimes returns an int. You need to convert that to a str before you can write it to a file, like the error says. You can do this with the str()...
stanthaman42 General Coding Help 3 2,525 Jul-17-2018, 05:47 PM
    Thread: Python output into .txt or .csv file
Post: Python output into .txt or .csv file

My current Code is below. I am attempting to take my outputs from this code and place it into a .txt or .csv file. When I run this, I am getting the error "write() argument must be str, not int" -- d...
stanthaman42 General Coding Help 3 2,525 Jul-17-2018, 04:32 PM
    Thread: Help Editing/Problem with outputs
Post: RE: Help Editing/Problem with outputs

(Jul-11-2018, 04:37 PM)ichabod801 Wrote: The if clause should go after line 35. If you have the primes in a list p that is a global variable, you can just do: def isPrime(i): return i in pNote...
stanthaman42 General Coding Help 7 4,173 Jul-11-2018, 05:05 PM
    Thread: Help Editing/Problem with outputs
Post: RE: Help Editing/Problem with outputs

(Jul-11-2018, 01:59 PM)ichabod801 Wrote: You could add: if i < 2: return FalseHowever, note that you are checking the same numbers over and over again to see whether they are prime. I would ...
stanthaman42 General Coding Help 7 4,173 Jul-11-2018, 04:31 PM
    Thread: Help Editing/Problem with outputs
Post: RE: Help Editing/Problem with outputs

(Jul-11-2018, 01:13 AM)ichabod801 Wrote: isPrime is counting 0 and 1 as prime. Neither are prime. What Is the best way to fix that without causing issues with other aspects of the data?
stanthaman42 General Coding Help 7 4,173 Jul-11-2018, 04:38 AM
    Thread: Help Editing/Problem with outputs
Post: Help Editing/Problem with outputs

Hello there. I am Currently working on a program that produces every number (1000-9999) and their prime permutations(single, double, triple, and quadruple digit numbers). When I print my output, it is...
stanthaman42 General Coding Help 7 4,173 Jul-10-2018, 09:28 PM

User Panel Messages

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