1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Allushta [10]
3 years ago
13

Write the definition of a function isSenior, that receives an integer parameter and returns true if the parameter's value is gre

ater or equal to 65, and false otherwise. So, if the parameter's value is 7 or 64 or 12 the function returns false. But if the parameter's value is 69 or 83 or 65 the function returns true.
Computers and Technology
1 answer:
ohaa [14]3 years ago
6 0

Answer:

The function definition for this question can be given as:

Function Definition:

bool isSenior(int x )  //function

{  

//function body Or function definition.

//conditional statement

//if statement

if (x >=65)  

{

return true;   //return value true.

}

else  //else statement

{

return false;    //return value false.

}

}

Explanation:

In the above function definition firstly we define a function that isSenior. This function return Boolean value that is true or false in this function we pass the value as the parameter in that function we use the if statement that check the pass value is greater then equal to 65. If the condition is true it return true.else it will return false.

You might be interested in
"Players The files SomePlayers.txt initially contains the names of 30 football play- ers. Write a program that deletes those pla
kumpel [21]

Answer:

I am writing a Python program that deletes players from the file whose names whose names do not begin with a vowel which means their names begin with a consonant instead. Since the SomePlayers.txt is not provided so i am creating this file. You can simply use this program on your own file.

fileobj= open('SomePlayers.txt', 'r')  

player_names=[name.rstrip() for name in fileobj]  

fileobj.close()  

vowels = ('a', 'e', 'i', 'o', 'u','A','E','I','O','U')

player_names=[name for name in player_names  

                     if name[0] in vowels]

fileobj.close()

print(player_names)

Explanation:

I will explain the program line by line.

First SomePlayers.txt is opened in r mode which is read mode using open() method. fileobj is the name of the file object created to access or manipulate the SomePlayers.txt file. Next a for loop is used to move through each string in the text file and rstrip() method is used to remove white spaces from the text file and stores the names in player_names. Next the file is closed using close() method. Next vowels holds the list of characters which are vowels including both the upper and lower case vowels.

player_names=[name for name in player_names  

                     if name[0] in vowels]

This is the main line of the code. The for loop traverses through every name string in the text file SomePlayers.txt which was first stored in player_names when rstrip() method was used. Now the IF condition checks the first character of each name string. [0] is the index position of the first character of each players name. So the if condition checks if the first character of the name is a vowel or not. in keyword is used here to check if the vowel is included in the first character of every name in the file. This will separate all the names that begins with a vowel and stores in the list player_names. At the end the print statement print(player_names) displays all the names included in the player_names which begin with a vowel hence removing all those names do not begin with a vowel.

8 0
3 years ago
____ refers to the ability of one computing device (a desktop computer, portable computer, or smartphone, for example) on a netw
SCORPION-xisa [38]
<span>Presence technology is the answer</span>
8 0
3 years ago
__________ filtering requires that the filtering rules governing how the firewall decides which packets are allowed and which ar
DIA [1.3K]

Answer:

Static

Explanation:

A computer or system administrator who want packets to be filter have to set or configured a filtering rules which will enable and allow the firewall to decide on which of the packets that will be allowed to function and the packets that will be denied not to function to be developed and as well installed on the firewall have to make use of what is called STATIC FILTERING reason been that STATIC FILTERING make it of necessary that the filtering rules should be developed and installed with the firewall.

6 0
3 years ago
It is the ornamentation of textiles and other material with needle work
vesna_86 [32]
A! Embroidery is the ornamentation of textiles using needle work

6 0
3 years ago
You have been asked to provide an account for an outside consultant, who needs limited access to the network for a very short pe
frutty [35]

Answer:

Guest account

Explanation:

When a consultant is accessing a network for a while and needs limited access to it, A Guest account should be given. This help keep your data and information save both now and in the future.

A guest account is an account with limited access and permission to a network over a specific period of time.

7 0
3 years ago
Other questions:
  • The purpose of the ____________ element is to provide a method for a browser to display different images depending on specific c
    14·1 answer
  • Which device or software application detects errors in system configurations?
    8·1 answer
  • Which of the following Office Online apps is most effective for creating spreadsheets?
    14·2 answers
  • In which job role would a course in 3D modeling help with professional career prospects?
    9·2 answers
  • Select the correct answer
    11·1 answer
  • explain why you can determine machine epsilon on a computer using IEEE double precision and the IEEE Rounding to Nearest Rule by
    7·1 answer
  • Create a python program that display this
    9·1 answer
  • Define a function print_feet_inch_short(), with parameters num_feet and num_inches, that prints using ' and " shorthand. End wit
    6·2 answers
  • Ok i dont wanna get bannddddddd so i have to ask a qustion<br> 2 plus 2
    8·2 answers
  • Emily is deciding whether to buy the same designer jacket her friends have. The jacket is much more expensive than a similar one
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!