Python program with .py extension discussion Lab Assignment 5:Create a word processing file that contains your answers to Algorithm Workbench questions 1, 2, 3, 5, and 7 at the end of Chapter 7. (50 points)Name this file “XYLab5”, 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 3, Rainfall Statistics, at the end of Chapter 7. (50 points)Name this file “XYLab5.py”, where “X” and “Y” are your first and last initials. 402 Chapter 7 Lists and Tuples
5.
If y
a fil
par
as
w
as
th
sh
Algorithm Workbench
1. Write a statement that creates a list with the following strings: ‘Einstein’, ‘Newton
Copernicus’, and ‘Kepler’.
2. Assume names references a list. Write a for loop that displays each element of the list
3. Assume the list numbers 1 has 100 elements, and numbers2 is an empty list. Write code
that copies the values in numbers 1 to numbers2.
4. Draw a flowchart showing the general logic for totaling the values in a list.
5. Write a function that accepts a list as an argument (assume the list contains integers)
and returns the total of the values in the list.
6. Assume the names variable references a list of strings. Write code that determines
whether ‘Ruby’ is in the names list. If it is, display the message ‘Hello Ruby
Otherwise, display the message ‘No Ruby’.
7. What will the following code print?
list1 = [40, 50, 60]
list2 = [10, 20, 30]
list3 = list1 + list2
print(list3)
8. Write a statement that creates a two-dimensional list with 5 rows and 3 columns. Then
write nested loops that get an integer value from the user for each element in the list
P ?
(
Programming Exercises
1. Total Sales
Programming Exercises
1. Total Sales
Design a program that asks the user to enter a store’s sales for each day of the week. The
amounts should be stored in a list. Use a loop to calculate the total sales for the week and
display the result.
gener
2. Lottery Number Generator
Design a program that generates a seven-digit lottery number. The program
program should
ate seven random numbers
, each in the range of 0 through 9, and assign each number to a
list element. (Random numbers were discussed in Chapter 5.) Then write another loop thar
displays the contents of the list.
3. Rainfall Statistics
Design a program that lets the user enter the total rainfall for each of 12 months into a
list. The program should calculate and display the total rainfall for the year, the average
monthly rainfall, the months with the highest and lowest amounts.
4. Number Analysis Program
Design a program that asks the user to enter a series of 20 numbers. The program should
store the numbers in a list then display the following data:
The lowest number in the list
. The highest number in the list
The total of the numbers in the list
The average of the numbers in the list
Purchase answer to see full
attachment
Economic Debate- Progressive Income Tax For this Economic Debate, we are going to discuss the…
TOPIC: Going Global Discussion Thread 1 (initial post due Wednesday for full credit) Please note:…
Assignment Topic This week will culminate in the creation of a narrated PowerPoint to create…
The Assignment must be submitted on Blackboard (WORD format only) via allocated folder. Assignments submitted…
you need to post your 2-page information flier to share with your Final Project Group.…
discussion: Discuss the methods used at your company to measure and ensure quality products and…