Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: zipfile module error
Post: RE: zipfile module error
(Jun-30-2023, 09:56 AM)ibreeden Wrote: (Jun-30-2023, 09:47 AM)pseudo Wrote: I get errorPlease show the full error message.
I GOT IT! it's not downloading the file for some reason and I didn't add ... |
|
pseudo |
General Coding Help |
3 |
774 |
Jun-30-2023, 11:11 AM |
|
|
Thread: zipfile module error
Post: zipfile module error
hi. first of all I have to tell you that I'm a noob.
I'm trying to extract a zip file that gets downloaded and I get error
I double checked but I can't find the mistake
PS: how do I check if ffmpeg a... |
|
pseudo |
General Coding Help |
3 |
774 |
Jun-30-2023, 09:47 AM |
|
|
Thread: how do i pass duplicates in my range iterator?
Post: RE: how do i pass duplicates in my range iterator?
I'm really a novice at python; I'm actually a C# programmer can you show me how? |
|
pseudo |
General Coding Help |
3 |
2,362 |
Dec-18-2019, 02:56 PM |
|
|
Thread: how do i pass duplicates in my range iterator?
Post: how do i pass duplicates in my range iterator?
this is the code that randomly picks a card from deck:
import collections
Card = collections.namedtuple('Card', ['rank', 'suit'])
class FrenchDeck:
ranks = [str(n) for n in range(2, 11)] + list(... |
|
pseudo |
General Coding Help |
3 |
2,362 |
Dec-18-2019, 12:29 PM |
|
|
Thread: import error (unknown location)
Post: RE: import error (unknown location)
fixed the problem. easier than i thought must be one of those days :D
you can't use the name parser for your file. it creates a naming conflict
i get the output 6 as expected but i also get an error:... |
|
pseudo |
General Coding Help |
1 |
10,782 |
Nov-14-2019, 11:47 PM |
|
|
Thread: import error (unknown location)
Post: import error (unknown location)
hi I've been reading this blog on how to write your own compiler using python but I'm stuck.
in the parser section of the blog after writing all the code and trying to run python main.py I get this e... |
|
pseudo |
General Coding Help |
1 |
10,782 |
Nov-14-2019, 09:19 PM |
|
|
Thread: how do i write a cross-platform relative file path?
Post: how do i write a cross-platform relative file path...
hi i'm current reading python crash course and it says that under unix-like platforms I have to use forward-slash like this:
with open('text_files/filename.txt') as file_object:and under windows opera... |
|
pseudo |
General Coding Help |
2 |
2,955 |
Aug-23-2019, 02:51 PM |
|
|
Thread: how do i use get for my histogram function?
Post: RE: how do i use get for my histogram function?
def histogram(s):
d = dict()
for c in s:
d[c] = d.get(c, 0) + 1
return dh = histogram('brontosaurus')
print(h)
{'b': 1, 'r': 2, 'o': 2, 'n': 1, 't': 1, 's': 2, 'a': 1, 'u': 2}I don... |
|
pseudo |
Homework |
4 |
4,823 |
Oct-14-2018, 04:01 AM |
|
|
Thread: how do i use get for my histogram function?
Post: how do i use get for my histogram function?
def histogram(s):
d = dict()
for c in s:
if c not in d:
d[c] = 1
else:
d[c] += 1
return d
h = histogram('brontosaurus')
print(h)Output:{'b': 1, 'r'... |
|
pseudo |
Homework |
4 |
4,823 |
Oct-13-2018, 03:37 PM |
|
|
Thread: print string in reverse
Post: RE: print string in reverse
(Oct-04-2018, 04:23 PM)gruntfutuk Wrote: This would have been simpler if you can't use slicing yet:
fruit = 'banana'
reverse = ''
for letter in fruit:
reverse = letter + reverse
print(reverse)W... |
|
pseudo |
Homework |
5 |
3,530 |
Oct-04-2018, 06:55 PM |
|
|
Thread: Need help with a script (indentation)
Post: RE: Need help with a script (indentation)
(Oct-04-2018, 06:16 PM)ichabod801 Wrote: The code I am talking about looks like the indentation should be this:
if mybutton != previousstate:
if mybutton == True:
print "Du har post :)"... |
|
pseudo |
General Coding Help |
9 |
3,842 |
Oct-04-2018, 06:28 PM |
|
|
Thread: Need help with a script (indentation)
Post: RE: Need help with a script (indentation)
if mybutton != previousstate:
if mybutton == True:
print "Du har post :)"
res = p.push("Min Raspberry Pi", 'Advarsel', 'Luke Lukket', batch_mode=False)
else:
print "Du har post :)"res ... |
|
pseudo |
General Coding Help |
9 |
3,842 |
Oct-04-2018, 09:46 AM |
|
|
Thread: Need help with a script (indentation)
Post: RE: Need help with a script (indentation)
there are two ways to fix indentation problems automatically:
1. Install visual studio code. it's a very light and breezy code editor. if the python extension isn't installed go to extensions and (Ct... |
|
pseudo |
General Coding Help |
9 |
3,842 |
Oct-04-2018, 08:41 AM |
|
|
Thread: print string in reverse
Post: RE: print string in reverse
(Oct-02-2018, 11:49 PM)wavic Wrote: >>> s = 'Welcome to the forum!'
>>> s[::-1]
'!murof eht ot emocleW'
>>> This is called slicing. The format is [start_index, stop_index,... |
|
pseudo |
Homework |
5 |
3,530 |
Oct-03-2018, 12:42 AM |
|
|
Thread: print string in reverse
Post: print string in reverse
fruit = 'banana'
index = 0
while index < len(fruit):
letter = fruit[index]
print(letter, end='')
index = index + 1I tried to reverse the string by changing 3rd line to letter = fruit[-i... |
|
pseudo |
Homework |
5 |
3,530 |
Oct-02-2018, 11:26 PM |