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
Explain the reason why vector graphics are highly recommended for logo​
Verdich [7]

Answer:

Currently, raster (bitmap files) and vector graphics are used in web design. But if you want to make a great logo and fully enjoy the use of it you should pick vector graphics for it in the first place. And this is why most designers opt for it.

Explanation:

  • Easier to re-edit
  • No image distortion
  • It is perfect for detailed images
  • Vector drawings are scalable
  • Vector graphics look better in print
7 0
3 years ago
Write a program that reads in a text file, infile.txt, and prints out all the lines in the file to the screen until it encounter
ivanzaharov [21]

Answer:

Explanation:

f=open("infile.txt","r")

flag=True

while(flag):

s=f.readline().strip()

if(len(s)>=4):

print(s)

else:

flag=False

8 0
2 years ago
In this exercise, your function will receive 2 parameters, the name of a text file, and a list of strings. The function will wri
diamong [38]

Answer:

# the function is defined

# it takes 2 arguments: filename and list of string

def solution(filename, listOfString):

   # the file is opened in write mode

   # so that we can write to it

   with open(filename, 'w') as file_object:

       # we loop through the entire list of string

       # this looping help us know what to write to the file

       for each_string in listOfString:

           # if the length of the string is less than 4

           # we write 'x' with a new line

           if len(each_string) < 4:

               file_object.write("x\n")

           # else if the length of the string is greater than equals 4

           # we write the fourth character

           # and also add new line

           else:

               file_object.write(each_string[3])

               file_object.write("\n")

Explanation:

The function is written in Python. It takes two argument; filename and list of string.

It opens the file in write mode and then loop through the list of string. During the loop, we know what to write to the file.

In the length of a string is less than 4; we write 'x' else we write the fourth character in the string. The fourth character has an index of 3 because string uses zero index counting like a string. Starting from zero; 0, 1, 2, 3, 4... the fourth character has an index of 3.

5 0
3 years ago
Pleas help I will give brainiest
stellarik [79]
1) A
2)D
3)C
4)A
5)D
Hope this will help u
5 0
3 years ago
Read 2 more answers
The main purpose of a honeypot is Select one:
masya89 [10]

Answer:

d. To help security professionals better understand and protect against threats to the system

Explanation:

The main purpose of a honeypot is to attract potential hackers and allow them to have access to a network system that is not the actual live network with close monitoring. This is done so as to learn and understand the intentions of the hacker and how they execute an attack. With this knowledge security professional are in a better position to deal with potential threats and keep the network secure.

4 0
3 years ago
Other questions:
  • How will a packet tracer environment be affected if a heater is added to a container named branch office and turned on?
    5·1 answer
  • A ___ is the basic collective unit of data in a computer.
    12·1 answer
  • Which approach to knowledge management capitalizes on tacit knowledge and requires heavy IT investment?
    7·1 answer
  • Write a program to test the various operations of the class clockType
    8·1 answer
  • Angela recently purchased a new Android smartphone. While purchasing the phone, Angela was told that she would need to set up a
    14·1 answer
  • Beth would like to run an nmap scan against all of the systems on her organization's private network. These include systems in t
    15·1 answer
  • Hi I need help, This assignment is for Assignment 6 Question 3 in edhesive for computer science. here is the prompt:
    15·1 answer
  • How does a project charter support the project manager in getting things for the project from other people?
    6·1 answer
  • Help please not trying to fail
    13·1 answer
  • Which statement is true? Select 3 options.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!