Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: IoT Air Monitoring System
Post: IoT Air Monitoring System

Hi, I’m looking to make a small IoT project / test automation with my Raspberry Pi. I have a light and temperature sensor. I want to make an air monitoring system. I want to take readings every mi...
project_science General Coding Help 0 1,939 Mar-26-2021, 08:14 PM
    Thread: time intervals
Post: RE: time intervals

I solved it, and the time stamps looks approximately difference by 1.01s, which I assume means there's 0.01s need for processing time. I'm assuming there's a better way to do time deltas, but for dat...
project_science General Coding Help 7 2,972 Feb-06-2021, 11:49 PM
    Thread: time intervals
Post: RE: time intervals

(Jan-30-2021, 09:44 PM)bowlofred Wrote: You're not looking up the time in the function at all. You're looking up the time outside the function on line 12. The variable now is set there, and all th...
project_science General Coding Help 7 2,972 Jan-30-2021, 11:01 PM
    Thread: time intervals
Post: RE: time intervals

That seems like such an oversight now my part! Thank you. I moved that into the function, but for some, the print statements still shows milliseconds the same, but I don't understand why? They shou...
project_science General Coding Help 7 2,972 Jan-30-2021, 10:07 PM
    Thread: time intervals
Post: time intervals

Hi, I'm currently trying to get 2 different time displays each time I call a function using the datetime library. However, in my code, I call the function twice, and each time, the milliseconds disp...
project_science General Coding Help 7 2,972 Jan-30-2021, 09:32 PM
    Thread: Adding graph points and formating
Post: RE: Adding graph points and formating

That was quite helpful, thanks! I got it to work, and now trying to add points together. I created a new method, def add_points. It seems to "almost" work, but my methodcall, w1.add_points(w1.get_num...
project_science General Coding Help 4 2,405 Jan-24-2021, 05:02 PM
    Thread: Adding graph points and formating
Post: RE: Adding graph points and formating

(Jan-17-2021, 04:28 PM)BashBedlam Wrote: I think that what you want is to change your return statement to this: return "{}, {}".format(self.x1, self.y1) Thanks! I extended on this to make it print...
project_science General Coding Help 4 2,405 Jan-23-2021, 07:50 PM
    Thread: Adding graph points and formating
Post: Adding graph points and formating

Hi, I'm creating a code to input 2 points, (x,y) from the user. I've done that, and now I'd like to add these. However, I want to display the points which were input first. I know there's a proble...
project_science General Coding Help 4 2,405 Jan-17-2021, 03:35 PM
    Thread: unpacking tuple not working
Post: unpacking tuple not working

Hi, I'm creating a simple calculator. I'm having trouble with unpacking a tuple. My IDE returns an error saying, Quote:(num1, num2, den1, den2) = numbers #unpacking does NOT work ValueError: not en...
project_science General Coding Help 1 1,497 Jan-09-2021, 08:45 PM
    Thread: Writing to file ends incorrectly
Post: RE: Writing to file ends incorrectly

def input_nums(): '''Get two integers from the user''' try: num1 = int(input('enter num1: ')) num2 = int(input('enter num1: '))I see what you've done here, and it's interesting...
project_science General Coding Help 4 2,704 Jan-06-2021, 04:53 PM
    Thread: Decimal Rounding error
Post: RE: Decimal Rounding error

Wow, that really took out a lot of my extra code. I get it now, thanks for your help!
project_science General Coding Help 4 2,774 Jan-06-2021, 03:14 PM
    Thread: Decimal Rounding error
Post: RE: Decimal Rounding error

Thanks for your help. I fixed the issue by rounding s_discount in a separate function, and used a similar method in the additional discount function. I was finally able to separate the raw data from...
project_science General Coding Help 4 2,774 Jan-03-2021, 07:01 PM
    Thread: Decimal Rounding error
Post: Decimal Rounding error

Hi, I've got a code written where the purpose is to take a raw price value and apply 10% discount to it. If the user agrees, then a 2nd discount of 5% is added as an additional discount to the previ...
project_science General Coding Help 4 2,774 Jan-02-2021, 06:46 PM
    Thread: Writing to file ends incorrectly
Post: Writing to file ends incorrectly

Hi, An external txt file has 2 numbers in it (default). I'm asking a user to input 2 new numbers in my script. These then get written to the text file. The code then reads the default 2 numbers wh...
project_science General Coding Help 4 2,704 Jan-01-2021, 04:41 PM
    Thread: new line character
Post: RE: new line character

Great, thank you everyone! I was able to get my project to work with the simple addition of file.write("\n")
project_science General Coding Help 3 2,128 Jan-01-2021, 02:32 PM
    Thread: new line character
Post: new line character

Hi, I've got a simple code which should open, read, write, and append code. On the 3rd block of code, it returns the text from the 2nd block on the same line as the 3rd. How do I get the appended t...
project_science General Coding Help 3 2,128 Jan-01-2021, 02:31 AM
    Thread: counting vowels in a string
Post: counting vowels in a string

Hi, I'm moving from a C background to python. I'm trying to count the number of vowels in a string. I've put the vowels in a list, and I'm trying to see if the list's 1st vowel is found at a string...
project_science General Coding Help 3 2,578 Dec-30-2020, 05:18 PM

User Panel Messages

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