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 two class solution that includes data members for the name of the course, current enrollment, and maximum enrollment. Include an instance method that returns the number of students that can still enroll in the course. The To String( ) method should return the name of the course, current enrollment, and the number of open slots. Design your solution using parallel arrays. Declare an array of class objects in your implementation class. Test your application with the following data:


The Ion Realty Sales Corporation would like to have a listing of their sales over the past few months. Write a program that accepts any number of monthly sales amounts. Display the total of the values. Display a report showing each original value entered and the percentage that value contributes to the total. You may prompt the user for the number of values to be inputted.


Take two lists from the user (elements of the lists

separated by space) of

the same size. The first list will contain some names and the second list

will contain roll numbers. Your job is to assign each name

a roll number

from the list containing numbers following the criteria

given below:

Find the sum of the ASCII value of each name and then sort

the names in

descending order based on the sum. Then assign

lowest number to the

the

name that has the highest ASCII value sum as a roll number.


Sample Input 1:


Alan Jack Nancy Jim


10 15 20 50


Sample Output 1:


Nancy's roll number is: 10


Alan's roll number is: 15


Jack's roll number is: 20


Jim's roll number is: 50


The coordinates of different persons are given in the following dictionary.

position = ('A': (2, 5), 'B': (1, 7), 'C': (9, 5), 'D': (2, 6))

You will take 2 inputs for person X's location where the first

input specifies person X's current location in the x-axis and the second input specifies person X's current location in the y-axis.

Your work is to find the person closest to person X by

calculating the

distance between person X and every other person in the dictionary.

Hint: The distance between two coordinates is given by the

formula (You

need to import math):

math.sqrt((x2-x1)**2 + (y2-y1)**2)

Sample Input 1:

Enter person X's x coordinate: 3

Enter person X's y coordinate: 6

Sample Output 1:

D



Write a Python program that takes a string as an input where multiple numbers are separated by hashes(#). Your first task is to create a list of numbers and print it.

Your second task is to create a dictionary that will have the index of the

list as key, and for the even indices, multiplication from start to that index as value, while for the odd indices, summation from start to that

index as value. Finally, print the dictionary.


Sample Input 1:

1#2#3#4


Sample Output 1:

[1, 2, 3, 4]


(0:1, 1:3, 2:6, 3:10}

Sample Input 2:

5#6#7

Sample Output 2:

[5, 6, 7]

{0: 5, 1:11, 2: 210}


Write a Python program that reads a number and finds the sum of the series

of 1 + 33 + 111 + 3333 +....+N terms. Then it puts the reverse digit of the sum to a list and prints it. [Cannot use built-in reverse() or reversed()]

Sample Input 1:

5

Sample Output 1:

Sum of series: 14589 Reverse sum of series in list: [9, 8, 5, 4, 1]


Different shapes have different dimensions and properties that can be used to compute their area and perimeter. Using namespace technique, create a C++ program that compute the area of circle, rectangle, triangle and sphere. Each shape must have its own namespace that houses two functions, the one for calculating the area and the other for perimeter or circumference. 


Input: ramisgood


goodforall.



Output: good.




Input a random positive integer. Then create an integer array that has a size equal to the inputted integer.


Using a loop, add random integer values into the array one by one. The number of values to be stored is dependent on the inputted positive integer given in the first instruction.


Print out the largest integer among all the elements on the array, by any means necessary.


Input



The first line contains the size of the array.


The next lines contains an integer.



5


5


34


3


23


10

An array containing 5 integer elements is already provided for you in the code editor below.


Print out the cube of the 1st, 3rd, and 5th element of the given array.


Output



Multiple lines containing the cubes of the 3 elements of the given array.



-8


1


27

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS