Create a count-controlled while loop to generate

Assignment Help Python Programming
Reference no: EM132383501

Python Lists and Dictionaries

Python has several data types that can be used to work with collections of data, including lists, sets, dictionalries and tuples. This week we wil work with lists and dictionaries.

Your work includes a Zybooks reading assignment and two programming assignments, one for lists and one for dictionaries. TheZybooks reading assignment includes some sections from Chapter 3 about data types and from chapter 8 about lists and dictionaries.

Your tasks are to:

1. complete the list programming assignment:

Write and submit a program that does the following:

create an empty Python list

Create a count-controlled while loop to generate and append 1,000 random integers to the list. Each integer should be between 1 and 100, including 1 and 100.

Using the for statement to iterate the list, calculate and print:

the sum of the values in the list.

the minimum of the values in the list.

the maximum of the values in the list.

the average of the values in the list.

You should be able to do step 3 with a single loop, followed by a statement to find the average and then print statements to show the results. The statement to find the average should use the list length function, not the number 1,000, which means it should work no matter how many numbers are in the list.

2. complete the dictionary programming assignment:

Your task is to use a Python dictionary to provide information about the poinbts scored by a basketball team in one game.

Write a program that does the following:

Using the assignment statement below, create a dictionary with points scored by each of the Philadelphia 76ers against the Brooklyn Nets on April 20, 2019.

points = dict(Harris=24, Butler=11, Embiid=31, Simmons=15, Reddick =9, Scott=8, Ennis=7, Marjanovic=4, Bolden=1, McConnell=2)

Iterate the dictionary once, resulting in a printout that shows us:

a list of the players and the points they each scored, with one player on each line.

the total number of points they scored.

the name of the highest scorer on the team.

You should submit your properly documents source code. You should start with documentation as a tool to help you design your software.

Attachment:- Python.rar

Reference no: EM132383501

Questions Cloud

Find a nearly continuous flow of substances back : If we inspect most cell membranes in a living human body, we would find a nearly continuous flow of substances back and forth across the plasma membrane.
Write a shell script named stick which plays a matchstick : Write a shell script named stick which plays a matchstick-picking game. Given an initial number of sticks, players take turns picking.
What is the best way to measure bone density : a. Explain how aging and the lack of estrogen contribute to the development of osteoporosis.
Why is it important for organisms to maintain a ph : Why is it important for organisms to maintain a pH within a very narrow range and what type of a compound (molecule) is used to help maintain that narrow range?
Create a count-controlled while loop to generate : Create a count-controlled while loop to generate and append 1,000 random integers to the list. Each integer should be between 1 and 100, including 1 and 100.
How your current practice may change in the future : Discuss how your current practice may change in the future as a result of your understanding of one particular Essential of Master's Education in Nursing.
What is your action plan to meet your goals : Are you qualified and if not what would you need to do to increase your chances of being competitive for this position, What steps have you taken over.
Adults cats are often used for dissection : Describe some difficulties you might encounter using an adult cat for a dissection as compared to a fetal pig, with focus on the skeletal system.
Four identified species of giraffe : You are to examine the available information on the four identified species of giraffe. (1) Prepare a table separating them into 4 species by their physical cha

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd