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
Gwar [14]
3 years ago
5

Write an if else statement that assigns 0 to the variable b and assigns 1 to the variable c if the variable a is less than 10. O

therwise, it should assign -99 to the variable b and assign 0 to the variable c.
Computers and Technology
1 answer:
brilliants [131]3 years ago
4 0

Answer:

if(a < 10)

{ b = 0; c = 1;}

else

{ b = -99; c = 0;}

Explanation:

You might be interested in
6.23 LAB: Convert to binary - functions Instructor note: This is a lab from a previous chapter that now requires the use of a fu
Kitty [74]

Answer:

The program in Python is as follows:

import math

def integer_to_reverse_binary(integer_value):

   remainder = ""

   while integer_value>=1:

       remainder+=str(integer_value % 2)

       integer_value=math.floor(integer_value/2)

   reverse_string(remainder)

def reverse_string(input_string):

   binaryOutput=""

   for i in range(len(input_string)-1,-1,-1):

       binaryOutput = binaryOutput + input_string[i]

   print(binaryOutput)

integer_value = int(input("Enter a Number : "))

integer_to_reverse_binary(integer_value)

Explanation:

This imports the math module

import math

This defines the integer_to_reverse_binary function

def integer_to_reverse_binary(integer_value):

This initializes the remainder to an empty string

   remainder = ""

This loop is repeated while the integer input is greater than or equal to 1

   while integer_value>=1:

This calculates the remainder after the integer value is divided by 2

       remainder+=str(integer_value % 2)

This gets the floor division of the integer input by 2

       integer_value=math.floor(integer_value/2)

This passes the remainder to the reverse_string function

   reverse_string(remainder)

The reverse_string function begins here

def reverse_string(input_string):

This initializes the binaryOutput to an empty string

   binaryOutput=""

This iterates through the input string i.e. the string of the remainders

   for i in range(len(input_string)-1,-1,-1):

This reverses the input string

       binaryOutput = binaryOutput + input_string[i]

This prints the binary output

   print(binaryOutput)

<u>The main begins here</u>

This gets input for integer_value

integer_value = int(input("Enter a Number : "))

This passes the integer value to the integer_to_reverse_binary function

integer_to_reverse_binary(integer_value)

3 0
3 years ago
The source ip address is 164.109.28.3 subnet mask of 255.255.128.0 network address is
Sergeu [11.5K]
164.109.0.0/17




-------------------------------------------
6 0
3 years ago
Leah is now in the Backstage view. Which option should she use to access a blank presentation? Info New Open Options
nekit [7.7K]

Answer:

She Should use New

7 0
3 years ago
To select more than one sketched entity, you need to press and hold down the ________ key on the keyboard while selecting the en
almond37 [142]

Answer:

The answer to this question is Control(ctrl).

Explanation:

We use control(ctrl) key when we need to select multiple entities.

So when we want to select more than one sketched entity we need to press and hold the control key on the keyboard when we are selecting the items.

Hence we conclude that the answer to this question is Control(ctrl).

6 0
4 years ago
CJ is developing a new website blogging about cutting-edge technologies for people with special needs. He wants to make the site
crimeas [40]

Answer:

CJ is developing a new website blogging about cutting-edge technologies for people with special needs. He wants to make the site accessible and user friendly. CJ wants to link to articles in his website. He has assigned specific values for each ID attribute. To link to that ID attribute, CJ must use an # before the ID value in his href statement.

Explanation:

In order to create an internal link, a link's href element must be assigned to a hash symbol #, including the value of the id attribute for the element that is to be to internally linked to, usually further down the page. Then, there is also a need to add the same id attribute to the element to be linked to.

An id refers to an  attribute that uniquely describes an element. Below is an example of an internal anchor link and its target element:

<a href="#contacts-header">Contacts</a>

3 0
3 years ago
Other questions:
  • Write a for loop that iterates from 1 to numbersamples to double any element's value in datasamples that is less than minvalue.
    15·1 answer
  • Pretrial services programs are also known as early intervention programs. <br> a. True <br> b. False
    15·1 answer
  • A __engineer specializes in computer hardware design and integration.
    15·1 answer
  • "The pkill command terminates _________."
    14·1 answer
  • Producers must understand the marginal benefit of making an additional unit which shows the ...
    5·2 answers
  • Complete the following conversions. You MUST show all of your work to receive full credit.
    13·1 answer
  • E-governance is the only solution against corruption. justify the statement in context of nepal​
    13·1 answer
  • 4.8 code practice question 2
    10·1 answer
  • 1
    8·1 answer
  • (Reverse number) Write a program that prompts the user to enter a four-digit inte- ger and displays the number in reverse order.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!