Created
May 26, 2025 06:54
-
-
Save HilmiZul/6c84d4cac39f4fe25a906af66f346dd2 to your computer and use it in GitHub Desktop.
game tebak angka
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
angka_komputer = random.randint(1, 10) | |
angka_yang_ditebak = int(input("tebak dari 1 - 10: ")) | |
tanya = True | |
while tanya: | |
if angka_komputer == angka_yang_ditebak: | |
print("BETUL!") | |
tanya = False | |
else: | |
print("SALAH!") | |
angka_yang_ditebak = int(input("cobak tebak lagi: ")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment