# ---
# 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/aguilarmajan/CPEN-21A-CPE-1-1/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="ltUeUQFjhcZ7"
# ### Midterm Exam

# + [markdown] id="eiuB-1N3r14h"
# ## Problem Statement 1.

# + colab={"base_uri": "https://localhost:8080/"} id="Vx8hqFqUhrZP" outputId="5a233415-7e7f-49aa-ff89-5ee3ec0a0906"
Fullname,Studentnumber,Age,Birthday,Address,Course,LastSemGWA = "Full Name: <NAME>","Student Number: 202102283","Age: 18","Birthday: November 19, 2002","Address: Lalaan 2nd Silang, Cavite","Course: BSCpE 1-1","Last Sem Average: 95"
print (Fullname)
print (Studentnumber)
print (Age)
print (Birthday)
print (Address)
print (Course)
print (LastSemGWA)

# + [markdown] id="mzRJ5zWhr7V4"
# ##Problem Statement 2.

# + colab={"base_uri": "https://localhost:8080/"} id="lWLSOmWvwDC0" outputId="978a1136-bec0-4913-e0a8-a02986029c60"
n = 4
answ = "Y"
print (n)
print (answ)

# + [markdown] id="_srO6rLjoMk1"
# ###a.

# + colab={"base_uri": "https://localhost:8080/"} id="ZZBfxMGEnjpX" outputId="abc4b9d0-c637-4723-e915-dc5e04725412"
(2<n) and (n<6)

# + [markdown] id="Jxu0c8zAoRpz"
# ###b.

# + colab={"base_uri": "https://localhost:8080/"} id="Q7QNSnNXoTFy" outputId="1bc06d3d-0750-417f-8e58-af4ede355e64"
(2<n) or (n==6)

# + [markdown] id="X9W27NI7pfeV"
# ###c.
#

# + colab={"base_uri": "https://localhost:8080/"} id="aVPbwWlKphUo" outputId="a6b6d36e-9448-418b-8a12-5270bbed72ca"
not(2<n) or (n==6)

# + [markdown] id="bzZdKtmAp5P5"
# ###d.

# + colab={"base_uri": "https://localhost:8080/"} id="e77ueNikp6uK" outputId="5c11fe53-df59-4cf9-992f-6d563ce307f1"
not(a<b)

# + [markdown] id="FT4Fqd6TqEoD"
# ###e.

# + colab={"base_uri": "https://localhost:8080/"} id="-UTr0T7xqGqb" outputId="370663f0-5ebe-4ba4-dde1-b266a3e87f40"
(answ=="Y") or (answ=="y")

# + [markdown] id="I6TMNYHlrE2x"
# ###f.

# + colab={"base_uri": "https://localhost:8080/"} id="bOdlTESNrGMx" outputId="d4dff6b2-371d-442f-8593-1195fef15d0e"
(answ=="Y") and (answ=="y")

# + [markdown] id="dU827OrprGeU"
# ###g.

# + colab={"base_uri": "https://localhost:8080/"} id="r64xUyEqrI5I" outputId="7bb1d4d9-0ed7-43ee-c613-647af335dd29"
not(answ=="y")

# + [markdown] id="We_6_nMyrJKq"
# ###h.

# + colab={"base_uri": "https://localhost:8080/"} id="0-uu6x4BrL20" outputId="79038e9a-8fa7-442f-db66-2795b483ccf0"
((2<n)) and (n==5+1) or (answ=="No")

# + [markdown] id="Fatc-k6BrMOl"
# ###i.

# + colab={"base_uri": "https://localhost:8080/"} id="6nL6M9jprNe4" outputId="c589e6bb-8e4c-4def-ec34-ec9eae1658c8"
((n==2)) and (n==7) or (answ=="Y")

# + [markdown] id="gSQsoCW2rQ12"
# ###j.

# + colab={"base_uri": "https://localhost:8080/"} id="F9u74hMLrTmW" outputId="0b1f83fc-89f7-4673-f235-aef9089cc458"
(n==2) and ((n==7)) or (answ=="Y")

# + [markdown] id="VmDTiwb6sBWT"
# ##Problem Statement 3.

# + colab={"base_uri": "https://localhost:8080/"} id="d7zXasuusD4_" outputId="7a84052b-3a93-40df-8aaa-573d47b2a234"
print (2/-3)
print (7/-3/2)
print (-10/-3%2)
print (2%--3*7)
print (2%-3)
print (-10%7--3/2*5+5)
print (9-2%(2+-3))
print (-10//7)
print ((2+-3)**2)
print (7/2*2)

StarcoderdataJupyterScriptsDedupFiltered