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
lina2011 [118]
2 years ago
9

A teacher is writing a code segment that will use variables to represent a student's name and whether or not the student is curr

ently absent. Which of the following variables are most appropriate for the code segment? ​
Computers and Technology
1 answer:
SIZIF [17.4K]2 years ago
4 0

Complete Question:

A teacher is writing a code segment that will use variables to represent a student's name and whether or not the student is currently absent. Which of the following variables are most appropriate for the code Segment?

Group of answer choices.

А. A string variable named s and a Boolean variable named a.

B. A string variable named s and a numeric variable named A.

С. A string Variable named studentName and a Boolean variable named isAbsent.

D. A string Variable named studentName and a numeric variable named absences.

Answer:

C. A string variable named studentName and a Boolean variable named isAbsent.

Explanation:

In Computer programming, a variable stores information which is passed from the location of the method call directly to the method that is called by the program.

In this scenario, teacher is writing a code segment that will use variables to represent a student's name and whether or not the student is currently absent.

Hence, the variables which are most appropriate for the code segment are a string variable named studentName and a Boolean variable named isAbsent.

Basically, the string variable named studentName would only accept or hold values that are alphabetic but not numerical value. Thus, the variable studentName would represent the name of a specific student.

Also, the Boolean variable named isAbsent would accept values that are either "True" or "False" because it works on the principle of Boolean logic (0 for false and 1 for true).

You might be interested in
9.
Liula [17]

Answer:

128 is ur answer

Explanation:

please mark me as brainilist

5 0
2 years ago
A(n) _____ identifies how you feel about an activity or subject. computer calculator interest inventory both b and c
Alexeev081 [22]

Answer:

Interest

Explanation:

3 0
3 years ago
Read 2 more answers
What is communication barriers?​
SSSSS [86.1K]

Answer:

A communication barrier is anything that prevents us from receiving and understanding the messages others use to convey their information, ideas and thoughts.They can interfere with or block the message you are trying to send.

7 0
3 years ago
Read 2 more answers
Again, suppose that n and r denote integer values where r > 0 and n ≥ 0. What are two "simple" values, say lowEnough and tooH
enyata [817]

Answer:

Answer explained

Explanation:

From the previous question we know that while searching for n^(1/r) we don't have to look for guesses less than 0 and greater than n. Because for less than 0 it will be an imaginary number and for rth root of a non negative number can never be greater than itself. Hence lowEnough = 0 and tooHigh = n.

we need to find 5th root of 47226. The computation of root is costlier than computing power of a number. Therefore, we will look for a number whose 5th power is 47226. lowEnough = 0 and tooHigh = 47226 + 1. Question that should be asked on each step would be "Is 5th power of number < 47227?" we will stop when we find a number whose 5th power is 47226.

6 0
3 years ago
Create a Python program to solve a simple pay calculation.
Travka [436]

Answer:

def weeklyPaid(hours_worked, wage):  

   if hours_worked > 40:  

       return 40 * wage + (hours_worked - 40) * wage * 1.5

   else:  

       return hours_worked * wage  

 

 

hours_worked = 50

wage = 100

 

pay = weeklyPaid(hours_worked, wage)  

 

print(f"Total gross pay: Rs.{pay:.2f} ")

Explanation:

provides gross pay

6 0
3 years ago
Other questions:
  • Infrared, a wireless connection used in the past prior to bluetooth, was limited because it ________.
    10·1 answer
  • 2. Billys teacher asked him to type a report about asian food. Which paragraph format should he use?
    12·2 answers
  • What is the name of the program file that you can enter in the Windows search or Run box to execute Event Viewer? What process i
    12·1 answer
  • Which can be used to decode a Unicode character encoding into text?
    13·1 answer
  • When powering up a home network, make sure all computers and peripherals are turned on before turning on the modem/router?
    11·1 answer
  • Jane receives an email claiming that her bank account information has been lost and that she needs to click a link to update the
    13·1 answer
  • Presentation graphics programs contain an assortment of tools and operations for creating and editing slides, including preforma
    8·2 answers
  • Fictional Corp has a data center that runs multiple internal applications. However, they want to migrate their email to a cloud
    9·1 answer
  • When creating an HTML document, what do we use to set aside space for content?
    14·1 answer
  • Are programs that understand physics and/or hardware embedded? for example, one that uses finite-element methods to predict flui
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!