# Lab Assignment 2: answer a few questions in a word processing file and write a python file solution for a programming exercise.

Anonymous
account_balance_wallet \$9.99

### Question Description

• Create a word processing file that contains your answers to the following Algorithm Workbench questions:
From Chapter 3 on pages 150 and 151, Questions 2 and 7 (20 points)
From Chapter 4 on page 203, Questions 2, 3, and 4 (30 points)
Name this file "XYLab2", where "X" and "Y" are your first and last initials.
• Create a Text file with a ".py" file extension that contains your proposed solution to Programming Exercise 12, Software Sales, at the end of Chapter 3 on page 154. (50 points)
Name this file "XYLab2.py", where "X" and "Y" are your first and last initials.

Chapter 3 question 2

Write an if statement that assigns 0 to the variable b, and assigns 1 to the variable c if the variable a is less than 10.

Chapter 3 question 7

Write an if-else statement that determines whether the points variable is outside the range of 9 to 51. If the variable's value is outside this range it should display "Invalid points." Otherwise, it should display "Valid points."

Chapter 4 question 2

Write a while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The loop should ask the user if he or she wishes to perform the operation again. If so, the loop should repeat, otherwise it should terminate.

Chapter 4 question 3

Write a for loop that displays the following set of numbers: 0, 10, 20, 30, 40, 50 . . . 1000

Chapter 4 question 4

Write a loop that asks the user to enter a number. The loop should iterate 10 times and keep a running total of the numbers entered.

Programming exercise with .py extension.

A software company sells a package that retails for \$99. Quantity discounts are given according to the following table:

Quantity Discount

10-19 10%

20-49 20%

50-99 30%

100+ 40%

Write a program that asks the user to enter the number of packages purchased. The program should then display the amount of the discount (if any) and the total amount of the purchase after the discount.

dresva
School: Duke University

You will find both the word and python file on this link https://files.fm...

flag Report DMCA
Review

Anonymous
Tutor went the extra mile to help me with this essay. Citations were a bit shaky but I appreciated how well he handled APA styles and how ok he was to change them even though I didnt specify. Got a B+ which is believable and acceptable.

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors