Introduction
In this module, you'll explore the types of jobs available to computer programmers and the important soft skills employers are looking for.
Then, you'll explore the names and uses for typical programming data types, then write a program using those variables, expressions, statements, values, data types operators, operands, and input while adhering to the order of operations.
Regardless of the programming language being used, these concepts don't change, however, their usage and syntax might vary from language to language.
Software Engineers use a variety of hardware and software to help them manage programming projects. Their computers are typically new, fast and connected to multiple displays so they can see what they are writing, how it looks, if it has errors, look up existing solutions, and communicate with their team.
They often must write locally on their computer (hard drive) and backup to a cloud server and deploy their application on a web server.
Careers in Computer Programming
Computer programmers are in high need within the Software Engineering industry. For this week's discussion synthesize what you've learned about one job, one skill, and/or one aspect of a computer programming job, based on one or more of these sources:
Read Think Python
Read through Think Python's Chapter 2. Simple Python Data:
In-class Activity
In small groups, collaborate in your existing Google Sheet or Excel file named "Python Concept Reference Sheet" and add a new sheet for data types. Document the names, definitions, and examples of the differences in any order that makes sense. Document some or all of these concepts that might be hard to remember:
- assignment statement
- assignment token
- bool()
- comment
- data type, class
- decrement
- evaluate
- expression
- float()
- increment
- initialization
- int()
- integer division
- keyword
- modulus operator
- object
- operand
- operator
- prompt string
- reference diagram
- rules of precedence
- state snapshot
- statement
- str()
- type conversion function
- value
- variable
- variable name
Then, add a new sheet for the Operators and their related concepts, such as:
- Comments
- Precedence/Order of Operations
- Comparison
- Logical, Identity, and Membership
- Assignment
Finish the definitions of the Operators as you finish reading through the textbook.
Program 2 is based off of Exercise 2.13.3 of the textbook. To help you develop Program 2 (detailed in the next tab of this page), discuss how you would:
- Meet a vague brief.
- Outline the steps/procedure to follow in comments in the assignment .py file.
- This process is what programmers refer to as writing pseudocode. Write the steps in plain English (or your native language) in complete sentences. Outline the tasks in the order they will be needed and comment them out in your file.
- Determine if your pseudocode comments are detailed enough for you to write the code.
Once you've done that in your groups, begin to code Program 2 on your own.
Write Program 2
This program relies on information from Chapters 1 and 2 of the textbook as well as Exercise 2.13.3.
- In the second module's folder of your workspace folder, make a new file named p2-username-datatypes.py. Replace 'username' with your ONID username.
- In the file, write commands in Python to do the following:
- Comment your first and last name and the date.
- Comment the name of this assignment "Data Types on the Job".
- Write pseudocode comments that describe each step of your program, based on requirements provided in the next step.
- Using variables, input, float, integer, subtraction, multiplication, division, and strings, print a message (in complete sentences with proper grammar and punctuation) that tells you (specifially) how many hours you worked so far, the hours required in your shift, the hours remaining in the shift, the percentage of hours worked so far, the minutes remaining in the shift, and three tasks to complete during the remainder of the shift.
- Save the file using cntls or ⌘s.
- Run the program using one of these methods:
- Click the run arrow ▶ at the top right of the editing screen.
- In the terminal, type: python p2-username-datatypes.py
- Right-click on the file in the file list (or from in the file) and choose Run Python file in terminal.
- Backup your work to a cloud drive and/or USB stick drive.
Submit Program 2
Zip the .py file and upload it to the Module > Assignment in Canvas. The Instructor/TA will download the zip archive and run your .py file to score it.
- Mac
Select the file(s) and right-click to choose Compress files. - Windows
Select the file(s) and right-click to choose Send to... → Compress (Zipped) archive. - Chromebook
Select the file(s) and right-click to choose Zip selection.
Respond to Feedback
Within 3 days of your submission, check the Canvas → Grades area to view your score in the Rubric, along with our feedback.
Respond to the feedback if you have questions, by replying in the Grades → Assignment → Comment box.