# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     name: python3
# ---

# + [markdown] id="view-in-github" colab_type="text"
# <a href="https://colab.research.google.com/github/wellaboriol/CPEN21A-CpE-1-2/blob/main/Midterm_Exam.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>

# + [markdown] id="B_VA5ZH2Caqb"
# ##Midterm Exam 

# + colab={"base_uri": "https://localhost:8080/"} id="L7jxkDJgCgTK" outputId="dcc8363f-48ed-4b8f-c8b3-8ccf58d425f6"
Name = "<NAME>"
S_Number = "202105205"
Age = "19"
Birthday = "May 08, 2002"
Address = "Blk94 Lot24 Ph4 Mabuhay City Paliparan 3 Dasmarinas City Cavite"
crs = "Bachelor of Science in Computer Engineering"
gwa = "95"

print("Full name: "+ Name)
print("Student Number: "+ S_Number)
print("Age: "+ Age)
print("Birthday: "+ Birthday)
print("Address: "+ Address)
print("Course: "+ crs)
print("Last Sem GWA: "+ gwa)

# + colab={"base_uri": "https://localhost:8080/"} id="txg2z12YDgmS" outputId="a45198ae-b0e6-412a-b8ff-4b459a763596"
n = 4
answ = "Y"

print(bool(2<n) and (n<6))




# + colab={"base_uri": "https://localhost:8080/"} id="bxRogxbJF_me" outputId="9f7705fe-29c2-4b14-ada2-69c4aa7733a9"
n = 4
answ = "Y"

print(bool(2<n) or (n==6))

# + colab={"base_uri": "https://localhost:8080/"} id="SbyKNxtZFnVc" outputId="f131a421-18ec-4520-b067-0f0a687cf74f"
n = 4
answ = "Y"

print(not(2<n) or (n==6))
print(not(n<6))


# + colab={"base_uri": "https://localhost:8080/"} id="YwasRqZQHmp_" outputId="9bb38a31-577b-46c8-af0a-7d41f77bb33e"
n = 4
answ = "Y"

print(bool(answ == "Y") or (answ == "y"))

# + colab={"base_uri": "https://localhost:8080/"} id="IRi14VgXIFf3" outputId="482f2d85-cd4c-4a14-adf2-5badc025192a"
print(bool(answ == "Y") and (answ == "y"))

# + colab={"base_uri": "https://localhost:8080/"} id="yW4SxpVaIO9b" outputId="0843af69-ffb6-4498-d70a-b53a060e439a"
print(not(answ == "y"))

# + colab={"base_uri": "https://localhost:8080/"} id="wChQOfM2IaLs" outputId="69de29c0-5b39-4dba-f1f5-f10008c565e4"
n = 4
answ = "Y"

(2<n) and (n==5+1) or answ == "No"

# + colab={"base_uri": "https://localhost:8080/"} id="-ocEQk42KkpQ" outputId="f2ac612f-7b44-40e4-bc3e-841efd9f66ed"
n = 4
answ = "Y"

(n==2 and n==7) or answ == "Y"

# + colab={"base_uri": "https://localhost:8080/"} id="S_gP3DWdLPc4" outputId="d2ec6b36-9072-44ef-f57c-f6c4b5f7cc78"
(n==2) and (n==7) or (answ=="Y")

# + colab={"base_uri": "https://localhost:8080/"} id="qKcJB4KQL_HO" outputId="a50ffb02-4c7e-40eb-c808-30748a2470d2"
x = 2
y = -3
w = 7
z = -10	

a = x/y
b = w/y/x
c = z/y%x
d = x% - y*w
e = x%y
f = z%w-y/x*5+5
g = 9-x%(2+y)
h = z//w
i = (2+y)**2
j = w/x*2

print(a)
print(b)
print(c)
print(d)
print(e)
print(f)
print(g)
print(h)
print(i)
print(j)


StarcoderdataJupyterScriptsDedupFiltered