# ---
# 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/24mainia/2021_22-Ratza-Intro-CS-Sem-2/blob/main/ANTHONY_MAINI_Copy_of_python_basics_assignment.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>

# + [markdown] id="2cOCCaF6Q4ys"
# ### Key Terms
#
# Complete the following questions to solidify you're understanding of the key concepts. Feel free to use the lecture notebook or any other resources to help you, but do not copy and paste answers from the internet instead use your own words to present your understanding.
#
# ----

# + [markdown] id="e_bDYmbjRHNc"
# What is a general use programming language? ***The purpose of a programing language is to give the computer instructions on how to preform a task. Takes in the code, which translates into ones and zeros. That is the compiler's job. ***

# + [markdown] id="X4j6a8y4RHGG"
# Who invented Python and when?
# ***<NAME> created Python in the 1980s to make it easier to read and write ***

# + [markdown] id="RHkgvf39RHBm"
# What is the difference between front-end and back-end?
# **A front-end is what you can see, while a back-end is what is behind the scenes.**

# + [markdown] id="oTkkpwhVRG80"
# What is a GUI?
# ***GUI can be used to carry out commands using icons, menus, etc. ***

# + [markdown] id="nHjQwFW1RG4C"
# What is an API?
# **Application programing interface, sets of deffinitions for intergrating**

# + [markdown] id="RWzJmW61RGzR"
# What is Open Source Software?
# ***A software that can allow anyone to change or modify the code. ***

# + [markdown] id="gob_Rgp8RGqT"
# What is a development environment?
# ***A software application that can allow you to code and give instructions to the computer. ***

# + [markdown] id="lKduQMuWSYoC"
# What is meant by local and remote in the context of computers?
# ***Local is restricted to the place here. While remote is another place.***

# + [markdown] id="cb6Coc48Sgev"
# What is an operating system?
# ***Software that provides hardware, recources, and services. ***

# + [markdown] id="7tRiStzGSltk"
# What is a kernel?
# ***The computer program that has control of the computer's operating system. Basicly has control of everything.*** 

# + [markdown] id="WdOAakQJSloH"
# What is a shell?
# ***Shows the code to the person operating the device. Can modify the code if needed.*** 

# + [markdown] id="hn5QICK0Slio"
# What shell do we have access to in Colab notebooks?
# ***It is the outermost layer of the system.***

# + [markdown] id="dmgmzh-ISldB"
# What is an interpreter?
# ***Translates one statement from the program into machine language. ***

# + [markdown] id="A2q30j02S3G3"
# What is a value in programming?
# ***A entity that can be manipulated in the program by the person coding. ***

# + [markdown] id="KI34llQnS--5"
# What is an expression in programming?
# ***Values and functions are combined by the compiler to make a new value. ***

# + [markdown] id="pmKFicLMTCcD"
# What is syntax?
# ***The "rules" of programing. Basicly like grammer, but you have to code correctly to get the computer to understand. ***

# + [markdown] id="B8m5jqm6TLHE"
# What do we call the process of discovering and resolving errors?
# ***We call them finding bugs, and we can debug the code, and fix it.*** 

# + [markdown] id="OJR_RDQpTRyR"
# ### Code

# + [markdown] id="zPvODBfiTWCP"
# Let's revisit some of the things we practiced in the lecture. In the code cell below print your name to the console without first declaring it as a variable.

# + id="mZb-v_UwTO7B" colab={"base_uri": "https://localhost:8080/"} outputId="77ae3334-5eaf-4c27-d54d-d2667c7847f9"
print("Anthony")

# + [markdown] id="sZPksnwpTnTD"
# Now declare your first name and last name as separate variables and combine them in the print statement.

# + id="oqmZRhYLTztw"
firstname=("Anthony")
lastname=("Maini")

# + [markdown] id="cNe3K4WZT2_0"
# In the cell below run the "Zen of Python" easter egg.

# + id="FSkN7Q52UKyU" colab={"base_uri": "https://localhost:8080/"} outputId="4e914330-ba91-4720-a908-50861378e21e"
>>> import this

# + [markdown] id="2ADI5kQAUMLI"
# ### Explore

# + [markdown] id="vchHFmicUOid"
# This portion of the assignment contains things we didn't explicitly cover in the lecture, instead encouraging you to explore and experiment on your own to discover some of the different operators and expressions in Python. For each expression first describe what you expect to happen before running the code cell.
#
# Documentation for Python's numeric operators can be found [here](https://docs.python.org/3.10/library/stdtypes.html#numeric-types-int-float-complex)

# + [markdown] id="_lTiBbJMU28S"
# #### `5 + 2 * 2`
#
# What do you expect to happen?
# ***Add 5 + 2 and multiply the sum of that number by 2.***

# + id="ALTC2aYRUNRe"


# + colab={"base_uri": "https://localhost:8080/"} id="yvCBm1GLebIt" outputId="ff6e9530-023d-4758-a905-8f069a4fa357"
5+2*2

# + [markdown] id="zSMDH8osVEEN"
# #### `2 / 3`
#
# What do you expect to happen?
#  ***Program will divide 2 by 3.***

# + id="FYMUlyCEVHD1" colab={"base_uri": "https://localhost:8080/"} outputId="9fbd0719-2404-4ea1-f8e2-1b3d1760db12"
2/3

# + [markdown] id="c8LQrbNQVIID"
# #### `2.5 * 10`
#
# What do you expect to happen?
#  ***Multiply 2.5 times 10. ***

# + id="IuE7GclzVOpO" colab={"base_uri": "https://localhost:8080/"} outputId="0b7546f4-7455-4849-df9b-bfa1f28eb540"
2.5*10

# + [markdown] id="YfKfY31nVSfy"
# #### `a`
#
# What do you expect to happen?
# ***Varible will be unchanged.***

# + [markdown] id="Y_FQACtgVVL8"
#

# + id="pukzPvzXVUgM" colab={"base_uri": "https://localhost:8080/", "height": 166} outputId="4e3a1f65-4d07-4bcb-fbe8-bcf71e3dade3"
a

# + [markdown] id="x_G2qoXLVhVj"
# #### `'a'`
#
#
# What do you expect to happen?
# ***Respond with 'a'***

# + id="e0PEkzRHVjVo" colab={"base_uri": "https://localhost:8080/", "height": 35} outputId="c30e6a91-d01f-4d27-f4a5-317721697568"
'a'

# + colab={"base_uri": "https://localhost:8080/"} id="TWs3jpSsfl4w" outputId="a65f971a-5dc9-45be-cd93-b07b5cd7fdc7"
521//5

# + [markdown] id="2kCnvuRvVprG"
# #### `521 // 5`
#
# What do you expect to happen?
# ***521 is the floored quotient of x and y***

# + [markdown] id="QWOocovcV3i6"
#

# + id="n9QgKjHxV7oX"


StarcoderdataJupyterScriptsDedupFiltered