# Neverending Python Challenges Game!

 Aubree Keegan · August 27, 2014 I think that Bucky's challenges are really fun and they are helping me learn too, so here is an idea I just came up with.We will start with a programming challenge. As soon as a user completes that challenge, they will post the answer and also a challenge of their own! This way, we will always have a new problem to work on.Here is my first one:Create a Python program that will complete this song:10 Green Bottles hanging on the wall10 Green Bottles hanging on the wallAnd if one Green Bottle should accidentally fallThere'll be 9 Green Bottles hanging on the wall9 Green Bottles hanging on the wall9 Green Bottles hanging on the wallAnd if one Green Bottle should accidentally fallThere'll be 8 Green Bottles hanging on the wall...Whoever answer first can post the next challenge!

## Replies

- page 1

 Svante Nilsson · September 27, 2014 ``def Fibo(number):    a = 0    b = 1    c = 0    while number > c:        c = a + b        a = b        b = c    if number == c or number == 0:        return True    else:        return Falseprint(Fibo(int(input("Enter your number:"))))``Bumping Jay's challenge:"Create a running game where the player has to press 2 keys a certain number of times as if they were controlling legs and it times the time taken to 'run' the distance as well as somehow showing progress to the finish " Samuel Oloruntoba · September 26, 2014 ``def is_prime(num):    prime = True     for i in range(2, num):       if num % i == 0:           prime = False           break    return prime    if is_prime(11):    print('cool number')else:    print('this number sucks')``a simple function to check if a number is part of a fibonacci series. Bor GS · September 26, 2014 ``def narcissistic(n):    digitlist=list(str(n))    for i in range(len(digitlist)):        digitlist = int(digitlist)        digitlist **= len(digitlist)       if sum(digitlist) == n:        return True    else:        return Falseprint(narcissistic(input()))``Type a program that checks if the number is prime. Samuel Oloruntoba · September 3, 2014 @jay, you did not ask a question, so i guess i can ask but since i don't know what madlibs are here is my own rock paper scissors solution, it is quite bulky but you can check it out at this url(https://github.com/kayandrae/BR-ROCK_PAPER_SCISSORS/blob/master/main.py) my own question is, a word is chosen from by the computer from a group of words, this particular word is mis-arranged, the user has 3 chances to spell the right word. Mason Farina · September 3, 2014 ``import randomuserchoice = input("Please enter either rock, paper or scissors: ")_enemyChoice = ["rock","paper","scissors"]enemyChoice = _enemyChoice[random.randint(0,2)]print("the computer chose: "+enemyChoice)print("the player chose: "+userchoice)if userchoice == "rock" and enemyChoice == "paper":    print("the computer wins")if userchoice== "rock" and enemyChoice== "rock":    print("the it's a tie")if userchoice== "rock" and enemyChoice== "scissors":    print("the player wins")if userchoice== "scissors" and enemyChoice== "rock":    print("the computer wins")if userchoice== "scissors" and enemyChoice== "scissors":    print("its a tie")if userchoice== "scissors" and enemyChoice== "paper":    print("the computer wins")if userchoice== "paper" and enemyChoice== "scissors":    print("the computer wins")if userchoice== "paper" and enemyChoice== "paper":    print("its a tie")if userchoice== "paper" and enemyChoice== "rock":    print("the player wins")``Make a madlibs type game Nikola Pantelić · September 3, 2014 ``num=371num=str(num)chars=len(num)result=0for i in range(0,chars):    result+=int(num)**charsif result==int(num):    print('Number is narcissistic!')else:    print('Sorry, number is not narcissistic...')``Make a Rock, Paper, Scissors game! Yoncho Yonchev · September 1, 2014 Anything more challenging will be nice. Providing alternative solutions for old tasks is fine too. ``# Python 3.4, authour: yonchoy# removing whitespaces from the inputsentence=str(input()).replace(" ", "")# creating dictionary containing how many times each letter exist, unfortunately doesnt work for dublicates#will show the last entered with the same key in the dictionarydef char_histogram(sentence):    return {sentence.count(ch):ch for ch in set(sentence)}my_dic=char_histogram(sentence)print(my_dic[max(my_dic.keys())])``Program that checks if number is narcissistic (http://en.wikipedia.org/wiki/Narcissistic_number) Gary Murphy · August 29, 2014 ``newNumber = ""number = str(raw_input("Enter your number: "))for i in number:    newNumber = i + newNumberif number == newNumber:    print("The number is a palindrome")else:    print("The number is not a palindrome")``Write a piece of code that takes in any string and returns the most used character in that string. Nikola Pantelić · August 27, 2014 Oh... I think I read it wrong! Nevermind, I will edit the code Eugene Botma · August 27, 2014 Nikola, a panagram is a sentence that uses all of the letters in the alphabet, repeating letters doesn't matter.
• 1
• 2

## Python

131,191 followers