Quantcast
Channel: Windows 7 Miscellaneous forum
Viewing all articles
Browse latest Browse all 11372

Star Wars Quiz Batch File

$
0
0

here is the code:

@echo off
title Star Wars Quiz
:1
set /p answer=Question one: Vader: No, I am your father. What does Luke say? hint: All caps with 4 exclamation points. 
if %answer% == NO!!!! goto right1
echo no. Try again.
goto 1

:right1
echo Right! Next question.
pause

:2
set /p answer=Who kills The Emperor? 
if %answer% == Darth Vader goto right2
if %answer% == Vader goto right2
if %answer% == Anakin goto right2
if %answer% == Anakin Skywalker goto right2
echo try again. The first letter is capital.
goto 2

:right2
echo Right! Next question.
pause

:3
set /p a=Who is Han Solo's friend and copilot? 
if %a% == Chewbacca goto right3
echo try again. The first letter is capital.
goto 3

:right3
echo Right! Next question.
pause

:4
set/p answer=What planet does the first Death Star destroy? 
if %answer% == Alderaan goto right4
echo Hint: There are three A's in this word...
goto 4

:right4
echo Right! You have finished the test.
pause

Any improvements and compliments would be appreciated!


Bob Blork - Mark as answer if it helped!



Viewing all articles
Browse latest Browse all 11372

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>