Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,759 members, 7,817,101 topics. Date: Saturday, 04 May 2024 at 05:33 AM

Code Wrestling Entertainment: Sharpen Ur Skill!!! - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Code Wrestling Entertainment: Sharpen Ur Skill!!! (857 Views)

Please Help, Which Is The Best Computing Skill To Attain? / Get The Skill On How To Run Your Own Repair Centre. / Photo Embedded In Programming: Tips On How To Sharpen Photos By LIGHTROOM (2) (3) (4)

(1) (Reply) (Go Down)

Code Wrestling Entertainment: Sharpen Ur Skill!!! by Austinoski(m): 1:27pm On May 10, 2015
My Intention for creating this thread is to help New-bees expecially Python New-bees to Post Coding Problems for others to solve and equally solve problems posted by others thereby Sharpening their Coding Skills...

Challenging another user is allowed if nairaland is ok with it...

I hope to Create a Website for this in the near FUTURE!

Happy Coding EveryOne!!!

1 Like 1 Share

Re: Code Wrestling Entertainment: Sharpen Ur Skill!!! by Austinoski(m): 1:33pm On May 10, 2015
Let's start with simple Problems:

Write a function that takes a string as an argument and reverses the string then OutPuts it...

Happy Coding!
Re: Code Wrestling Entertainment: Sharpen Ur Skill!!! by blueyedgeek(m): 9:15pm On May 10, 2015
Austinoski:
Let's start with simple Problems:

Write a function that takes a string as an argument and reverses the string then OutPuts it...

Happy Coding!
Must it specifically be the Python programming language that answers should be in?
Re: Code Wrestling Entertainment: Sharpen Ur Skill!!! by Celebrimbor(m): 10:40pm On May 10, 2015
@Austinoski from your recent posts on this section, you are looking for ways to improve on your programming skills. I suggest that you check out the following sites
projecteuler.net
topcoder.com
and this
http://www.ntnu.edu.tw/acm/
the all contain problems that would develop your skills.
Re: Code Wrestling Entertainment: Sharpen Ur Skill!!! by Nobody: 1:44am On May 11, 2015
Must it specifically be the Python programming language that answers should be in?
seconded
Re: Code Wrestling Entertainment: Sharpen Ur Skill!!! by Nobody: 3:27am On May 11, 2015
Java

String s = "hello";
System.out.println(new StringBuilder(s).reverse().toString());


Python

s = "Hello"
s_reversed = ""

for ch in s:
s_reversed = ch + s_reversed

print(s_reversed)
Re: Code Wrestling Entertainment: Sharpen Ur Skill!!! by Austinoski(m): 9:45am On May 12, 2015
blueyedgeek:
Must it specifically be the Python programming language that answers should be in?

If we do it in python lang only it will be easier to read and know which code is correct or incorrect..

But if we have enough java, c, c++ etc programmers in the house, then it is ok to solve the problems in those langs..

Happy Coding!!!
Re: Code Wrestling Entertainment: Sharpen Ur Skill!!! by Austinoski(m): 9:50am On May 12, 2015
Celebrimbor:
@Austinoski from your recent posts on this section, you are looking for ways to improve on your programming skills. I suggest that you check out the following sites
projecteuler.net
topcoder.com
and this
http://www.ntnu.edu.tw/acm/
the all contain problems that would develop your skills.

Thanks A lot!!!

I think I know python well enough..
Y not test me by giving me problems to solve and then score me urself, I will appreciate that.. Thanks
Re: Code Wrestling Entertainment: Sharpen Ur Skill!!! by Austinoski(m): 10:40am On May 12, 2015
Velocitron:


Python

s = "Hello"
s_reversed = ""

for ch in s:
s_reversed = ch + s_reversed

print(s_reversed)

Brilliant Algorithm!
The Code is tricky, took me some minutes to figure out how you did it..

Below is my version:
Python:[br/]

s = "Hello"
s_reversed = ""
rev_int = 0

for i in range(len(s)):
rev_int -= 1
s_reversed += s[rev_int]

print(s_reversed)

Happy Coding!!!
Re: Code Wrestling Entertainment: Sharpen Ur Skill!!! by blueyedgeek(m): 3:43pm On May 12, 2015
Austinoski:


If we do it in python lang only it will be easier to read and know which code is correct or incorrect..

But if we have enough java, c, c++ etc programmers in the house, then it is ok to solve the problems in those langs..

Happy Coding!!!
Okay then,

JavaScript

function reverseStr(str) {
return str.split('').reverse().join('').toString();
}


You should also check out http://codewars.com it's a nice fit for what you're looking for
Re: Code Wrestling Entertainment: Sharpen Ur Skill!!! by Cybergenius(m): 5:48pm On May 12, 2015
Code challenge 2: Write a program to print out pascal triangle
| | | | 2 | | 3 3 | | 4 6 4 |
My try with JavaScript:
 function pascalTriangle(rows) {
var triangle, tier;
triangle = [[1*1]]; for (i = 0; i < (rows-1); i+=1) { tier = [1]; for (var k = 1; k < triangle[i].length; k++) { tier[k] = triangle[i][k] + triangle[i][k-1]; } tier.push(1); triangle.push(tier); } return triangle; }

(1) (Reply)

Pls Help Me Rate These Ideas! / What Could Be Wrong With This Php Code? / Start A Programming Career With The Help Of Facebook

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 16
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.