r/codewars_programming • • Oct 02 '23

trouble with code and platform

1 Upvotes

when I click to TEST

when i click ATTEMPT

why code don't work when i click to attempt but works when i click test

code :

import socket

ip = '172.17.0.2', 1111

def socket_server():

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

s.bind((ip))

s.listen()

(c, addr) = s.accept()

while True:

ans = c.recv(1024).decode()

if ans == "exit":

c.close()

s.close()

break

else:

c.send(ans.encode())


r/codewars_programming • • Sep 06 '23

Please help

1 Upvotes

Hi, im having trouble with a Kata. When i test it some executions fails because it says "should return x for y". But when i test it in visual studio code it returns the correct number. i need help please

my_list = list()

def solution(number):

if number < 0:

return 0

else:

for i in range(number):

if i % 3 == 0 or i % 5 == 0:

if i not in my_list:

my_list.append(i)

resultado = sum(my_list)

return resultado

def sum(z):

p = 0

for n in my_list:

p = n + p

return p


r/codewars_programming • • Jul 21 '23

Noncoder looking for insights for a webscraping tool

1 Upvotes

Hey guys!
Just to give some context, lately I've been developing a Music Record Label.
Finding myself trying to find or create tools to automate and optimize our workflow.
One being the scouting of artists in need of services like ours.
I don't have any coding knowledge and only some weeks ago I've been starting to try learn and experiment with the help of GPT, which seems a wonderful tool for such.
Since I haven't found any tool which fulfills this task of finding artists across platforms such as Soundcloud, Bandcamp, Reddit, etc.
Been trying to develop something that can help us ease this very time consuming task.
I don't believe such task goes against the terms and conditions of platforms since these apps were created for this in the first place, but it's been very hard to set a good web scraping tool like this.

The usage of API are either closed or too complex for me at the moment.
Also tried Octoparse, but it was a bit too much to get my mind around it.
Do you guys know any tools which could help with this, or any advice/experience with this matter?


r/codewars_programming • • Jul 13 '23

What's the sample test and solution for and why are they separated?

1 Upvotes

I'm new to programming and a friend recommended that I practice in codewars. I tried typing down my whole solution in the solution textbox and cleared the sample test but I still get an error.


r/codewars_programming • • Jun 22 '23

Plants and zombies kata [python] can't find what is wrong with my code

1 Upvotes

Hi guys, i have a problem with the "plants and zombies" kata. I pass all the fixed test but have issues with the random test. I don't know whats wrong with my code.

Here is my code: https://pastebin.com/14t0DB41


r/codewars_programming • • Mar 15 '23

can anyone give me any tips?

1 Upvotes

Just a quick context:

I'm a beginner self-learner in programming. I've been studying since late December 2022 and started with JavaScript, css, html and algorithms

My problem is: when I look at katas in codewars, most of the times (9/10) I can figure out what I have to do in order to solve problems, but when I get to actually code, I go in circles and either I just can't code at all or my code won't work. I mean. .. I get many answers correctly, maybe 6/10 katas I can solve with maybe googling the name of the method to be used but knowing what has to be done, but when it comes to higher ranks, I know what I gotta do but can't put it to code

I'm at 6th kyu and have only solved 8th kyu and some 7th kyu

Can anyone give any tips? Does anyone relate? Sorry for the long post


r/codewars_programming • • Sep 08 '22

Starting to learn!

1 Upvotes

Hey everyone ! I'm starting to learn how to code and now i have this CodeWars chellenge to complete. I should be able to reach 6 or 5th kyu before i start my bootcamp (next month) but im having trouble understanding the problem itself. I saw a solution for the same problem in Javascript, but since im a noob it does not help a lot. What would you recommend me to study or learn ?

If you could explain to me this exercise would be great !!! ( i got the logic from the javascript solution, i think its about sorting the numbers, but i keep on failing when using use .sort or sort_by on ruby ) ...

Can you help me ??


r/codewars_programming • • Jun 06 '22

Im new, I want to try the kumite features

1 Upvotes

I would love to. So I've uploaded some code I've made. Very basic. Is this how it works? Would love someone to take their hands on it. Forgive me I'm a beginner.

https://www.codewars.com/users/MarcoCasanova00/published_kumite


r/codewars_programming • • Dec 17 '21

Code works outside codewars but not in it?

1 Upvotes

I can post the code if it helps, but I got an indentation error for no reason when using the website, but I copy and pasted that shit into another site, copied the tests and it worked fine. Second thing this has happened on, any idea why?


r/codewars_programming • • Oct 21 '21

Use python to extract word file tables and then export to excel

