Jump to content
xisto Community

Search the Community

Showing results for tags 'programming'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Help & Support
    • Alerts, News & Announcements
    • Web Hosting Support
    • Introductions
  • Computers & Tech
    • Science and Technology
    • Software
    • The Internet
    • Search Engines
    • Graphics, Design & Animation
    • Computer Gaming
    • Websites and Web Designing
    • Mobile Phones
    • Operating Systems
    • Programming
    • Online Advertising
    • Hardware Workshop
    • Computer Networks
    • Security issues & Exploits
  • Others
    • General Discussion
    • Business Forum
    • Photography
    • Health & Fitness
    • Dating And Relationships
    • The Vent
    • Art & Creativity
    • Home & Garden

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests

Found 4 results

  1. Hello this is Gulshan Negi Well, I am writing a program for making Hangman Game in Python but it shows some error at the time of its execution. Here is my source code: import random import time import os def play_again(): question = 'Do You want to play again? y = yes, n = no \n' play_game = input(question) while play_game.lower() not in ['y', 'n']: play_game = input(question) if play_game.lower() == 'y': return True else: return False def hangman(word): display = '_' * len(word) count = 0 limit = 5 letters = list(word) guessed = [] while count < limit: guess = input(f'Hangman Word: {display} Enter your guess: \n').strip() while len(guess) == 0 or len(guess) > 1: print('Invalid input. Enter a single letter\n') guess = input( f'Hangman Word: {display} Enter your guess: \n').strip() if guess in guessed: print('Oops! You already tried that guess, try again!\n') continue if guess in letters: letters.remove(guess) index = word.find(guess) display = display[:index] + guess + display[index + 1:] else: guessed.append(guess) count += 1 if count == 1: time.sleep(1) print(' _____ \n' ' | \n' ' | \n' ' | \n' ' | \n' ' | \n' ' | \n' '__|__\n') print(f'Wrong guess: {limit - count} guesses remaining\n') elif count == 2: time.sleep(1) print(' _____ \n' ' | | \n' ' | | \n' ' | \n' ' | \n' ' | \n' ' | \n' '__|__\n') print(f'Wrong guess: {limit - count} guesses remaining\n') elif count == 3: time.sleep(1) print(' _____ \n' ' | | \n' ' | | \n' ' | | \n' ' | \n' ' | \n' ' | \n' '__|__\n') print(f'Wrong guess: {limit - count} guesses remaining\n') elif count == 4: time.sleep(1) print(' _____ \n' ' | | \n' ' | | \n' ' | | \n' ' | O \n' ' | \n' ' | \n' '__|__\n') print(f'Wrong guess: {limit - count} guesses remaining\n') elif count == 5: time.sleep(1) print(' _____ \n' ' | | \n' ' | | \n' ' | | \n' ' | O \n' ' | /|\ \n' ' | / \ \n' '__|__\n') print('Wrong guess. You\'ve been hanged!!!\n') print(f'The word was: {word}') if display == word: print(f'Congrats! You have guessed the word \'{word}\' correctly!') break def play_hangman(): print('\nWelcome to Hangman\n') name = input('Enter your name: ') print(f'Hello {name}! Best of Luck!') time.sleep(1) print('The game is about to start!\nLet\'s play Hangman!') time.sleep(1) os.system('cls' if os.name == 'nt' else 'clear') words_to_guess = [ 'january', 'border', 'image', 'film', 'promise', 'kids', 'lungs', 'doll', 'rhyme', 'damage', 'plants', 'hello', 'world' ] play = True: while play: word = random.choice(words_to_guess) hangman(word) play = play_again() print('Thanks For Playing! We expect you back again!') exit() if __name__ == '__main__': play_hangman() I also checked and took a reference from here (https://hackr.io/blog/python-projects). Can anyone give their suggestions on this? Thanks
  2. Mines coming in the post for tomrorow I'm super excited for it to arrive!!! I was wondering if anyone else has gone and what do they use it for? I'm going to try running cron jobs / scripts to book my gym classes because theres limited of spaces everyday they get booked up as soon as they go online! I was also thinking of running a tweetbot and a Pinterest bot? Any other ideas would be cool I bought the Pi over Arduino as I hard you can run multiple tasks which is soo cool! I can't wait to get it yyeyeyeyeh
  3. Java lovers’ gona love it, Check it out.... JavaOne 2013 is apparently being held at Hyderabad this year as well (8-9 May) at the same place guys…. They have also started accepting registrations (check this: http://forums.xisto.com/no_longer_exists/ ) I am definitely going to attend the Java One again. Last time I had a chance to help people at NetBeans Booth, thanks to Java One Team for that great favor. I know, Java and NetBeans community will definitely attend this prestigious nd great conference this year too…..
  4. In the seven years since I have been back in the web design gig, one name has become synonymous to web design and web programming books and that is Larry Ullman. He is mostly known for his Visual Quick Pro books such as PHP and MySQL for Dynamic Web Sites: Visual Quick Pro Guide (4th Edition), MySQL, C++, PHP and so on. Therefore, it does not surprise me when I won his newest book Modern JavaScript: Develop and Design at the Adobe User Group. That it would be loaded with a lot of information that you need to know in order to program in JavaScript. At 15 chapters and a whopping 595 pages, expect to take your time with this book because you will be learning JavaScript from scratch and I mean that literally. As you start from the basics of JavaScript to creating little JavaScript programs. While this book is technical in nature, the one thing I notice right away about this book, is that it doesn't feel like that. He breaks everything down and provides great visuals and color in this book. Usually, I never talk about that in my book reviews. You could say it provides the minimalist design and hits that big pop once you start looking at the book and reading along. While a lot of the information is known, he really sticks to word modern as he talks about the Big 5 web browsers, JavaScript Frameworks, tools that he uses and or recommends and so on. As I said earlier, with his many years writing Visual Quick Pro books, it definitely prepped him in preparing this book as it provides that same kind of flow. At $54.99 (Amazon $34.64), that price is well worth picking up this book, granted I am not calling it the JavaScript Bible, but once you get into it, you think it was. Thus, the reason I cannot really pick a chapter out of this book because this caters to everyone who ready to get out of HTML and into a web programming like JavaScript. So to Larry Ullman, I better see a PHP/MySQL book of the same caliber or tackle a challenging language like JSON or Ruby to make it interesting.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.