Docsity

Introduction to Programming in Python: Questions and Solutions, Exams of Computer Science

Toggle sidebar
bg1
C859 - Introduction to Programming in
Python Questions and Complete
Solutions Graded A+
Computer Program - Answer: Instruction executing one at a time on a digital device.
Input - Answer: The data put INTO a program (eg. from a file, keyboard, touchscreen, etc.)
Process - Answer: The computations performed on input data, such as adding two values (eg. x + y).
Output - Answer: The data created by a process that is put out some way (eg. file, screen, network).
Variable - Answer: A piece of data that can vary depending on the input.
Algorithm - Answer: A sequence of instructions that solves a problem.
Python Interpreter - Answer: A computer program that executes code written in the Python
programming language.
Interactive Interpreter - Answer: A program that allows the user to execute one line of code at a time
Statement - Answer: A program instruction, typically appearing on its own line.
Expressions - Answer: Code that returns a value when evaluated.
Assignment - Answer: A new variable is created by performing an assignment using the '=' symbol (eg.
salary = wage * hours * weeks).
Print() - Answer: Displays variables or expression values.
pf2

Partial preview of the text

Download Introduction to Programming in Python: Questions and Solutions and more Exams Computer Science in PDF only on Docsity!

C859 - Introduction to Programming in

Python Questions and Complete

Solutions Graded A+

Computer Program - Answer: Instruction executing one at a time on a digital device. Input - Answer: The data put INTO a program (eg. from a file, keyboard, touchscreen, etc.) Process - Answer: The computations performed on input data, such as adding two values (eg. x + y). Output - Answer: The data created by a process that is put out some way (eg. file, screen, network). Variable - Answer: A piece of data that can vary depending on the input. Algorithm - Answer: A sequence of instructions that solves a problem. Python Interpreter - Answer: A computer program that executes code written in the Python programming language. Interactive Interpreter - Answer: A program that allows the user to execute one line of code at a time Statement - Answer: A program instruction, typically appearing on its own line. Expressions - Answer: Code that returns a value when evaluated. Assignment - Answer: A new variable is created by performing an assignment using the '=' symbol (eg. salary = wage * hours * weeks). Print() - Answer: Displays variables or expression values.

Comments - Answer: Used to explain portions of code and are denoted by the '#' character in Python. String Literal - Answer: Text enclosed in quotes. The text can have letters, numbers, spaces, or symbols.

  • Best practice will typically use single quotes around text. end=' ' - Answer: Keeps the next print's output on the same line separated by a single space.