Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: I don't think my program is producing the correct answer
Post: I don't think my program is producing the correct ...

Hey, I'm pretty new to python so the answer to this might be obvious, but I made this code for an assignment, and while the code is working I don't think the final answer it's producing is correct. He...
emmapaw24 General Coding Help 1 1,729 Mar-30-2020, 11:48 PM
    Thread: ValueError: invalid literal for int() with base 10: '0.5'
Post: RE: ValueError: invalid literal for int() with bas...

Yes, thank you **smile**
emmapaw24 General Coding Help 2 3,756 Feb-16-2020, 07:24 PM
    Thread: ValueError: invalid literal for int() with base 10: '0.5'
Post: ValueError: invalid literal for int() with base 10...

Hi, I'm having a problem with the code that I'm writing, this may be obvious as I'm new to Python, when I try to input a decimal whil writing my code I receive an error message, here is my code: r = ...
emmapaw24 General Coding Help 2 3,756 Feb-16-2020, 07:15 PM
    Thread: TypeError: type str doesn't define __round__ method
Post: RE: TypeError: type str doesn't define __round__ m...

Yes it was!! Thank you so much! **smile**
emmapaw24 General Coding Help 7 29,743 Feb-03-2020, 08:14 PM
    Thread: TypeError: type str doesn't define __round__ method
Post: RE: TypeError: type str doesn't define __round__ m...

I changed my code a bit and am now getting a different message: wattage = float(input("What is the wattage of your device?")) hoursUsed = float(input("What is the amount of hours used?")) pricePerKWh...
emmapaw24 General Coding Help 7 29,743 Feb-03-2020, 07:28 PM
    Thread: TypeError: type str doesn't define __round__ method
Post: RE: TypeError: type str doesn't define __round__ m...

I saw someone else say on here that you should never use floats for dollar values, is this true? I changed to float and I receved the same message
emmapaw24 General Coding Help 7 29,743 Feb-03-2020, 06:51 PM
    Thread: TypeError: type str doesn't define __round__ method
Post: TypeError: type str doesn't define __round__ metho...

Hi, I am unsure how to use the round function for my problem, I am trying to write code that finds the cost of electricity using the wattage, hours and price, my code looks like this: wattage = int(i...
emmapaw24 General Coding Help 7 29,743 Feb-03-2020, 05:59 PM
    Thread: TypeError: can't multiply sequence by non-int of type 'str'
Post: TypeError: can't multiply sequence by non-int of t...

Hi, I'm new to python so the answer to this may be obvious, but I'm trying to write code to find the cost of electricity used by a device using wattage, the number of hours used, and electricity cost....
emmapaw24 General Coding Help 2 2,518 Feb-03-2020, 05:15 PM

User Panel Messages

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