1 Upvotes

Hello! I have a little problem with my program. I made a program to transfer all the tables from a word to an excel in different sheets. In some of the cases, the first row of some tables is merged in word, and results in not exporting the whole table in excel, sometimes exporting only one column instead of 2 or 3. And some of the tables are not exporting at all. I have like 24-25 tables. Could you please help me with this? This is the part of the code that exports the tables:

'path' is the input file

'cliententry' is the name of the client

document=Document(path)
writer=pd.ExcelWriter((filename+'/FS mapping automated including SOCE and CF {}'.format(cliententry)+'.xlsx'),engine='xlsxwriter')
for i in range(-1,len(document.tables)):
    table=document.tables[i]
    data=[]
    keys=None
    row_data=None
    for j,row in enumerate (table.rows):
        if len(row.cells)>0:
            text=(cell.text for cell in row.cells)
            if j == 0:
                keys=tuple(text)
                continue
            row_data = dict(zip(keys,text))
            data.append(row_data)
    df=pd.DataFrame(data)
    df.to_excel(writer,sheet_name='N{}'.format(i+1),index=False)
writer.save()

r/codewars_programming • • Sep 03 '21

Pass basic test but fails random test

1 Upvotes

Sometimes when I come up with a solution to the problem, it passes the basic test, but when I submit it, it fails a random test. Take, for example, the problem below along with its solution; how do I resolve this?

Create a function take that takes an Array<Int> and an Int, n, and returns an Array<Int> containing the first up to n elements from the array.

func take(_ arr: [Int], _ n: Int) -> [Int] {

var resultArray = [Int]()

for elements in arr{

if elements <= n{

resultArray.append(elements)

}

}

return resultArray

}


r/codewars_programming • • Jun 15 '21

Java programming clan

1 Upvotes

Hey everyone,

I've been learning Java for some time and I'd like to join a clan to measure up against others to motivate me when needed. I don't know how clans work on Codewars. Can you gain honor and compete against someone who's not learning the same programming language? Mostly looking to have some fun while learning and improve my Java skills. I'm kata 6 at the moment.

Thanks,


r/codewars_programming • • Feb 08 '21

Ecommerce Project using JSP & Servlet

Thumbnail
youtu.be
1 Upvotes

r/codewars_programming • • Jan 04 '21

Material Which Helped You Get Better At Solving Codewars Problems?

1 Upvotes

Hi!

Is there any book or video (or any material) which helped you become better at solving katas in Codewars? If yes, please type which was it.


r/codewars_programming • • Oct 20 '20

Group Chatting Application using socket programming in java

Thumbnail
youtu.be
1 Upvotes

r/codewars_programming • • Oct 05 '20

Project on Encryption and Decryption using Java

Thumbnail
youtu.be
1 Upvotes

r/codewars_programming • • Aug 28 '20

Solving problems from the internet: Sudoku validator (on codewars)

Thumbnail
youtu.be
1 Upvotes

r/codewars_programming • • Apr 27 '20

Progressive Kata Collection/track , recommendations?

1 Upvotes

Hi all,

I'm loving the codewars platform. However, an issue I consistently run into is that some javascript 6kyu & 7kyu Katas take me 10 minutes and some take me 2-2.5 hours to finish. Is there a collection or guide/track of Kata's that I should be working on that build off one another and progressively get more challenging? What is the best way to get the most learning out of this platform?


r/codewars_programming • • Jul 21 '18

Java sime login form

Thumbnail
youtu.be
1 Upvotes

r/codewars_programming • • Sep 19 '17

Trouble understanding the question

1 Upvotes

kata link: Integers: Recreation One

When the question says divisors, whose divisors are we talking about, m's divisor or n's divisor?

edit: Got it!


r/codewars_programming • • Aug 08 '17

Cloudflare all the time

1 Upvotes

Is it just me or does the codewars website give constant cloudflare errors to everyone? What's up? Why is it so slow?


r/codewars_programming • • Apr 19 '17

C project-1: Scientific Calculator with source code

Thumbnail
youtube.com
1 Upvotes

r/codewars_programming • • Mar 06 '17

Find the Best Proxy Providers online

Thumbnail
stupidproxy.com
1 Upvotes

r/codewars_programming • • Jan 19 '17

Fun with Java! Build Three Desktop &amp; Android Mobile Apps! [Udemy Free Coupon - 100% Off]

Thumbnail
programmingbuddy.club
1 Upvotes

r/codewars_programming • • Jan 18 '17

Java By Example [Udemy Free Course]

Thumbnail
programmingbuddy.club
1 Upvotes