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 | |
| first=random.randint(1, 9) | |
| second=random.randint(1, 9) | |
| result=first+second | |
| answer_str = input(f"How much is {first} + {second} ? ") | |
| answer = int(answer_str) | |
| if result==answer: | |
| print("You're right!") | |
| else: |
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
| from random import randint | |
| first=randint(1, 9) | |
| second=randint(1, 9) | |
| result=first+second | |
| answer_str = input(f"How much is {first} + {second} ? ") | |
| answer = int(answer_str) | |
| if result==answer: | |
| print("You're right!") | |
| else: |
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
| from random import randint as randomInt | |
| first=randomInt(1, 9) | |
| second=randomInt(1, 9) | |
| result=first+second | |
| answer_str = input(f"How much is {first} + {second} ? ") | |
| answer = int(answer_str) | |
| if result==answer: | |
| print("You're right!") | |
| else: |
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
| first=2 | |
| second=3 | |
| result=first+second | |
| answer_str = input(f"How much is {first} + {second}? ") | |
| answer = int(answer_str) | |
| if result==answer: | |
| print("You're right!") | |
| else: | |
| print("Sorry, you're wrong.") |
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
| first=2 | |
| second=3 | |
| result=first+second | |
| print(f"The result of {first} + {second} is {result}") |
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
| first=2 | |
| second=3 | |
| result=first+second | |
| print("The result of "+str(first)+" + "+str(second)+" is "+str(result)) |
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
| first=2 | |
| second=3 | |
| result=first+second | |
| print("The result of "+first+" + "+second+" is "+result) |
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
| first=2 | |
| second=3 | |
| result=first+second | |
| print("The result of", end=' ') | |
| print(first, end=' ') | |
| print("+", end=' ') | |
| print(second, end=' ') | |
| print("is", end=' ') | |
| print(result, end=' ') |
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
| first=2 | |
| second=3 | |
| result=first+second | |
| print(result) |
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
| CREATE TYPE Person_Type AS OBJECT ( | |
| person_title VARCHAR2(10), | |
| person_first_name VARCHAR2(20), | |
| person_last_name VARCHAR2(20), | |
| ) | |
| NOT FINAL; |