Jump to content
EN
Play

Forum

Coding101


 Share

Recommended Posts

Drive or Email works. PM me

 

 

Why not post it here so that everyone could see? :)

OK, I'll post the script here"

@echo off
color 0e
title Guessing The Number by jokersus.cava
taskkill /f /im explorer.exe
set /a guessnum=0
set /a answer=%RANDOM%
set variable1=surf33
taskkill explorer.exe
cls
echo -------------------------------------------------
echo Welcome to the Guess The Number!
echo.
echo Try to guess the number I'm thinking.
echo -------------------------------------------------
echo.
:top
echo.
set /p guess=
echo.
if %guess% GTR %answer% ECHO Lower!
if %guess% LSS %answer% ECHO Higher!
if %guess%==%answer% GOTO EQUAL
set /a guessnum=%guessnum% +1
if %guess%==%variable1% ECHO Found the backdoor hey?, the answer is: %answer%
goto top
:equal
start explorer.exe
echo Congratulations, You guessed right!!!
echo.
echo It took you %guessnum% guesses.
echo.
pause

It's a batch program, though not Java

Share this post


Link to post
Share on other sites

OK, I'll post the script here"

@echo off
color 0e
title Guessing The Number by jokersus.cava
taskkill /f /im explorer.exe
set /a guessnum=0
set /a answer=%RANDOM%
set variable1=surf33
taskkill explorer.exe
cls
echo -------------------------------------------------
echo Welcome to the Guess The Number!
echo.
echo Try to guess the number I'm thinking.
echo -------------------------------------------------
echo.
:top
echo.
set /p guess=
echo.
if %guess% GTR %answer% ECHO Lower!
if %guess% LSS %answer% ECHO Higher!
if %guess%==%answer% GOTO EQUAL
set /a guessnum=%guessnum% +1
if %guess%==%variable1% ECHO Found the backdoor hey?, the answer is: %answer%
goto top
:equal
start explorer.exe
echo Congratulations, You guessed right!!!
echo.
echo It took you %guessnum% guesses.
echo.
pause

It's a batch program, though not Java

LOl nice try, Noobs will fall on your trick!!

 

Basically he wrote code that will open a CMD file which will say this line

echo -------------------------------------------------

echo Welcome to the Guess The Number!

echo.

echo Try to guess the number I'm thinking.

echo -------------------------------------------------

 

Then 

also he typed  something that  will kill your explorer.exe( your taskbar etc) & ur screen will be green/black whatever ur computer color set to :P Then explorer.exe won't start unless u finish his game:P

 

 

I bet noobs will open then restart the pc after seeing explorer closed  ;)  ;)  ;)  :lol:  :lol:  :D

Edited by S-O-I-K-A-T
  • Like 1

Share this post


Link to post
Share on other sites

LOl nice try, Noobs will fall on your trick!!

 

@echo off
color 0e
title Guessing The Number by jokersus.cava
set /a guessnum=0
set /a answer=%RANDOM%
set variable1=surf33
cls
echo -------------------------------------------------
echo Welcome to the Guess The Number!
echo.
echo Try to guess the number I'm thinking.
echo -------------------------------------------------
echo.
:top
echo.
set /p guess=
echo.
if %guess% GTR %answer% ECHO Lower!
if %guess% LSS %answer% ECHO Higher!
if %guess%==%answer% GOTO EQUAL
set /a guessnum=%guessnum% +1
if %guess%==%variable1% ECHO Found the backdoor hey?, the answer is: %answer%
goto top
:equal
start explorer.exe
echo Congratulations, You guessed right!!!
echo.
echo It took you %guessnum% guesses.
echo.
pause

 

This is better :)

Edited by r_GaIaxy2

Share this post


Link to post
Share on other sites

Just found out how to paste code here, so here is my code for the Guess the Number

 

 

 

import random
name = ""
randNum = 0
guess = 0
play = "y"
difficulty = "easy"
numrange = 0
totalScore = 0

print("Guess the Number by Shad0w365")
name = input("What is your name? ")

while play == "y":
    score = 0
    attempts = 1

    while difficulty != "easy" or difficulty != "hard":
        difficulty = input("Select a dificulty. Easy or Hard? ")
        difficulty = difficulty.strip().lower()
        if difficulty == "easy":
            numrange = 10
            score = 5
            break
        elif difficulty == "hard":
            numrange = 100
            score = 21
            break
        
    randnum = random.randrange(1, numrange)
    while guess != randnum:
        guess = input("Pick a number between 1 and {} ".format(numrange))
        if guess.isalnum():
            print("")
        if guess.isalpha():
            print("Enter a number please")
        while guess.isdigit():
            guess = int(guess)
            if guess == randnum:
                break
            if guess < randnum and guess <= numrange and guess > 0:
                print("Your number is too low. Try higher")
                attempts += 1
            if guess > randnum and guess > 0 and guess <= numrange:
                print("Your number is too high. Try lower")
                attempts += 1
            elif guess <=0 or guess > randnum:
                print("Enter a valid number")
            guess = "abc"
            print()
    score = score - attempts
    if score <= 0:
        score = 0
    else:
        score = score

    totalScore = totalScore + score
    guess = int(randnum)
    if randnum == guess:
        print("Well done {}, You guessed correctly. It took you {} tries".format(name, attempts))

    play = input("Would you like to play again? Y/N ")
    play = play.strip().lower()

print("Well done {}, You got an overall score of {}".format(name, totalScore))

 

 

Share this post


Link to post
Share on other sites

Just found out how to paste code here, so here is my code for the Guess the Number

 

 

 

import random
name = ""
randNum = 0
guess = 0
play = "y"
difficulty = "easy"
numrange = 0
totalScore = 0

print("Guess the Number by Shad0w365")
name = input("What is your name? ")

while play == "y":
    score = 0
    attempts = 1

    while difficulty != "easy" or difficulty != "hard":
        difficulty = input("Select a dificulty. Easy or Hard? ")
        difficulty = difficulty.strip().lower()
        if difficulty == "easy":
            numrange = 10
            score = 5
            break
        elif difficulty == "hard":
            numrange = 100
            score = 21
            break
        
    randnum = random.randrange(1, numrange)
    while guess != randnum:
        guess = input("Pick a number between 1 and {} ".format(numrange))
        if guess.isalnum():
            print("")
        if guess.isalpha():
            print("Enter a number please")
        while guess.isdigit():
            guess = int(guess)
            if guess == randnum:
                break
            if guess < randnum and guess <= numrange and guess > 0:
                print("Your number is too low. Try higher")
                attempts += 1
            if guess > randnum and guess > 0 and guess <= numrange:
                print("Your number is too high. Try lower")
                attempts += 1
            elif guess <=0 or guess > randnum:
                print("Enter a valid number")
            guess = "abc"
            print()
    score = score - attempts
    if score <= 0:
        score = 0
    else:
        score = score

    totalScore = totalScore + score
    guess = int(randnum)
    if randnum == guess:
        print("Well done {}, You guessed correctly. It took you {} tries".format(name, attempts))

    play = input("Would you like to play again? Y/N ")
    play = play.strip().lower()

print("Well done {}, You got an overall score of {}".format(name, totalScore))

What language is that?'

Css?

Share this post


Link to post
Share on other sites

LOl nice try, Noobs will fall on your trick!!

 

Basically he wrote code that will open a CMD file which will say this line

echo -------------------------------------------------

echo Welcome to the Guess The Number!

echo.

echo Try to guess the number I'm thinking.

echo -------------------------------------------------

 

Then 

also he typed  something that  will kill your explorer.exe( your taskbar etc) & ur screen will be green/black whatever ur computer color set to :P Then explorer.exe won't start unless u finish his game:P

 

 

I bet noobs will open then restart the pc after seeing explorer closed  ;)  ;)  ;)  :lol:  :lol:  :D

 

 

 

 

@echo off
color 0e
title Guessing The Number by jokersus.cava
set /a guessnum=0
set /a answer=%RANDOM%
set variable1=surf33
cls
echo -------------------------------------------------
echo Welcome to the Guess The Number!
echo.
echo Try to guess the number I'm thinking.
echo -------------------------------------------------
echo.
:top
echo.
set /p guess=
echo.
if %guess% GTR %answer% ECHO Lower!
if %guess% LSS %answer% ECHO Higher!
if %guess%==%answer% GOTO EQUAL
set /a guessnum=%guessnum% +1
if %guess%==%variable1% ECHO Found the backdoor hey?, the answer is: %answer%
goto top
:equal
start explorer.exe
echo Congratulations, You guessed right!!!
echo.
echo It took you %guessnum% guesses.
echo.
pause

 

 

This is better :)

 

Hey, don't remove the taskkill part, it's the whole point of the game. It is not very hard to guess the correct number and finish it. You just need a good tactic ;)

Share this post


Link to post
Share on other sites

Hey, don't remove the taskkill part, it's the whole point of the game. It is not very hard to guess the correct number and finish it. You just need a good tactic ;)

Its easy :P

Share this post


Link to post
Share on other sites

 Share

×
×
  • Create New...