• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 1 out of 2 pages
Exam (elaborations)

Python Programming Chapter 2 Summary-Questions and Answers

Document preview thumbnail
Preview 1 out of 2 pages

Python Programming Chapter 2 Summary-Questions and Answers Steps to writing a program - ANSWER-1. Problem Analysis: Studying the problem to be solved 2. Program Specification: Deciding exactly what the program will do. 3. Design: Writing an algorithm in pseudocode. 4. Implementation: Translating the design into a programming language. 5. Testing/Debugging: Finding and fixing errors in the program. 6. Maintenance: Keeping the program up to date with evolving needs. IPO - ANSWER-Many simple programs follow the input process output (IPO) pattern Programs are composed of statements that are built from - ANSWER-identifiers and expressions Identifiers - ANSWER-names; begin with an underscore or a letter which can be followed by a combination of letter, digit, or underscore characters; are case-sensitive in Python Expressions - ANSWER-fragments of a program that produce data; can be composed of literals, variables and operators literals - ANSWER-a representation of a specific value; 3 is a literal representing the number three variables - ANSWER-an identifier that stores a value; a named piece of memory operators - ANSWER-used to combine expressions into more complex expressions; in x + 3 * y the operators + and * are used; includes usual arithmetic operations of addition(+), subtraction(-), multiplication(*), division(/), and exponentation(**) The Python output statement print - ANSWER-displays the values of a series of expressions to the screen Assignment - ANSWER-assignment of a value to a variable is indicated using the equal sign (=). using assignment, programs can get input from the keyboard; Python also allows simultaneous assignment, which is useful for getting multiple input values with a single prompt The eval function can be used to evaluate input.. - ANSWER-..but it is a security risk and should not be used with input from unknown or untrusted sources


Document information

Uploaded on
March 28, 2024
Number of pages
2
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers
$8.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
0
Followers
0
Items
386
Last sold
-



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions

Whoops! We can’t load your doc right now. Try again or contact support.