counting digitsnumber = sum = 0 ; while number > 0 : digit = number % 10 sum = sum + digit number = number / / 10 print ( " sum of digits : ", sum ) insert a number and bot will add the digits together 구구단 i = 1 while i <= 9 : print ( " 1 * % d = % d " % ( i , 1 * i ) ) i = i + 1 i = 1 while i <= 9 : print ( " 2 * % d = % d " % ( i , 2 * i ) ) i = i + 1 i = 1 while i <= 9 : print ( " 3 * % d = % d " % ( i , 3 * i ) ) i = i + 1 i = 1 while i <= 9 : print ( " 4 * % d = % d " % ( i , 4 * i ) ) i = i + 1 i = 1 while i <= 9 : print ( " 5 * % d = % d " % ( i , 5 * i ) ) i = i + 1 i = 1 while i <= 9 : print ( " 6 * % d = % d " % ( i , 6 * i ) ) i = i + 1 i = 1 while i <= 9 : print ( " 7 * % d = % d " % ( i , 7 * i ) ) i = i + 1 i = 1 while i <= 9 : print ( " 8 * % d = % d " % ( i , 8 * i ) ) i = i + 1 i = 1 while i <= 9 : print ( " 9 * % d = % d " % ( i , 9 * i ) ) i = i + 1 insane adding boti = 1 sum = 0 ; while i <= 100000000 : sum = sum + i i = i + 1 print ( " sum =", sum ) after the "<=", put any numbergoing over 100000000 will make you have to wait a long timefactorialsi = 1 factorial = 1 while ( i <= 1000 ) : factorial = factorial * i i = i + 1 print ( factorial ) once again , put the number after the "<=." going over 10 , 000 WILL make your pc lagnumbersi = 0 while 1 < 10 : print ( i , end =" "); i = i + 1 between the " ", put a number and the bot will stop at that number : OCALCULATORa = int ( input ( " 1 = addition , 2 = subtraction , 3 = multiplication , 4 = division . Insert the number here : ")) x = int ( input ( " Insert first number here : ")) y = int ( input ( " Insert second number here : ")) if ( a == 1 ) : sum = x + y print ( " Sum : ", sum ) elif ( a == 2 ) : diff = x - y print ( " Difference : ", diff ) elif ( a == 3 ) : product = x * y print ( " Product : ", product ) elif ( a == 4 ) : quot = x / y print ( " Quotient : ", quot ) ORx = input ( " 1 = adding , 2 = subtaction , 3 = multiplication , 4 = division : ") a = int ( input ( " First number : ")) b = int ( input ( " Second number : ")) if ( x == " 1 "): sum = a + b print ( " sum : " sum ) if ( x == " 2 "): difference = a - b print ( " difference : " difference ) if ( x == " 3 "): product = a * b print ( " product : " product ) if ( x == " 4 "): quotient = a / b print ( " quotient : ", quotient ) Rock paper scissors : Dimport randomplayer = input ( " Choose one from rock , paper , and scissors : ") list = [ " rock ", " paper ", " scissors "] computer = random . choice ( list ) print ( " player : ", player , " computer : ", computer ) if ( player == computer ) : print ( " Tie ! ") elif ( player == " rock "): if ( computer == " paper "): print ( " computer wins ! ") else : print ( " player wins ! ") elif ( player == " rock "): if ( computer == " scissors "): print ( " computer wins ! ") else : print ( " player wins ! ") elif ( player == " scissors "): if ( computer == " rock "): print ( " computer wins ! ") else : print ( " player wins ! ") import Turtlefor i in range ( 18 ) : turtle . left ( 20 ) turtle . forward ( 50 ) turtle . left ( 90 ) turtle . forward ( 50 ) turtle . left ( 90 ) turtle . forward ( 50 ) turtle . left ( 90 ) turtle . forward ( 50 ) turtle . left ( 90 ) Make any shape you want ! import Turtlepolygon = turtle . Turtle ( ) num _ sides = 200 side _ length = 7 angle = 360 . 0 / num _ sidesfor i in range ( num _ sides ) : polygon . forward ( side _ length ) polygon . right ( angle ) change the background ! import Turtlewindow = turtle . Screen ( ) window . bgcolor ( " lightblue ") t = turtle . Turtle ( ) t . shape ( " turtle ") t . color ( " black ") Make a starimport Turtlestar = turtle . Turtle ( ) for i in range ( 5 ) : star . forward ( 50 ) star . right ( 144 )