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

given a cylindrical piggy bank with radius g and height y, return the bank's volume


Exercise 3: Practice to manipulate data in arrays Write a C program to create an integer array called Motion of size 5. Ask the user to enter values to the array from the keyboard. Rotate the values of the array by one position in the forward direction and display the values.

Ex: number in index 4 should move to index 3, Number in index 3 should move to index2, number index 0 should move to index 4.

Initial values 10 6 8 2 9

After rotating 6 8 2 9 10


Exercise 1: Practice to store and print data in an array

a) Write a C program that reads marks of 10 students in to a single subscripted array.

b) Above marks should be between 0 to 20. Modify the above program to add marks to the array only if the input mark is between the given range.

c) Display the values stored in the array.


Write a class Factors to model the factors of an integer1: • have attribute storing the integer whose factors are to be calculated. • have boolean array attribute ( factors ) where each element record whether that index is a factor of the integer i.e factor[5] = true • have a constructor which will assign the stored integer attribute to a user specified value and create the factors array NB: what is the size of this factors array? • have a method that calculates the factors of the stored integer and stores this is the Boolean array mentioned above. This is done by dividing the integer by all the integers less than itself and checking if there is a remainder. • have a method that prints out the factors of the stored integer to the screen i.e. “Factors of 120 are: 2, 3, 5, “ • have a method that takes another Factor object and prints out the common factors between that object the current object. • have a method that determines whether the integer is a perfect number by looking at the factors array.

Write a program to multiply every element of the linked list with 10


Write a program to print the total number of occurrences of a given item in the linked list


What is the java program for this?


Passenger fare is classified according to the type of passenger. Senior Citizen enjoys 20%discount from the regular fare, Students get 10% discount. Regular passengers who do not qualified as neither Senior Citizen nor a Student should pay the regular fare of 150.

Write an algorithm that will accept details of five (5) passengers, including its name and

passenger type and will compute for the corresponding fare of each passenger. Display

the name and type of passenger, as well as the computer fare.


Passenger fare is classified according to the type of passenger. Senior Citizen enjoys 20%

discount from the regular fare, Students get 10% discount. Regular passengers who do

not qualified as neither Senior Citizen nor a Student should pay the regular fare of 150.

Write an algorithm that will accept details of five (5) passengers, including its name and

passenger type and will compute for the corresponding fare of each passenger. Display

the name and type of passenger, as well as the computer fare.


import time
nucleotides="ATGC"
nulength= len(nucleotides)
nucleostring=""
noofbase=0
inputbase= int(input("Enter the number of base: "))
while noofbase < inputbase:
rand=int(time.time_ns())
randomno=rand%nulength
nucleostring+=nucleotides[randomno]
noofbase+=1
print(nucleostring)
print("Forward: ")
print("DNA Seq")
if len(nucleostring)%3 == 0:
for i in range(0, len(nucleostring),3):
c= nucleostring[i: i+3]
print(c)
but i need output in horizontal line
output Enter the number of base: 6
TACGCTTCTCGTGCCTCCTCCGCTGCGATCCAACCA
Forward:
DNA Seq
TAC
GCT
Write a python code for below problem,
We have a list
Input = [5,'Unnamed: 1','Unnamed: 2','Unnamed: 3', 6, 'Unnamed: 5','Unnamed: 6']
want to convert it into: Output= [5,5,5,5,6,6,6]
LATEST TUTORIALS
APPROVED BY CLIENTS