Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: tip calculator not displaying proper dollar format
Post: RE: tip calculator not displaying proper dollar fo...

Try this print('%.2f' % number)
BerlingSwe Homework 15 8,861 Aug-30-2017, 08:32 AM
    Thread: SyntaxError
Post: RE: SyntaxError

Because you are missing parentheses in call to 'print' Print needs parentheses, like this: Quote:print("Hello world")
BerlingSwe General Coding Help 2 3,388 Aug-30-2017, 06:27 AM
    Thread: Where can I find a little project example using main.py and other files
Post: RE: Where can I find a little project example usin...

There are alot of projects on github, so I' pretty sure you will find plenty there :)
BerlingSwe General Coding Help 7 4,914 Aug-30-2017, 06:25 AM
    Thread: What this code will output and why?
Post: RE: What this code will output and why?

Brcause you are using a 2 dimensional list. Play around with it for a bit and I'm sure you will understand! :) a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] print(a[0]) print(a[0][1])Try this code and experi...
BerlingSwe Homework 4 3,869 Aug-30-2017, 06:02 AM
    Thread: can't import module
Post: RE: can't import module

I had this problem too a long time ago with Visual Studio. What I had to do was Project>Properties and then select the interpeter to the version of Python you are using. Hope this helped
BerlingSwe General Coding Help 1 5,647 Aug-28-2017, 10:03 PM
    Thread: wx.PyTimer
Post: RE: wx.PyTimer

I think you should test it out yourself first as it is far more rewardibg and it improves your skill alot more than if someone answers the question for you!
BerlingSwe General Coding Help 3 3,159 Aug-28-2017, 09:06 PM
    Thread: Help wth web page question
Post: RE: Help wth web page question

There are loads of way to close a browser window. You could use selenium, pynput, subproccess. Here is my solution using pynput, assuming that you are currently on the page you want to close from py...
BerlingSwe Web Scraping & Web Development 2 3,437 Aug-28-2017, 02:30 PM
    Thread: Matt's newb question 1
Post: RE: Matt's newb question 1

1. sys is a module that contains "system functionality". sys.argv is a list containing your script's command line arguments. One way to use it would be to write import sys and then sys.argv to access ...
BerlingSwe General Coding Help 1 2,692 Aug-28-2017, 03:27 AM
    Thread: webbrowser
Post: RE: webbrowser

Do you mean to open the two different websites in the same tab, so that yahoo is loaded over google, or is your intention to open both websites in the same window in different tabs? The new=0 should ...
BerlingSwe Web Scraping & Web Development 3 6,966 Aug-27-2017, 10:50 PM
    Thread: I need help with floats and int
Post: RE: I need help with floats and int

Another solution to your problem is to replace the "+" in the last line to a ",". That way, you are not trying to add a string and a float together, but just printing them out seperately. print("the ...
BerlingSwe Homework 4 3,784 Aug-27-2017, 10:29 PM

User Panel Messages

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