#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Felix Muzny 9/9/2022 DS 2000 Lecture 1 - introduction, variables, arithmetic Logistics: - Your first due dates will be next Friday (9/16) - Quiz 1 (will be released Tuesday, we'll talk about this Tuesday) - quizzes are intended to be lecture reviews. I recommend doing these Tuesday night :) - Homework 1 (we'll talk about this at the end of lecture today) While you get settled: One tool that you'll see me use often is a Poll Everywhere question. Three ways to participate (please do one of these!) 1) via the PollEverywhere website: https://pollev.com/muzny 2) via text: text "muzny" to the number 22333 to join the session 3) via Poll Everywhere app (available for iOS or Android) Here is the question that you are answering: ****** Question: is this your last class of the day on Fridays? A. yes! B. no! C. what is time? D. my schedule is still changing E. I like the letter E ****** """ """ Anatomy of a lecture w/ Prof. Felix --- 1. Please come to lecture ready to participate 2. I like to use various activities throughout lecture. I do this so that I can check your understanding as a whole class. (and for fun!) One tool that you'll see me use often is a Poll Everywhere question. Three ways to participate (please do one of these!) 1) via the PollEverywhere website: https://pollev.com/muzny 2) via text: text "muzny" to the number 22333 to join the session 3) via Poll Everywhere app (available for iOS or Android) The question will always be the following: Answer a multiple choice question A. A B. B C. C D. D E. None of the above Here's how it works! I'll display a question with answer options. Once I've cleared the responses for the next question, you'll be able to submit your answer to the next question """ """ Welcome to DS 2000! Who am I? Who are you? What is this class? Road map: how do we get to data? """ """ *Pause* What are the resources for this class/where can I find the things? - website (for everything) https://course.ccs.neu.edu/ds2000/ - Canvas (to look at your grade, eventually) - Gradescope (to submit your homework) - Piazza (course discussion board) It's a lot of things! I recommend bookmarking the website and piazza. We'll always link to the items that you need from the course website. :) """ """ * Pause #2 * Spyder demo/introduction Please come to office hours if you are having any installation difficulties with spyder! """ """ Anatomy of Prof. Felix's lecture notes --- This is a python program! It is *also* where you can expect to find my notes for class for each day. I like to put blocks of notes that go together between sets of triple quotes (more about this in the "Anatomy of a python program" section) When there is a specific section of the textbook or notes that I think goes nicely along with a topic, I'll do my best to make a note of it like this: (Deitel & Deitel 2.2) - for Intro to Python (Downey 2.1) - for Think Python (Muzny 2.1 [link]) - for Felix's Python notes """ """ Anatomy of a python program --- python: the programming language that we're working with - essentially human-readable commands that your computer can translate into (hopefully) useful manipulation of bits bit: a 0 or a 1 ("off-ness" and "on-ness") python program: a file on your computer that contains commands in the python programming language. Ends with the extension .py this tells your computer "hey! please run this file using the python interpreter!" python interpreter: the software that you installed on your computer that translates python commands into actual manipulations of bits on your computer """ """ Writing our first program! --- Python programs consist of *two* kinds of statements: 1) comments 2) executable lines Python programs run top to bottom. Comments are ignored Executable lines are run So far, everything in this file has been: """ """ Displaying information: print() (Deitel & Deitel 2.4) """ """ Variable assignment (Deitel & Deitel 2.2) """ """ Arithmetic operators (Deitel & Deitel 2.3) """ """ Homework 1: - There are 3 problems - each asks you to get some information from the user (we'll do this a lot in class on Tuesday), then do some calculations - to get started, let's do an example """ """ Example problem 1: Write a program that asks the user how old they are, then prints this number out. """ """ Example problem 2: Write a program that asks the user how many apples they would like to eat each day, then calculates how many apples they should buy per week. """