Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: A loop for autocompile LaTeX file takes high CPU
Post: A loop for autocompile LaTeX file takes high CPU

I tried to make a program to autocompile a LaTeX document on Linux Mint whenever the file changes. My effort is as follows: import subprocess import sys import time from datetime import datetime # T...
meknowsnothing General Coding Help 1 950 Jun-24-2022, 12:29 PM
    Thread: How to call bash on Python and put the result to the variable?
Post: RE: How to call bash on Python and put the result ...

I tried with some data from https://www.ohjelmointiputka.net/tiedostot/mpera.zip This is what I wrote import subprocess cases=['hfhfggccaggccagccafff', 'cdddccdcccccddcddddcdcccccdcccdcddcddd...
meknowsnothing Homework 4 2,744 May-28-2020, 07:31 PM
    Thread: How to call bash on Python and put the result to the variable?
Post: How to call bash on Python and put the result to t...

Could anyone help me to solve the question on https://www.ohjelmointiputka.net/postit/...nnus=mpera In English, it goes like this. Given a string S, find the longest string s such that s concatenated...
meknowsnothing Homework 4 2,744 May-27-2020, 03:52 PM
    Thread: How to simplify square finding program?
Post: RE: How to simplify square finding program?

The code can be found on https://github.com/minkkilaukku/square-p...qPackMB.py . Just modify the lines M=13 N=9.
meknowsnothing General Coding Help 3 2,919 Jun-11-2019, 08:20 PM
    Thread: How to collect all integers with minimum number of rounds?
Post: RE: How to collect all integers with minimum numbe...

(Jun-11-2019, 07:48 PM)jefsummers Wrote: I don't understand the question.What part of the question needs to be written more clearly?
meknowsnothing Homework 6 3,277 Jun-11-2019, 08:15 PM
    Thread: How to collect all integers with minimum number of rounds?
Post: RE: How to collect all integers with minimum numbe...

(Jun-11-2019, 06:08 PM)micseydel Wrote: This looks like you copy-pasted your homework. What have you tried? With 7 posts I expect you to know the drill by now. How do you prove that this is a homewo...
meknowsnothing Homework 6 3,277 Jun-11-2019, 06:16 PM
    Thread: How to collect all integers with minimum number of rounds?
Post: How to collect all integers with minimum number of...

What kind of algorithm wold solve the following problem? I have been given a positive integer n. Take the n first positive integers 1 to n and permute those to some order. At the beginning you can sw...
meknowsnothing Homework 6 3,277 Jun-11-2019, 03:23 PM
    Thread: How to simplify square finding program?
Post: RE: How to simplify square finding program?

Oh. Sorry. The problem is like this: Find a grid of size 9x13 with following properties: 1. Every cell contains a digit in base 10. 2. One can read the numbers from the grid by selecting a starting...
meknowsnothing General Coding Help 3 2,919 Mar-13-2019, 05:37 AM
    Thread: How to simplify square finding program?
Post: How to simplify square finding program?

I found this problem in a programming forum Ohjelmointiputka: https://www.ohjelmointiputka.net/postit/...nus=ahdruu and https://www.ohjelmointiputka.net/postit/...us=ahdruu2 Somebody said that there...
meknowsnothing General Coding Help 3 2,919 Mar-12-2019, 06:20 PM
    Thread: Digits increasing
Post: RE: Digits increasing

It looks like the recursive approach is wrong: # the next integer whose digits are increasing. def increasing(n): asastring = str(n) length = len(asastring) if asastring == "9"*length: ...
meknowsnothing Homework 6 4,075 Feb-17-2019, 10:19 AM
    Thread: Digits increasing
Post: RE: Digits increasing

min_asc(123614270121) should return 123666666666 rather than 123666677777, as you can see by the function increasing by my first post.
meknowsnothing Homework 6 4,075 Feb-17-2019, 08:39 AM
    Thread: Digits increasing
Post: RE: Digits increasing

There is no reason why I have to do it recursively. I just though it would be easiest to do by recursion as I was able to make first every single digit numbers and then generate two digit numbers by a...
meknowsnothing Homework 6 4,075 Feb-16-2019, 08:28 PM
    Thread: Digits increasing
Post: Digits increasing

Could anyone help me in the following problem from https://artofproblemsolving.com/communit...ts_ordered . Given a positive integer n, find the smallest positive integer m>n whose digits are in asc...
meknowsnothing Homework 6 4,075 Feb-16-2019, 06:09 PM

User Panel Messages

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