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

def calculate_vat(amount):

amount * 1.2

total = calculate_vat(100)

print(total)


When your boss runs the program they get the following output:

None 


Your boss expects the program to output the value 120 . What is wrong? How do you fix it?



Display sets of "*" based on the user's integer input (0-9).

Example:

Enter a number: 6

******


given a list of M numbers and a positive integer N, print the sum of numbers whose position in the list is divisible by N. consider that the positions of numbers range from 1 to N.

Explanation : Given N = 1, M= 7 and the numbers_list = [4, 8, 6, 6, 7, 9,3]

as every position is divisible by 1, 4+8+6+6+7+9+3=43

so, output is 43

Input : 1 7

4 8 6 6 7 9 3

Output : 43

Input : 4 13

7 3 10 4 5 8 4 9 6 9 10 1 4

Output : 14


Nicholas is trying to invent a light bulb. he has to discover the right gaseous mixture that can be used to fill the bulb so that the bulb works underwater. He has prepared N gaseous mixture numbered from 0 to n-1 to check . Nicholas does not know which this gases will work, but to use a modulo-based search algorithm to keep checking different gas mixtures. So 1st chooses an integer K and select all indices i in increasing order such that i mod k= 0 (i%K==0) and tests the gases on such indices, then all indices in increasing order such that i mod k=1 and test the gases on such indices and so on.

Input:Test cases

test case contains N, P and K

output:no.of days taken

N=10 P=6 K=5

On the day1,Nicholas Will test gas numbered 0 as 0 mod 5=0,

On the day2, Nicholas Will test gas numbered 5 as 5 mod 5=0,

On the day3, Nicholas Will test gas numbered 1 as 1 mod 5=1,

On the day4, Nicholas Will test gas numbered 6 as 6 mod 5=1,

Nicolas test the gas number 6 on day 4 so the output is 4

Input:

10 6 5

5 2 3

Output:

4

5


Array Manipulation

  1. Initialize 8 element arrays into a 2D array
  2. Initialize array {{2, 69}, {42, 8}, {8, 11}, {8, 8}};
  3. After initializing the arrays, find the largest element
  4. Find the smallest element.
  5. After displaying the outputs, sum all the elements, and the results displayed must be 156.
  6. Lastly, sort the element.
  7. You need to traverse the arrays.

Hope you can help me!

THANK YOU!!!



I'm really fond of even numbers, you know? That's why I'll be letting you make another even

number problem yet again. This time, you need to print from a range of two inputted numbers,

n1 and n2 (inclusive), all the even numbers from n2 down to n1, in descending order


Create any program using python programming language. Use at least 10 Python built-in functions. Submit the program file of your program ( .py) for those who uses desktop or laptop in code and screenshot of the code and output for those who uses phones to code.

  1. In the code editor, you are provided with a main() function that asks the user for an integer and passes the address of this integer to a function call of the simple() function.
  2. This simple() function hasn't been implemented yet so your task is just that, to implement it. This has the following description:
  3. Return type - void
  4. Name - simple
  5. Parameter - address of an integer
  6. Description - prints a line of asterisks
  7. DO NOT EDIT THE MAIN FUNCTION

Input


1. An integer

Output


Enter·n:·5
*****

#include <iostream>

using namespace std;


int main(void) {

  int n;


  cout << "Enter n: ";

  cin >> n;


  simple(&n);

  

 cout << n;


  return 0;

}


LATEST TUTORIALS
APPROVED BY CLIENTS