Answer:
//here is code in c++.
#include <bits/stdc++.h>
using namespace std;
int main()
{
// variable
int temp;
cout<<"Please enter the temperature:";
//read temperature from user
cin>>temp;
int n;
// reduce the case for switch
n=temp/10;
// print output according to the switch case
switch (n) {
case 7:
case 6:
cout<<"tennis"<<endl;
break;
case 5:
case 4:
cout<<"golf"<<endl;
break;
default:
if(temp>=80)
cout<<"swimming"<<endl;
else
cout<<"skiing"<<endl;
break;
}
return 0;
}
Explanation:
Read the value of temperature from user and assign it to variable "temp".
Calculate n=temp/10, to limit the number of cases in the switch statement.
if temperature is greater or equal 60 & less than 80, it will print "tennis".
If temperature is greater or equal 40 & less than 60, it will print "golf".
in default case, if temperature is greater than 80, it will print "swimming".
if less than 40, print "skiing".
Output:
Please enter the temperature::67
tennis
Answer:
2 images
Explanation:
The two images are then combined in the brain to give the perception of depth.
To start up windows and boot the system to make sure no hackers or viruses are on windows so your computer does not get infected with a hacker or virus
hope this helps
Answer:
Modern computers can perform generic sets of operations known as programs. These programs enable computers to perform a wide range of tasks.
Answer:
import sys, time
from os import walk, remove
from os.path import exists, join, getsize, getctime
file_counter = [ ]
folder_name, file_size = argv
isExist = exists( folder_name )
if folder_name == True:
for root, folder, files in walk( folder_name ):
for file in files:
if getsize( join ( root, file ) ) >= file_size:
file_log = [ ]
file_log.append( file )
file_log.append( join ( root, file) )
file_log.append( time.ctime( getctime( file ) ) )
file_counter.append( file_log )
else:
remove ( join ( root, file ) )
Explanation:
The python script above output the filename, size and file creation date of any folder passed to it.