Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Fun with Python

Loading...

Sign in or sign up now!
28,041
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Aug 26, 2010

The code is quite simple and will get more complicated as I learn more and more python. These videos will be the funny and interesting codes I make or come across and their anomalies.

The Code:
"
import math
import time
num = input("Input number: ")
while num != -1:
print num
num = num + 1
print "Aw, you choose negative 1! You're no fun!"
time.sleep(1)
print "Anyways, you have failed!"
num2 = 0
while num2 != 2147483646:
print num2
num2 = num2 + 1 + num2
print "That was a close one, any more counting and we would have died!"
print "Coded by Md0G"
time.sleep(3)
"

Category:

Entertainment

Tags:

License:

Standard YouTube License

  • likes, 89 dislikes

Link to this comment:

Share to:

Uploader Comments (mikorocks)

  • the terminal freezes ( im on a mac) when i input that code into it. im a beginner without any experience in even java/c/c++

    Any idea why?

  • @WWSjoker89 You could download python for mac? I don't think the native mac terminal works with python.

  • @mikorocks You'd be wrong, mac comes with python by default. The mac terminal uses Bash.

  • @SmartestViking ah, well the mac I had needed to download it. Or I just didn't know how to access it. Thanks for clearing that up.

  • Dude you found a way into the Matrix!

  • @ilikeantea yeah haha :D

Top Comments

  • did anyone see the "aw, you choose negative 1! You're no fun!"

  • @CmdShepard your point being? Why hating on someone who was starting out in coding at the time? and oooooh big man.

see all

All Comments (66)

Sign In or Sign Up now to post a comment!
  • wow you used recursion and feel good

  • @Psmc40 Then the serious developers use Linux.

  • Congratulations, you just have created a Criptogram!! Now, your job is to decipher it!!!

  • @lilybugged it's an academical language.

  • lol 16 lines of code, now thats fun :D

  • import os

    while True:  os.fork()

  • If I'm reading your code right, you made an infinite loop. That's a big no, no.

  • @Psmc40 No, you don't need to have a PC running Windows to be able to play games, dumb ass!

  • @threedaysgracefanxx No shit.

  • @CmdShepard I agree, except that I started out in python. It's not really a language for serious programmers, if you ask me.

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more