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
lana66690 [7]
4 years ago
8

What is the output of this program?

Computers and Technology
1 answer:
Wewaii [24]4 years ago
5 0

Answer:

6 +4 + 6 +4

Explanation:

It will start from index 0 and wherever you find the character inside the indexOf methods then you will note it down.

You might be interested in
Write a program to take in a time-of-day on the command-line as 3 integers representing hours, minutes, and seconds, along with
nexus9112 [7]

Answer:

In Python:

hh = int(input("Hour: ")) * 3600

mm = int(input("Minutes: ")) * 60

ss = int(input("Seconds: "))

seconds = int(input("Additional Seconds: "))

time = hh+ mm + ss + seconds

hh =  int(time/3600)

time = time - hh * 3600

mm = int(time/60)

ss = time - mm * 60

while(hh>24):

   hh = hh - 24

print(str(hh)+" : "+str(mm)+" : "+str(ss))

Explanation:

We start by getting the time of the day. This is done using the next three lines

<em>hh = int(input("Hour: ")) * 3600</em>

<em>mm = int(input("Minutes: ")) * 60</em>

<em>ss = int(input("Seconds: ")) </em>

Then, we get the additional seconds

<em>seconds = int(input("Additional Seconds: "))</em>

The new time is then calculated (in seconds)

<em>time = hh+ mm + ss + seconds</em>

This line extracts the hours from the calculated time (in seconds)

hh =  int(time/3600)

time = time - hh * 3600

This line extracts the minutes from the calculated time (in seconds)

mm = int(time/60)

This line gets the remaining seconds

ss = time - mm * 60

The following iteration ensures that the hour is less than 24

while(hh>24):

   hh = hh - 24

This prints the calculated time

print(str(hh)+" : "+str(mm)+" : "+str(ss))

6 0
3 years ago
The physical devices that make up a computer system are called
LUCKY_DIMON [66]
The question is broad and vague, but I would say hardware.
3 0
4 years ago
The order of precedence determine
Free_Kalibri [48]
The order of precedence is the hierarchical order in which calculations are conducted. The simplest example of this is the way you always multiply before you add numbers.
7 0
4 years ago
Each character in a string has a(n) _______________ which specifies its position in the string.
-BARSIC- [3]
<span>The string is a sequence of characters.</span><span>
Each character in a string has an index which specifies its position in the string.
</span>The index of the first character is 0, the second character is 1, and so on.The character at the nth position has the index n.

5 0
3 years ago
Suppose you want to encode the numerals 0–9 and the 26 letters of the alphabet, using separate codes for lowercase and uppercase
labwork [276]

Lets first work out how many different codes would be needed to represent everything. 26 for lowercase, 26 for uppercase, and 10 for 0-9. Total, that makes 62 needed codes.

If we start with 0, we need to go up to 61 to represent all the characters. Thus, we can convert 61 to binary and count the number of digits needed to represent that as the last number in the set and that will tell us how many digits are needed.

61 in binary is 111101, so we need 6 digits to represent that number. The answer is B.

4 0
4 years ago
Other questions:
  • When a CPU executes instructions as it converts input into output, it does so with
    12·1 answer
  • Which of the following is the process of transferring data in a continuous and even flow, which allows users to access and use a
    12·1 answer
  • The standard toolbar appears whenever you select text.
    5·1 answer
  • 1. What does a network allow computers to share?
    13·1 answer
  • Which of the following is part of a person's digital footprint? *
    5·1 answer
  • Given N lines of input, print the 3rd character from each line as a new line of output. It is guaranteed that each of the n line
    8·1 answer
  • Write a print statement that displays a random integer between 5 and 5000. Assume the random library is imported.
    12·1 answer
  • Which game would be classified as an advergame?
    6·2 answers
  • WILL GIVE BRAINLIEST!!! Danielle is warehouse supervisor for a large shipping company. Most shipments need to leave the warehous
    7·1 answer
  • Identify some possible delivery systems for video programs
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!