Created
December 20, 2021 11:48
-
-
Save jensadev/438d08c16bb608c92c0225eeb0cd4795 to your computer and use it in GitHub Desktop.
This file contains 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
################################################################################ | |
score = 0 | |
################################################################################ | |
test = input("Skriv siffran 200: ") | |
# rätta | |
score += 0 | |
################################################################################ | |
import unittest | |
class CheckTest(unittest.TestCase): | |
def test_integer(self): | |
self.assertEqual(test, 200, "Felaktigt värde för test.") | |
self.assertIsInstance(test, int, "Felaktig datatyp för test.") | |
try: | |
if __name__ == '__main__': | |
unittest.main() | |
except: | |
print("----------------------------------------------------------------------\n") | |
print(f"Score: {score}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment