Introduction to Programming taught by Eric Satterfield · Spring 2023
Yes! As long as you show up to class and do the assignments, you will do well in this class. You have multiple resources at your disposal to help you succeed in this class.
If you're struggling with an assignment, you can always ask for help on the class Teams page. You can also ask for help during office hours.
Microsoft Teams is the official mode of communication for the class. If you have any concerns about grading only then please reach out through an email and emails that do not have the course name, number, and the section will be ignored.
Attendance is not being recorded for this class but there's going to be a lot of content covered and examples that will be covered in class so you're expected to show up.
AI Policy: Not Permitted in this Course for Assignments
In this course, it is expected that all submitted work is produced by the students themselves, whether individually or collaboratively. Students must not seek the assistance of Generative AI Tools like ChatGPT for graded assignments. Use of a Generative AI Tool to complete an assignment constitutes academic dishonesty. Students may use Generative AI tools as a study tool, but be forewarned that AI tools are not trustworthy.
If you have any more quetions about the AI Policy, please reach out to the instructor.
This link should take you to the downloads page for VS Code. Yes, it's compatible with a Mac. Use the Windows installer for Windows and the Mac installer for Mac.
Yes, you can access VS Code on the virtual lab. You can access the Harbert Virtual Lab by clicking on this link: Harbert Virtual Lab
We highly recommend that you save your code in the One Drive folder on the Virtual Lab. This will make it easier for you to access your code from anywhere.
The naming convention for assignment submissions is: "username_PA#". For example, if I were to submit programming assignment 1, I would name it "hzs0084_PA1".
Failure to follow this naming convention will result in a 0 the assignment. If a student submits an assignment with the wrong naming convention and the submission deadline has passed.
It's upto the instructor's discretion whether or not to accept the assignment. If the assignment is accepted, the student will receive a 20% on the assignment.
All the submissions should be in a zip file. You can submit that zip file on Canvas.
Each student will get two late days for the semester. You can use these late days for any assignment but you have to reach out to the TA to let them know you are going to use a late day so that the TA doesn't take off any late points. Otherwise as stated in syllabus there will be a 20% deduction as late penalty.
dotnet new console -o HelloWorld
cd HelloWorld
dotnet run
There's also a red squiggly line under the line where the error is located. This is another way of telling us that there's an error in the code. If you hover over the red squiggly line, it will tell you the same thing as the error message.
A variable is a storage location that has a name and a value. The value of a variable can change. For example, int x = 5; is a variable. The name of the variable is x and the value of the variable is 5. The value of the variable can change. For example, x = 10; is a valid statement. The value of the variable x is now 10.
A constant is a storage location that has a name and a value. The value of a constant can't change. For example, const int x = 5; is a constant. The name of the constant is x and the value of the constant is 5. The value of the constant can't change. For example, x = 10; is not a valid statement. The value of the constant x can't change.
Console.WriteLine() is a method that prints the value of the variable inside the parenthesis to the console. For example, Console.WriteLine("Hello World"); will print Hello World to the console.
When we refer to the console, we're referring to the terminal. The terminal is the black screen that you see in VS Code. The terminal is also known as the command line.
In simple terms. we are asking VS Code to write an output to the terminal. The output is the value of the variable inside the parenthesis. In this case, the output is Hello World.
Console.ReadLine() is a method that reads the input from the user and stores it in a variable. For example, string name = Console.ReadLine(); will read the input from the user and store it in a variable called name.
When we refer to the console, we're referring to the terminal. The terminal is the black screen that you see in VS Code. The terminal is also known as the command line.
In simple terms. we are asking VS Code to read the input from the user and store it in a variable. The variable is name. The input is the value that the user enters in the terminal. In this case, the input is the user's name.
A variable is a storage location that has a name and a value. The value of a variable can change. For example, int x = 5; is a variable.
The name of the variable is x and the value of the variable is 5. The value of the variable can change. For example, x = 10; is a valid statement. The value of the variable x is now 10.
For more information on different types of variables, you can click on this link and read the documentation: C# Variables
A constant is a storage location that has a name and a value. The value of a constant can't change. For example, const int x = 5; is a constant.
We define constants because throughout the code we don't want to change the value of the variable. For example, if we're using the value of pi in our code, we don't want to change the value of pi. We want to keep it constant.
Pseudocode is a way of writing code in plain English. It helps programmers plan out how they want their software to work before actually implementing it.
You need to submit a .txt file or a Microsoft Word file to count as a submission for your assignment. You only need to write Pseudocode for Programming Assignments.
Here is an example of Pseudocode for a program that calculates the cookie consumption:
// Declare Variables that hold Calories per Oreo, Oreos consumed, total calories, and servings
declare const int oreoCalories = 56;
declare double oreosConsumed;
declare double totalServings;
declare double totalCalories;
// Let the user input the amount of Oreos they have consumed and store input in oreosConsumed
Display “Enter the number of Oreo Cookies eaten.”;
Input oreosConsumed;
// Calculate the total amount of calories consumed (# of oreosConsumed * oreoCalories)
totalCalories = (oreosConsumed * oreoCalories);
Display “Here are the number of calories eaten: “ (totalCalories);
// Calculate the number of servings consumed (# of oreosConsumed / 2)
totalServings = (oreosConsumed / 2);
Display “Here are the number of servings eaten: “(totalServings);