1,105,391 Community Members

remove duplicates in a sorted array integer

Member Avatar
acejhon
Newbie Poster
3 posts since Aug 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
-2
 

hi to everyone, im having trouble with python programming... i have these 3 problems....

1. remove a duplicates in a sorted integer
2. a python program that will detect if a number is divisible by 3

if you have solutions for my problems, can you help me pls...

Member Avatar
Beat_Slayer
Posting Pro in Training
401 posts since Jun 2010
Reputation Points: 17 [?]
Q&As Helped to Solve: 105 [?]
Skill Endorsements: 1 [?]
 
1
 

Some code to see what you have done so far so we can guide you?

Cheers and Happy coding.

Member Avatar
vegaseat
DaniWeb's Hypocrite
6,984 posts since Oct 2004
Reputation Points: 1,544 [?]
Q&As Helped to Solve: 1,872 [?]
Skill Endorsements: 67 [?]
Moderator
 
0
 

Do we have to guess what problem 3 is?

Member Avatar
ultimatebuster
Posting Whiz in Training
250 posts since Mar 2010
Reputation Points: 14 [?]
Q&As Helped to Solve: 69 [?]
Skill Endorsements: 0 [?]
 
0
 

a sorted integer. Hmm. interesting.

Please show some effort.

Member Avatar
pyTony
pyMod
6,104 posts since Apr 2010
Reputation Points: 818 [?]
Q&As Helped to Solve: 1,056 [?]
Skill Endorsements: 42 [?]
Moderator
Featured
 
0
 
from random import randint
thenumberasstring = str(randint(1<<32-1,1<<33-1))
print thenumberasstring

norepeats = ''
for n1,n2 in zip(thenumberasstring,thenumberasstring[1:]+' '):
    if n1 != n2:
        norepeats += n1
print norepeats

And when you ask better and show some coding effort we can write real code.:twisted:

Member Avatar
acejhon
Newbie Poster
3 posts since Aug 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

hi to everyone, im having trouble with python programming... i have these 3 problems....

  1. a python program that will remove a duplicates in a sorted array integer
  2. a python program that will detect if a number is divisible by 3 without using a modulus
  3. a python program that will convert decimal to hexa , octa and binary

sorry guys, im new to this language.. im having a problem on how to start with this
but im willing to learn.. sorry

if you have solutions for my problems, can you help me pls...

Member Avatar
pyTony
pyMod
6,104 posts since Apr 2010
Reputation Points: 818 [?]
Q&As Helped to Solve: 1,056 [?]
Skill Endorsements: 42 [?]
Moderator
Featured
 
0
 

hi to everyone, im having trouble with python programming... i have these 3 problems....

  1. a python program that will remove a duplicates in a sorted array integer
  2. a python program that will detect if a number is divisible by 3 without using a modulus
  3. a python program that will convert decimal to hexa , octa and binary

sorry guys, im new to this language.. im having a problem on how to start with this
but im willing to learn.. sorry

if you have solutions for my problems, can you help me pls...

Study for example:
http://www.sthurlow.com/python/lesson04/

http://www.google.fi/url?sa=t&source=web&cd=1&ved=0CBgQFjAA&url=http%3A%2F%2Fdocs.python.org%2Ftutorial%2F&ei=mct0TKu3EZDuOePBiaUG&usg=AFQjCNGHgDIQyUXe76XiQvHhM6kr8-qTAA&sig2=RsjaA0Oj0pvSZH6XMqLIjQ

Question Answered as of 3 Years Ago by pyTony, vegaseat, ultimatebuster and 1 other
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: