Questions: 5 831

Answers by our Experts: 5 728

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a Python program that uses a WHILE loop. The program must prompt the user to enter an integer number. The value must be added to a total. The loop must continue until the total exceeds 45. After the loop, the average of the numbers must be calculated. The program must display each of the input values, as well as the sum of all values and the average value. *** enhancement, replace the user prompt with a random number selector
Write a Python program that uses a FOR loop. The program must prompt the user to enter five integer numbers. The program must display each of the input values, as well as the sum of all values and the average value.
Describe How Tuples Can Be Useful With Loops Over Lists And Dictionaries, And Give Python Code Examples. Create Your Own
Write a function named "count_values" that takes a list of integers as a parameter and returns the number of values in the list that are strictly greater than 681
Instructions
The following code is meant to output verses of Old MacDonald had a farm. So if the user types in Python for an animal and ssss for the sound, it should output:

Old Macdonald had a farm, E-I-E-I-O
And on his farm he had a Python, E-I-E-I-O
With a ssss-ssss here and a ssss-ssss there
Here a ssss there a ssss
Everywhere a ssss-ssss
Old Macdonald had a farm, E-I-E-I-O
Copy and paste the code below into CodeSkulptor and then debug the code so that it outputs the verses correctly.

a = input("Enter an animal: ")
s = input ("Enter a sound: ")

e = "E"

print ("Old Macdonald had a farm, " + e)
print ("And on his farm he had a" + a + "," + e)
print ("With a " + a + "-" + a + " here and a" + s + "-" + s + " there")
print ("Here a "+ s+ " there a " +s)
print ("Everywhere a" + s + "-" + a )
print ("Old Macdonald had a farm," + e)
Write a programme that has two variables length and breadth, assign integer value to these variables.use the formula area + breath to calculate using a print command
Provide your own examples of the following using Python lists. Create your own examples. Do not copy them from another source.

Nested lists
The “*” operator
List slices
The “+=” operator
A list filter
A list operation that is legal but does the "wrong" thing, not what the programmer expects
Provide the Python code and output for your program and all your examples.
Write a Python program that does the following.

Create a string that is a long series of words separated by spaces. The string is your own creative choice. It can be names, favorite foods, animals, anything. Just make it up yourself.

Turn the string into a list of words using split.

Delete three words from the list, but delete each one using a different kind of Python operation.

Sort the list.

Add new words to the list (three or more) using three different kinds of Python operation.

Turn the list of words back into a single string using join.

Print the string.


Provide your own examples of the following using Python lists. Create your own examples. .

Nested lists
The “*” operator
List slices
The “+=” operator
A list filter
A list operation that is legal but does the "wrong" thing, not what the programmer expects

Provide the Python code and output for your program and all your examples.
Assignment 8: Calendar Create a calendar program that allows the user to enter a day, month and year in three separate variables. Then ask the user to select froma menu of choices using this formatting: Please enter a date Day: Month: Year: Menu: 1) Calculate the number of days in the given month. 2) Calculate the number of days left in the given year t must include the following functions: ter and returns a 1 if a year is a leap year et and O if it is not. This information will only be used by other functions umber of days: This subprogram will accept the date as parameters and return how many days are in the given monthe. the date as parameters and then calculate the number of days left in the year. This should not include the date the user entered in the count
A professor with two assistants, Jamie and Drew, wants an attendance list of the students, in the order that they arrived in the classroom. Drew was the first one to note which students arrived, and then Jamie took over. After the class, they each entered their lists into the computer and emailed them to the professor, who needs to combine them into one, in the order of each student's arrival. Jamie emailed a follow-up, saying that her list is in reverse order. Complete the steps to combine them into one list as follows: the contents of Drew's list, followed by Jamie's list in reverse order, to get an accurate list of the students as they arrived.
LATEST TUTORIALS
APPROVED BY CLIENTS