#Created by Iamcoolz #Random Number Generator #Importing our module random import random #User Input minNumber = input('What is the minimum number you want Python to generate?') maxNumber = input('What is the maximum number you want Python to generate?') #Setting the variable myNumber to the function random. myNumber = random.randint(minNumber,maxNumber) #Printing the actual number print (myNumber) Enjoyz
I was referring to it taking you 3+ years of trying to get to 5 lines of code. I still bet you think you're still better than me at everything huh? dis kid...
That's what I am saying, check it here's some autoit code I wrote back in like 2008 that's much more complex than that. You get a cookie if you can tell me what it does! Code: #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.6.1 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #NoTrayIcon ;~ Function Includes #include <Array.au3> #Include <String.au3> #Include <File.au3> ;~ GUI Includes #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ;~ Check For File If FileExists('Ebenezer.exe') = 0 Then MsgBox(16, 'Error', 'Cannot Locate File') Exit EndIf #Region Opt('GUIOnEventMode', 1) $Form1 = GUICreate('1298 SQL Login Changer', 298, 58) $Group1 = GUICtrlCreateGroup('Login', 8, 0, 137, 49) $Input1 = GUICtrlCreateInput('', 16, 16, 121, 21) GUICtrlSetLimit(-1, 11) GUICtrlCreateGroup('', -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup('Password', 152, 0, 137, 49) $Input2 = GUICtrlCreateInput('', 160, 16, 121, 21) GUICtrlSetLimit(-1, 15) GUICtrlCreateGroup('', -99, -99, 1, 1) GUISetState(@SW_SHOW) GUISetOnEvent($GUI_EVENT_CLOSE, '_Write_Data') #EndRegion ;~ Open File For Read/Write In Binary Mode Global $File = FileOpen('Ebenezer.exe', 17) ;~ Login Pos Array Global $Login[11] $Login[0] = '25F0EC' $Login[1] = '25F0ED' $Login[2] = '25F0EE' $Login[3] = '25F0EF' $Login[4] = '25F0F0' $Login[5] = '25F0F1' $Login[6] = '25F0F2' $Login[7] = '25F0F3' $Login[8] = '25F0F4' $Login[9] = '25F0F5' $Login[10] = '25F0F6' ;~ Password Pos Array Global $Pass[15] $Pass[0] = '25F0DC' $Pass[1] = '25F0DD' $Pass[2] = '25F0DE' $Pass[3] = '25F0DF' $Pass[4] = '25F0E0' $Pass[5] = '25F0E1' $Pass[6] = '25F0E2' $Pass[7] = '25F0E3' $Pass[8] = '25F0E4' $Pass[9] = '25F0E5' $Pass[10] = '25F0E6' $Pass[11] = '25F0E7' $Pass[12] = '25F0E8' $Pass[13] = '25F0E9' $Pass[14] = '25F0EA' ;~ Get Current Info At Runtime _Get_Data() While 1 = 1 Sleep(1000) WEnd Func _Get_Data() ;---------------------------------------- ; 11 Limit Login - ;---------------------------------------- Local $Array[1] ;~ Read Data From File For $x = 1 To 11 FileSetPos($File, Dec($Login[$x - 1]), $FILE_BEGIN) _ArrayAdd($Array, StringTrimLeft(FileRead($File, 1), 2)) Next ;~ Print Data In GUI GUICtrlSetData($Input1, _HexToString($Array[1] & $Array[2] & $Array[3] & $Array[4] & $Array[5] & $Array[6] & $Array[7] & $Array[8] & $Array[9] & $Array[10] & $Array[11])) ;---------------------------------------- ; 15 Limit Password - ;---------------------------------------- Local $Array[1] ;~ Read Data From File For $x = 1 To 15 FileSetPos($File, Dec($Pass[$x - 1]), $FILE_BEGIN) _ArrayAdd($Array, StringTrimLeft(FileRead($File, 1), 2)) Next ;~ Print Data In GUI GUICtrlSetData($Input2, _HexToString($Array[1] & $Array[2] & $Array[3] & $Array[4] & $Array[5] & $Array[6] & $Array[7] & $Array[8] & $Array[9] & $Array[10] & $Array[11] & $Array[12] & $Array[13] & $Array[14] & $Array[15])) EndFunc Func _Write_Data() ;---------------------------------------- ; 11 Limit Login - ;---------------------------------------- ;~ Read Data From GUI $Data = StringSplit(GUICtrlRead($Input1), '') ;~ Write New Data For $x = 1 To $Data[0] FileSetPos($File, Dec($Login[$x - 1]), $FILE_BEGIN) FileWrite($File, $Data[$x]) Next ;~ Fill Leftovers With 00 If $Data[0] < 11 Then For $z = $Data[0] + 1 To 11 FileSetPos($File, Dec($Login[$z - 1]), $FILE_BEGIN) FileWrite($File, Chr(0)) Next EndIf ;---------------------------------------- ; 15 Limit Password - ;---------------------------------------- ;~ Read Data From GUI $Data = StringSplit(GUICtrlRead($Input2), '') ;~ Write New Data For $x = 1 To $Data[0] FileSetPos($File, Dec($Pass[$x - 1]), $FILE_BEGIN) FileWrite($File, $Data[$x]) Next ;~ Fill Leftovers With 00 If $Data[0] < 15 Then For $z = $Data[0] + 1 To 15 FileSetPos($File, Dec($Pass[$z - 1]), $FILE_BEGIN) FileWrite($File, Chr(0)) Next EndIf ;~ Exit Exit EndFunc