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...

Recommended Answers

All 6 Replies

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

Cheers and Happy coding.

Do we have to guess what problem 3 is?

a sorted integer. Hmm. interesting.

Please show some effort.

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:

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...

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.