Skip to content

Instantly share code, notes, and snippets.

@alex-ber
alex-ber / 03_import3.py
Created September 7, 2022 19:48
03_import3.py
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:
@alex-ber
alex-ber / 02_import2.py
Created September 7, 2022 19:41
02_import2.py
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:
@alex-ber
alex-ber / 01_import1.py
Created September 7, 2022 19:30
01_import1.py
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:
@alex-ber
alex-ber / 06_variables6.py
Last active September 7, 2022 19:29
06_variables6.py
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.")
@alex-ber
alex-ber / 05_variables5.py
Created September 5, 2022 19:17
05_variables5.py
first=2
second=3
result=first+second
print(f"The result of {first} + {second} is {result}")
@alex-ber
alex-ber / 04_variables4.py
Created September 2, 2022 20:03
04_variables4.py
first=2
second=3
result=first+second
print("The result of "+str(first)+" + "+str(second)+" is "+str(result))
@alex-ber
alex-ber / 03_variables3.py
Created September 2, 2022 19:55
03_variables3.py
first=2
second=3
result=first+second
print("The result of "+first+" + "+second+" is "+result)
@alex-ber
alex-ber / 02_variables2.py
Created September 2, 2022 19:37
02_variables2.py
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=' ')
@alex-ber
alex-ber / 01_variables1.py
Created September 2, 2022 18:40
01_variables1.py
first=2
second=3
result=first+second
print(result)
CREATE TYPE Person_Type AS OBJECT (
 person_title VARCHAR2(10),
 person_first_name VARCHAR2(20),
 person_last_name VARCHAR2(20),
NOT FINAL;