Answer:
#include <iostream>
using namespace std;
int main(){
float cookies=0;
float sugar=1.5;
float butter=1;
float flour=2.75;
cout<<"how many cookies do you want: "<<endl;
cin>>cookies;
float num = cookies/48;
cout<<num<<endl;
cout<< "to make " << cookies<<"cookies you need: "<<endl;
cout<<"sugar cups: "<<num*sugar<<endl;
cout<<"butter cups: "<<num*butter<<endl;
cout<<"flour cups: "<<num*flour<<endl;
return 0;
}
Answer:
numMugs=input(); #take input from the user and store it on a numMugs variable.
print ('Number of mugs:'+numMugs) #print the numMugs variable value with the Number of mugs: line.
Output:
- If the input is 8 then the program is print Number of mugs: 8.
- If the input is 'Harry' then the program is print Number of mugs: Harry.
Explanation:
- The above program is in python language with the two statements one in input and the other is output.
- The first line takes input and stores it into a variable named "numMugs".
- The second line print the value as Number of mugs: value_of_numMugs.
- The above program works for any type of input. It can work for the string data type or integer data type or character data type or any other data type.
Answer: C. although a rainy day (A) would make it more aesthetic
My best guess is the last option (D) tools. Hope it helps
Answer:
count = 0
for x in range(len(array)):
if count == Len(array) -1:
break
max = max(array[:-1 - count])
count += 1
if array.index(max) == -1:
break
else:
hold = array[-1]
array[-1] = max
array[array.index(max)] = hold
Explanation:
The python program is an implementation of a maxsort. The for loop iterates over the array, getting the maximum number for each reduced array and swaps it with the corresponding last items.