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
******
Fibonacci sequence
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:
2
10 6 5
5 2 3
Output:
4
5
Array Manipulation
Hope you can help me!
THANK YOU!!!
snake format
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.
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;
}