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

Create a program for water sort puzzle in java.

How to form a Pseudocode and Flowcharts for a Vending Machine


Print the two strings, firstString and secondString, in alphabetical order. Assume the strings are lowercase. End with newline. Sample output:


Create a do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The loop should ask the user whether he or she wishes to perform the operation again. If so, the loop should repeat; otherwise it should terminate


Sample Run1

Enter two numbers: 3 15

Do you want another operation: Yes

Enter two numbers: 45 56

Do you want another operation: No

Output1: Sum = 119


Sample Run2

Enter two numbers: 33 150

Do you want another operation: Yes

Enter two numbers: -56 56

Do you want another operation: Yes

Enter two numbers: 58 15

Do you want another operation: Yes

Enter two numbers: 123 87

Do you want another operation: No

Output2: Sum = 466


Construct a Complex structure to represent a complex number with both real and imaginary components being real numbers. Request:


Write functions that calculate the sum, difference, product, and quotient of two complex numbers

Write a function that calculates the sum and difference of two complex numbers simultaneously.

Write a function that calculates the modulus of a complex number

Write a function that displays a complex number in the correct format (a+bj where a is the real component, b is the imaginary component)


Fibonacci sequence is defined with an integer n as,

F(n)=F(n-1)+F(n-2) for n ≥2,where F(0)=0,F(1)=1.

develop a Python program to compute F(n) for a given integer between 0 and 20.

Input: Output:

0≤n≤20 F(n)≤2 to the power32

Compute F(n) starting with n=2 and increment iteratively until the required value is obtained.

instructions-

Create a text file include the value ofn. The text file needs to saved in same folder

where the source file has been saved. The file name will be given as input through terminal.

Develop a function named“getNum"to read number n from file.

Develop a function named “show” to display the given value n and computed value

of F(n) on screen. (Expected output format Fibonacci(3) = 2)

Develop a function “saveFile” to write what was displayed in (3) above to a text

file named"result.txt”. This file should be in same folder where source file is.

program must call suitable functions to do the task.

if n>20 print invalid


Write C++ program to count the number of objects created and destroyed for a class using 

static data members and static member functions.


Write a loop over the strings in list test_miss and call missing_letters with each string. Print a line for each string listing the missing letters. For example, for the string "aaa", the output should be the following.

aaa is missing letters bcdefghijklmnopqrstuvwxyz

If the string has all the letters in alphabet, the output should say it uses all the letters. For example, the output for the string alphabet itself would be the following.

abcdefghijklmnopqrstuvwxyz uses all the letters

Print a line like one of the above for each of the strings in test_miss.

Submit your Python program. It should include the following.

The provided code for alphabet, test_dups, test_miss, and histogram.
Your implementation of the has_duplicates function.
A loop that outputs duplicate information for each string in test_dups.
Your implementation of the missing_letters function.
A loop that outputs missing letters for each string in test_miss
Part 2

Write a function called missing_letters that takes a string parameter and returns a new string with all the letters of the alphabet that are not in the argument string. The letters in the returned string should be in alphabetical order.

Your implementation should use a histogram from the histogram function. It should also use the global variable alphabet. It should use this global variable directly, not through an argument or a local copy. It should loop over the letters in alphabet to determine which are missing from the input parameter.

The function missing_letters should combine the list of missing letters into a string and return that string.
Part 1

Write a function called has_duplicates that takes a string parameter and returns True if the string has any repeated characters. Otherwise, it should return False.

Implement has_duplicates by creating a histogram using the histogram function above. Do not use any of the implementations of has_duplicates that are given in your textbook. Instead, your implementation should use the counts in the histogram to decide if there are any duplicates.

Write a loop over the strings in the provided test_dups list. Print each string in the list and whether or not it has any duplicates based on the return value of has_duplicates for that string. For example, the output for "aaa" and "abc" would be the following.

aaa has duplicates
abc has no duplicates

Print a line like one of the above for each of the strings in test_dups.
LATEST TUTORIALS
APPROVED BY CLIENTS