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 function that takes an input parameter as a String. The function should replace the alternate words in it with “xyz” and print it. Words are separated by dots. (Avoid using inbuilt functions)


If input is “i.like.this.program.very.much”

Output will be “i.xyz.this.xyz.very.xyz




The media company "GlobalAd" has received a
batch of advertisements from different product
brands. The batch of advertisements is a
numeric value where each digit represents the
number of advertisements the media company
has received from different product brands.
Since the company banners permit only even
numbers of advertisements to be displayed, the
media company needs to know the total
number of advertisements it will be able to
display from the given batch.
Write an algorithm to calculate the total
number of advertisements that will be
displayed from the batch.
Input
The input consists of an integer batch,
representing the batch of advertisements
Output
Print an integer representing the total number
of advertisements that will be displayed by the
media company
Constraints
0 < batchs 109

There are 2 types of tyres in stock, namely those for luxury vehicles and those for construction vehicles.


Construction vehicle tyres cost twice the price of luxury vehicle tyres, and the prices

depend on the wheel size according to the following price list for luxury vehicles:

Wheel Size Price/Unit measurement ($)

Less than 10 Inches 3.50

10- 15 Inches 4.00

Greater than 15 inches 6.00

You are required to create a python program that implements the program according to

the following guidelines:

c) Create a class called Luxury which contains:

i) A constructor

ii) A function called Calc for doing relevant calculations for calculating the total price

of wheels purchased for construction vehicles.

d) Create a class called Bonuses which contains a constructor and a function called Calc

for calculating the bonus that the client is eligible to recieve. A client may recieve a

bonus if the total price of the tyres he/she has purchased is greater than $500.00.


2 types of tyres in stock, namely for luxury vehicles and for construction vehicles.

Cons vehicle tyres cost twice the price of luxury vehicle tyres, the prices

depend on the wheel size according to the following price list for luxury vehicles:

Wheel Size: Price ($)

Less than 10 Inches: 3.50

10- 15 Inches: 4.00

Greater than 15 inches: 6.00


create a python program that implements the program:

a) Create a class called Home, which contains a function called Details for receiving the

values of the type of vehicle, the size of the tyres and the number of tyres for the

vehicle.

b) Create a class called Construction which contains:

i) A constructor

ii) A function called Calc for doing relevant calculations for calculating the total price

of the tyres purchased for construction vehicles.

c) Create a class called Luxury which contains:

i) A constructor

ii) A function called Calc for doing relevant calculations for calculating the total price

of wheels purchased for construction vehicles.



We can push a total of 100 values

Value Pushed in Stack 1 is 1

Value Pushed in Stack 1 is 2

Value Pushed in Stack 1 is 3

Value Pushed in Stack 1 is 4

.....

Value Pushed in Stack 1 is 60

Value Pushed in Stack 2 is 1

..........

Value Pushed in Stack 2 is 40



Print Pushed Values:

60 59 58 57..... 6 5 4 3 2 1

40 39 38.... 3 2 1



Pushing Value in Stack 1 is 101

Stack Full! Cannot Push



60 is being popped from Stack 1

59 is being popped from Stack 1

58 is being popped from Stack 1

...........

...........

3 is being popped from Stack 1

2 is being popped from Stack 1

1 is being popped from Stack 1

Stack Empty! Cannot Pop
I need a program for these
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)
I want print output horizontally
O/p:
Enter the number of base: 6
AATGCA
Forward
DNA Seq
AAT
GCA
Instead of these I need print horizontally AAT GCA

______ data is what is translated to digital format so it can be stored in a computer.


Write a function that takes seconds from the user and displays the time in Hours,

minutes and seconds’ format. E.g. if the user enters 3700, the output of the program

should be

1 Hour 1 minute and 40 seconds


Write a function that takes quantity in pounds and convert it into gram and kilogram

Reflect the concept of required argument

1 Pound = 453.59237 Grams

1 Pound = 0.454 kilograms


Write a function that takes two numbers and perform all arithmetic operations.

Function should have default arguments set to 1, 1

● Addition

● Subtraction

● Division

● Multiplication


LATEST TUTORIALS
APPROVED BY CLIENTS