Compute numbers and create a list that contains the numbers

Assignment Help Python Programming
Reference no: EM132360783

Create Python programs to do the following (the names of the programs that you should save them as precede the program specification):

1. Invite.py: Create a list of five names, such as ['Margot', 'Kathryn', ‘Pamela']. Create a for loop that iterates through the list and creates a string with the words "Hi', the name of the friend and the words ". Please come to my party on Saturday!" so that the result looks like:

Hi Margot. Please come to my party on Saturday!

Hi Kathryn. Please come to my party on Saturday!

Hi Pamela. Please come to my party on Saturday!

2. Difference.py: Create two lists: list1 = [2, 6, 10] and list2 = [1, 3, 5]. Create a for loop that iterates through the two lists and calculates the difference between the respective element of each list. Also in the for loop, find the difference squared and keep a running total of that number.

Print the difference after each time it is calculated and the sum after each time it is calculated, so that it looks like this:

The difference is xxx

The sum is yyy

where xxx and yyy are the calculated values.

3. Odd.py: Write a program that generates all odd numbers from 1 to n. Ask the user for n and set n in the beginning of the program. Use a while loop to compute the numbers and create a list that contains the numbers. The print out the resulting list.

Reference no: EM132360783

Questions Cloud

Design a business plan based on new innovative venture : BUSS1011 - Entrepreneurship and New Venture Creation - Middle East College - Oman - Business Plan - Design a business plan based on new innovative venture
Write a program that obtains two integer numbers from user : Pseudo code is basically a shorthand way of describing a computer program functions; it creates the logical structure describing the actions to execute.
Construct and animate a solution to frogs and toads puzzle : COMP332 Programming Languages Assignment - Solving the Frogs and Toads problem in Scala, Macquarie University, Australia
Write a program that for any census year input the program : Write a program that for any census year input (e.g., 1970) the program will print the state and its total population with the minimum and maximum.
Compute numbers and create a list that contains the numbers : Write a program that generates all odd numbers from 1 to n. Ask the user for n and set n in the beginning of the program. Use a while loop to compute.
Create the pseudo code from the following request : The program must have some sort of menu that allows users to make selections to do a particular calculation. It must provide five menu items that allow the user
Calculate the syndrome : what is the loss in terms of mean SNR compared with full MRC and Derive the pdf of the SNR at the output of the combiner for the given cases.
Compute the value of e using all three of the methods : Write a program that computes the value of e using all three of the methods described. Use values of 1, 2, 5, 10, 100, 1000, and 10000 for the first method.
How does one define a new class and its methods : What is meant by the methods associated with a class/object? How do they relate to object-oriented programming? How does one define a new class and its methods?

Reviews

Write a Review

Python Programming Questions & Answers

  Define a function that takes in a dictionary as a parameter

CS 1301 - Define a function that takes in a dictionary as a parameter. The dictionary maps artists to the number of solo records they have.

  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.

  What is the purpose of variable fragnum

What is the purpose of variable fragNum in rdt1.0 sender code and how is the segmented message merged back in receiver? Which operation justifies it?

  Write a program that takes an indefinite amount of numbers

Write a program that takes an indefinite amount of numbers as input and outputs the next largest number to screen after the user is finished entering numbers.

  Creating a 3d densenet

Creating a 3D DenseNet - need metrics to evaluate the algorithm and its training performance - how many times you will downsample from the original size

  Recogntition of handwritten mathematical expressions

Recogntition of Handwritten Mathematical Expressions - You have the source code but some part of the code has some errors. So you need to correct these errors

  Create a function that takes in an excel formula and returns

Create a function that takes in an Excel formula and returns that formula in all lowercase and with all dollar signs removed.

  Tinter interactive animation program

I have a Tinter interactive animation program where I should do a number of specific features. For example, a rotating sticks animation is already set. I have to add the following feature "Pressing "z" teleports a random stick to a random location..

  Write a program which computes the amount tax to be paid

Write a program which computes the amount tax to be paid based on the following rule. The tax is- No tax if your income is less than or equal to 50,000.

  Write another python program to decode the encoded message

Write another Python program to decode the encoded message according to the "circular Caesar cipher" problem presented in Programming Exercises 7 and 8 of Book Chapter 5.

  Produce a program that effectively solves a real-world data

Produce a program that effectively solves a real-world data manipulation problem about child mortality - how you might solve a given data manipulation problem

  Design a game of Nim in Python

In this assignment, your task in to design a game of Nim in Python. Draw a flowchart that presents the steps of the algorithm required to perform the task

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