Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo "Quiz"
- sleep 5
- clear
- echo "Select Your favorite programming language"
- echo """
- 1) Python
- 2) Javascript
- 3) C++
- 4) C
- 5) C#
- 6) Others
- """
- read -p "[Choose]: " favorite
- clear
- echo "Please select the correct response."
- sleep 3
- clear
- echo "How much is 1+1?"
- echo """
- 1) 11
- 2) 21
- 3) idk
- """
- read -p "[Choose]: " Math
- if [ "$Math" == "1" ]; then
- echo "Correct!"
- math_correct=1
- sleep 2
- else
- echo "Wrong Answer"
- lost1=1
- sleep 2
- fi
- clear
- echo "Are you alone?"
- echo """
- 1) Yes
- 2) No
- """
- read -p "[Choose]: " alone
- if [ "$alone" == "1" ]; then
- echo "Correct!"
- alone1=1
- sleep 2
- else
- echo "Wrong Answer.."
- lost2=1
- sleep 2
- fi
- if [ "$lost1" == "1" ] && [ "$lost2" == "1" ]; then
- echo "You lost the quiz, please restart."
- sleep 2
- exit
- else
- echo """
- You finished the quiz, thanks for playing!
- """
- sleep 2
- clear
- echo """
- <SMART QUIZ>
- A survey made by CaiqueONZ - Pastebin.
- """
- sleep 2
- exit
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement