Answer:
C++ code explained below
Explanation:
#include<bits/stdc++.h>
#include <iostream>
using namespace std;
int FiboNR(int n)
{
int max=n+1;
int F[max];
F[0]=0;F[1]=1;
for(int i=2;i<=n;i++)
{
F[i]=F[i-1]+F[i-2];
}
return (F[n]);
}
int FiboR(int n)
{
if(n==0||n==1)
return n;
else
return (FiboR(n-1)+FiboR(n-2));
}
int main()
{
long long int i,f;
double t1,t2;
int n[]={1,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75};
cout<<"Fibonacci time analysis ( recursive vs. non-recursive "<<endl;
cout<<"Integer FiboR(seconds) FiboNR(seconds) Fibo-value"<<endl;
for(i=0;i<16;i++)
{
clock_t begin = clock();
f=FiboR(n[i]);
clock_t end = clock();
t1=double(end-begin); // elapsed time in milli secons
begin = clock();
f=FiboNR(n[i]);
end = clock();
t2=double(end-begin);
cout<<n[i]<<" "<<t1*1.0/CLOCKS_PER_SEC <<" "<<t2*1.0/CLOCKS_PER_SEC <<" "<<f<<endl; //elapsed time in seconds
}
return 0;
}
Answer:
name = []
price = []
for i in range(0,8):
item_name = input('name of item')
item_price = input('price of item')
name.append(item_name)
price.append(item_price)
for i in range(0, 8):
print(name[i], '_____', price[i])
Explanation:
Python code
Using the snippet Given :
Apples 2.10
Hamburger 3.25
Milk 3.49
Sugar 1.99
Bread 1.76
Deli Turkey 7.99
Pickles 3.42
Butter 2.79
name = []
price = []
#name and price are two empty lists
for i in range(0,8):
#Allows users to enter 8 different item and price choices
item_name = input('name of item')
item_price = input('price of item')
#user inputs the various item names and prices
#appends each input to the empty list
name.append(item_name)
price.append(item_price)
for i in range(0, 8):
print(name[i], '_____', price[i])
# this prints the name and prices of each item from the list.
A type of service which offers a preconfigured testing environment for application developers to create new software applications is: B - Platforms as a Service (PaaS).
<h3>What is cloud computing?</h3>
Cloud computing can be defined as a type of computing service that requires the use of shared computing resources over the Internet, rather than the use of local servers and hard drives.
<h3>The categories of cloud service.</h3>
Generally, cloud computing comprises three (3) service models which includes the following;
- Infrastructure as a Service (IaaS).
- Software as a Service (SaaS).
- Platform as a Service (PaaS).
In conclusion, a type of service which offers application developers a preconfigured hosting and testing environment to create new software applications is Platforms as a Service (PaaS).
Read more on Platform as a Service here: brainly.com/question/24233315
#SPJ1
Answer:
import numpy as np
l_int = 55/100
h_int = 65/100
hist = np.histogram( paid_tax_preparers_list, bins=5, range=(l_int, h_int))
Explanation:
Numpy is a Python package used to ease mathematical and statistical research calculations. The package creates data structures called arrays that can be used as vector items, making it easy and fast for calculation to be done.
The np.histogram method is used to create or plot histograms of a list or array against the frequency of the items in the array. The bins and the range attributes are used to adjust the display of the histogram, with bins being the number of bin in the graph and range is the given length of the histogram.