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
Nataly_w [17]
3 years ago
8

Consider the following code segment, where num is an integer variable.int[][] arr = {{11, 13, 14 ,15},{12, 18, 17, 26},{13, 21,

26, 29},{14, 17, 22, 28}};for (int j = 0; j < arr.length; j++){for (int k = 0; k < arr[0].length; k++){if (arr[j][k] == num){System.out.print(j + k + arr[j][k] + " ");}}}What is printed when num has the value 14 ?
a. 14 14
b. 18 19
c. 16 17
d. 17 16
e. 19 181/1
Computers and Technology
1 answer:
Setler79 [48]3 years ago
6 0

Answer:

c. 16 17

Explanation:

Given

num = 14

The above code segment

Required

The output

In the code segment, we have the following iterations:

for (int j = 0; j < arr.length; j++) and for (int k = 0; k < arr[0].length; k++)

The above iterates through all the elements of the array.

The if condition is true, only on two occasions

(i) When i = 0; j = 2

(ii) When i = 3; j = 0

i.e.

arr[0][2] = 14

arr[3[0] = 14

So, the result of the print statement is: j + k + arr[j][k]

(i) When i = 0; j = 2

j + k + arr[j][k]  = 0 + 2 + 14 = 16

(ii) When i = 3; j = 0

j + k + arr[j][k]  = 3 + 0 + 14 = 17

<em>Hence, (c) 16 17 is true</em>

You might be interested in
what are some steps Hector could have taken to ensure that his photographs were not ruined near the end of the shoot?
galben [10]

Answer:

make several extra copies of the pictures and frame them right away if they're printed out.

Explanation:

3 0
2 years ago
Your child has broken the RJ-45 port of your laptop by sticking clay into it and there are no wireless networks available in you
sesenic [268]

Answer:

آمل أن يساعد هذا Purchase and use a USB to RJ-45 adapter-yes

fiber_manual_record Enable NIC teaming to increase your bandwidth

Explanation:

67.185.94.80

6 0
3 years ago
What is the specifications, number of sales, positive and negative points and a few popular games of the first PlayStation?
Semmy [17]
Specs:
CPU
R3000A 32bit RISC chip @ 33.8mhz - Manufactured by LSI Logic Corp.
Clearing capacity: 30 MIPS
Bus bandwidth: 132 Mb/sec

3D Geometry Engine
High speed matrix calculator
Clearing capacity: 66 MIPS
1.5 million flat-shaded polygons/sec
500,000 texture-mapped and light-sourced polygons/sec

Data Engine (MDEC)
Clearing capacity: 80 MIPS
CPU, direct bus connection
Also compatible with JPEG, H.261 files

Sound
ADPCM, 24 channels
Sampling frequency: 44.1 Khz

Graphics
16.7 million colors
Resolution: 256x224 - 740x480
Sprite/BG drawing
Adjustable frame buffer
No line restriction
Unlimited CLUTs (Color Look-Up Tables)
4,000 8x8 pixel sprites with individual scaling and rotation
Simultaneous backgrounds (Parallax scrolling)
360,000 polygons/sec

Memory:
Main RAM: 2 Megabytes
VRAM: 1 Megabyte
Sound RAM: 512 K
CD-ROM buffer: 32K
Operating System ROM: 512K
RAM cards for data save: 128K EEprom

Cd-rom
Double speed
<span>XA compliant
</span>
Number of sales: 102.49 million

Pros: Great game selection. Fantastic 3D graphics for the time, elegant console design, memory cards convenient and meant never running out of space and could play saved games on another console. Comfortable controllers, games stored in standard CD cases.

Cons: Long load times. <span>Often overheated which would cause audio skipping, even longer load times, and sometimes system failure! </span><span>Memory cards don't hold much.</span>

Games: Ridge Racer, Battle Arena Toshinden, and ESPN Extreme Games. on release. Later Spyro the Dragon, Tekken, Wipeout, Crash Bandicoot, Tomb Raider, Metal Gear Solid, Gran Turismo, Resident Evil, Silent Hill, Soul Blade, and Twisted Metal.
5 0
3 years ago
1. Write a program to prompt the user to enter a single character and respond back whether or not the character is valid dna. 2.
Nina [5.8K]

Answer:

Answer 1:

dna = input("Enter DNA type: ")

dna = dna.upper()

print(dna)

if dna == "A" or dna == "B" or dna == "Z":

   print("valid")

else:

   print("invalid")

Answer 2:

rna = input("Enter DNA type: ")

rna = rna.lower()

print(rna)

if rna == "m" or rna == "t" or rna == "r":

   print("valid")

else:

   print("invalid")

Answer 3:

dnaSquence = input("Enter the DNA sequence: ")

type = "valid"

for char in dnaSquence:

   if char not in ["A", "C", "G", "T"]:

       type = "invalid"

       break

print(type)

Answer 4:

rnaSquence = input("Enter the RNA sequence: ")

type = "valid"

for char in rnaSquence:

   if char not in ["A", "C", "G", "U"]:

       type = "invalid"

       break

print("valid")

Explanation:

There are three types of DNA; Type A, Type B and Type Z.

A DNA sequence consists of; A, C, G and T.

There are three types of RNA; mRNA, tRNA and rRNA.

An RNA sequence consists of; A, C, G and U.

Code Explanations:

Code 1:

dna = input("Enter DNA type: ")

dna = dna.upper()

print(dna)

if dna == "A" or dna == "B" or dna == "Z":

   print("valid")

else:

<em>    print("invalid")</em>

  1. prompts and Takes a single character input
  2. converts the character to upper case
  3. compares the input to the DNA types
  4. Prints "valid" for a valid input else prints "invalid"

Code 2:

rna = input("Enter DNA type: ")

rna = rna.lower()

print(rna)

if rna == "m" or rna == "t" or rna == "r":

   print("valid")

else:

<em>    print("invalid")</em>

<em />

  1. prompts and Takes a single character input
  2. converts the character to lower case
  3. compares the input to the RNA types
  4. Prints "valid" for a valid input else prints "invalid"

Code 3:

Answer 3:

dnaSquence = input("Enter the DNA sequence: ")

type = "valid"

for char in dnaSquence:

   if char not in ["A", "C", "G", "T"]:

       type = "invalid"

       break

print(type)

  1. It prompts for a DNA sequence.
  2. Declares a string variable "type" and initializes type to valid.
  3. The FOR loop checks every character in the DNA sequence.
  4. If the character is not in the list [A, C, G, T] type becomes invalid and the loop breaks and the type "invalid" is printed to the screen.
  5. if all the characters are in the list, then type will remain valid and will be printed to the screen.

Code 4:

rnaSquence = input("Enter the RNA sequence: ")

type = "valid"

for char in rnaSquence:

   if char not in ["A", "C", "G", "U"]:

       type = "invalid"

       break

print("valid")

  1. It prompts for a RNA sequence.
  2. Declares a string variable "type" and initializes type to valid.
  3. The FOR loop checks every character in the RNA sequence.
  4. If the character is not in the list [A, C, G, U] type becomes invalid and the loop breaks and the type "invalid" is printed to the screen.
  5. if all the characters are in the list, then type will remain valid and will be printed to the screen.

7 0
3 years ago
Types of lines in dressmaking
Shtirlitz [24]

Answer:

table of contents/ straight line/horizontal line/diagonal line/zigzag line/curved line(softly)  curved line(fully)  thin line

Explanation:

your welcome

5 0
4 years ago
Other questions:
  • Instructions: Type the correct answer in the box. Spell the word correctly.
    5·2 answers
  • Cloud computing is the fastest growing form of computing. <br> a. True <br> b. False
    9·1 answer
  • What does t'challa actions reveal about his character( black panther movie)​
    6·1 answer
  • Dora has inserted a text box into a Word document that she is formatting. Which strategy will not format text boxes? Create a li
    6·2 answers
  • I have use all my iphone apple id and wanted to trade my phone will my mobile carrier accept it?
    5·1 answer
  • Who wants brainliest? First to answer gets it....
    12·2 answers
  • HELP ASAP!!<br> What is the difference between an internal event and an external event?
    10·1 answer
  • PLEASE HELP!!!
    7·1 answer
  • What are the components of computer system??<br>​
    10·2 answers
  • NFPA 780, Standard for the Installation of Lightning Protection Systems provides information on the installation of _____ for li
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!