Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Need to upgrade this code.
Post: RE: Need to upgrade this code.

If I understand correctly - 1. Create a class and move your shrink routine to that. 2. Change the shrink routine to record the location of each removed letter. 3. Create a function, expand, that puts ...
jefsummers Homework 2 286 Feb-28-2024, 07:44 PM
    Thread: need help with data analysing with python and sqlite
Post: RE: need help with data analysing with python and ...

You can post here or in the DataScience section, but BE SURE to use BB tags around your code. In other words, copy your code, click the blue and yellow icon above, then paste the code between the tags...
jefsummers General Coding Help 2 288 Jan-29-2024, 12:44 PM
    Thread: file open "file not found error"
Post: RE: file open "file not found error"

Why the spaces before and after the slashes? Are they in the path?
jefsummers General Coding Help 8 876 Dec-13-2023, 01:06 PM
    Thread: Beginner stuck in Python book for kids
Post: RE: Beginner stuck in Python book for kids

Usually if you are running a python program from cmd you start with "python -m " then the program path. What editor are you writing the program in? Did you install the packages as administrator?
jefsummers General Coding Help 11 1,065 Nov-22-2023, 12:08 PM
    Thread: Prime number detector
Post: RE: Prime number detector

Integers and rounding. For 5,2, see here - Output:Python 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" f...
jefsummers General Coding Help 5 704 Nov-21-2023, 08:39 PM
    Thread: Prime number detector
Post: RE: Prime number detector

Integers and rounding. For 5,2, see here - Output:Python 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" f...
jefsummers General Coding Help 5 704 Nov-21-2023, 08:39 PM
    Thread: Biopython
Post: RE: Biopython

Are you defining an overlapping gene as finding a start codon before the corresponding end codon in a gene? I think in truth it is more complicated, but for a programming exercise that may be the meth...
jefsummers Homework 2 699 Nov-19-2023, 01:02 PM
    Thread: How secure is the use of "secret" import?
Post: RE: How secure is the use of "secret" import?

Not perfect, but what I would do: Create your secrets file Use an encryption library to encrypt the data. Use a reasonable password. Do not store the password in the script, rather request that from t...
jefsummers General Coding Help 12 1,125 Nov-08-2023, 12:02 PM
    Thread: Homework help
Post: RE: Homework help

The option you want to use in the print statements is "end". Quick google search "python print end". Then you can see how to use a loop to do what you need. I assume you have been taught loops (while,...
jefsummers Homework 3 673 Nov-04-2023, 05:57 PM
    Thread: an unknown variable in an function
Post: RE: an unknown variable in an function

Have a look at the sympy library. Link to documentation HERE It is a symbolic math library for Python. May be of help.
jefsummers General Coding Help 3 87 Oct-29-2023, 08:20 PM
    Thread: Python for Analysis of variance / Anova
Post: RE: Python for Analysis of variance / Anova

Will give you a few links to the sci-kit learn package that should get you started: ANOVA f value Training an SVM One way functional ANOVA
jefsummers Data Science 1 723 Sep-25-2023, 07:11 PM
    Thread: Jupyter notebooks, jupyter kernels, virtual environment created in Anaconda...
Post: RE: Jupyter notebooks, jupyter kernels, virtual en...

Maybe I'm not understanding. Using Anaconda Navigator, choose Environments from the menu on the left. Click Create, choose the version of Python you want, give it a name, then add the packages you nee...
jefsummers Data Science 8 2,074 Sep-17-2023, 11:41 AM
    Thread: Program to check whether a number is palindrome or not
Post: RE: Program to check whether a number is palindrom...

You mentioned that this is supposed to use loops. The slicing technique is better and faster, but must consider what the instructor is wanting to teach you. In this case, how to reverse a number (or s...
jefsummers Homework 18 2,381 Sep-11-2023, 12:21 PM
    Thread: Printing the variable from defined function
Post: RE: Printing the variable from defined function

Clarifying - it prints the _value_ of a, as Dean H points out. Did you want it to print the name "a" instead?
jefsummers General Coding Help 7 1,121 Sep-02-2023, 07:42 PM
    Thread: help with an exercise
Post: RE: help with an exercise

Show us what you have done so far and where you are having problems.
jefsummers Homework 6 907 Aug-21-2023, 05:33 PM
    Thread: Filtering Data Frame, with another value
Post: RE: Filtering Data Frame, with another value

Are you looking for values with Active=TRUE, or Active =FALSE ? Just checking. Also minor correction to last post: df_new = df[df['Active'] == 'FALSE'] print(df_new)There was a missing ' around Activ...
jefsummers Data Science 9 1,297 Aug-17-2023, 08:12 PM
    Thread: Trying to understand strings and lists of strings
Post: RE: Trying to understand strings and lists of stri...

The single or double quotes are not really part of the string, rather display helps. Python will use single quotes by default, but use double quotes if needed (if the string contains a single quote/ap...
jefsummers General Coding Help 2 683 Aug-06-2023, 11:38 AM
    Thread: Coding answer for newbie
Post: RE: Coding answer for newbie

There is another section of this site for homework, and we don't help with "no effort" questions, so we want to see your work. Given the level of this question, let's assume you have no idea how to st...
jefsummers Homework 2 1,079 Aug-05-2023, 12:17 PM
    Thread: Multivariate Analysis of Ecology Data
Post: RE: Multivariate Analysis of Ecology Data

Not sure I understand completely, but scikit-learn does multiple regression analysis. I used it for an analysis of factors in (medical residency) rank order looking at factors such as location of medi...
jefsummers Data Science 2 858 Aug-04-2023, 11:19 AM
    Thread: Some help with my first python class and importing ....im making a lidar program
Post: RE: Some help with my first python class and impor...

Scope problem. You define the function projectLaser() within the class LaserProjection. By doing this you need to create an instance of the LaserProjection class then call projectLaser on that.
jefsummers General Coding Help 7 1,108 Jul-26-2023, 07:46 PM

User Panel Messages

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