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 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. 

Create your own example of a function that modifies a list passed in as an argument. Describe what your function does in terms of argumentsparametersobjects, and references


Create a simple text-based console game that implements at least three (3) interfaces. 


Describe the relationship between objectsreferences, and aliasing. Again, create your own examples with Python lists


Describe the difference between objects and values using the terms “equivalent” and “identical”. Illustrate the difference using your own examples with Python lists and the “is” operator.


Write a program that reads the prices of a shop’s products continuously until the user enters −1. The program should display the minimum price, the maximum, and the average of those within [5,30], before it terminates. Assume that none of the product’s costs more than $100.


Which is the output of the below code fragment:

System.out.print(“The result is: “ + (3+2))

System.out.println(“You did a great job!”)

A. The result is + (3+2)You did a great job!

B. The result is + 5You did a great job!

C. The result is 5You did a great job!

D. The result is 5 You did a great job


5. In the following code, what is the final value of b

int a =0, b;

for (int i = 20; i>0; i=i-5)

{

b=a++;

}

a. 3

b. 4

c. 5

d. 20


Write a program to calculate the voltage when the value of electric current and resistance

 Consider the following program, what is the output? (2 marks)

 class overload

 {

 int x;

 double y;

 void prod(int n)

 {

 for (int i=1;i<n;i++)

 x=x*i

 }

 void prod(int n, int m)

 {

 for (int i=n;i<m;i++)

 y=y*i

 }

 overload()

 {

 this.x = 1;

 this.y = 1;

 }


}

 class Overload_methods

 {

 public static void main(String args[])

 {

 overload obj = new overload();

 int n = 2;

 int m = 4;

 obj.prod(n);

 obj.prod(n,m);

 System.out.println(obj.x + " " + obj.y);

 }

 }


LATEST TUTORIALS
APPROVED BY CLIENTS