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
aleksklad [387]
3 years ago
6

110101111.11011 to decimal (base 10)

Computers and Technology
1 answer:
Leokris [45]3 years ago
4 0
The part 110101111 is 1+2+4+8+32+128+256 = <span>431

The part after the dot is 1/2 + 1/4 + 1/16 + 1/32 = </span>0.84375

Together that's 431.84375
You might be interested in
All of the following are characteristics of a 4 year college except
klasskru [66]
D they offer few programs
4 0
3 years ago
Read 2 more answers
Write a filter that reads in a sequence of integers and prints the integers, removing repeated values that appear consecutively.
lara31 [8.8K]

Answer:

Following is the code for filter:

public class filter

{ public static void main(String[] args)

{ int x = StdIn.readInt();

System.out.print(" " + x + " ");

while(!StdIn.isEmpty())

{ int y = StdIn.readInt();

    if(y != x)

          System.out.print(" " + y + " ");

    x = y;

    }

    }

    }

Explanation:

  • A public class filter is used.
  • The main function will accept a single argument as string[], it is also known as java command line argument.
  • Now the Stdln.readInt is used to read the integers in the sequence and store it in integer x.
  • The value stored in variable x will be printed using System.out.print
  • Now unless the Stdln.readInt gets an empty value, check each value of sequence and store in variable y.
  • If y is not equal to previous value x, print it and shift the value of y into x.
  • Repeat the loop again.

i hope it will help you!

7 0
3 years ago
Read 2 more answers
Write a program that replaces words in a sentence. The input begins with an integer indicating the number of word replacement pa
kramer

Answer: provided in the explanation segment

Explanation:

This is the code to run the program:

CODE:  

//Input: 3 automobile car manufacturer maker children kids

  //15 The automobile manufacturer recommends car seats for children if the automobile doesn't already have one.

  import java.util.Scanner;

  public class LabProgram{

  public static int findWordInWordList(String[] wordList, String wordToFind, int numInList) {

          for (int i = 0; i < numInList; i++) {

              if (wordList[i].equals(wordToFind)) {

                  return i;

              }

          }

          return -1;

      }

      public static void main(String[] args) {

          Scanner scan = new Scanner(System.in);

          String[] original_String = new String[20];

              String[] modified_String = new String[20];

          int numInList = scan.nextInt();

          for (int i = 0; i < numInList; i++) {

              original_String[i] = scan.next();

              modified_String[i] = scan.next();

          }

          int num_Of_Words = scan.nextInt();

          String[] words_To_Replace = new String[num_Of_Words];

          for (int i = 0; i < num_Of_Words; i++) {

              words_To_Replace[i] = scan.next();

          }

          int indx;

          for (int i = 0; i < num_Of_Words; i++) {

              indx = findWordInWordList(original_String, words_To_Replace[i], numInList);

              if (indx != -1)

                  words_To_Replace[i] = modified_String[indx];

          }

          for (int i = 0; i < num_Of_Words; i++)

              System.out.print(words_To_Replace[i] + " ");

          System.out.println();

      scan.close();

      }

  }

cheers i hope this helps!!!!1

3 0
3 years ago
Description
lapo4ka [179]

Answer:

from datetime import time, datetime, timedelta, date

for _ in iter(list, 0):

   t1 = input("Please enter time one: ")

   t2 = input("Please enter time two: ")

   if t1.isdigit() == True and (int(t1[:2])<=23 and int(t1[2:]) <= 59)\

       and t2.isdigit() == True and (int(t2[:2])<= 23 and int(t2[2:])<=59):

       time_1 = time(hour=int(t1[:2]), minute=int(t1[2:]))

       time_2 = time(hour= int(t2[:2]), minute=int(t2[2:]))

       if time_1 > time_2:

           diff = datetime. combine (date. today( ), time_1) - datetime. combine(date. today ( ), time_2)

       else:

           diff = datetime. combine (date. today( ), time_2) -datetime. combine(date. today ( ), time_1)

       diff_list = str(diff).split(":")

       del diff_list[2]

       diff_t = "". join (diff_list)

       print(diff_t)

       break        

   if t1.isdigit() == False or t2.isdigit() == False:

       print("Military Time Forest Required: Bad input, try again.")

       continue

   elif int(t1[:2])> 23 or int(t2[:2])> 23:

       print("Military Tine Format Required: Hours must be between 00 and 23, try again")

       continue

   elif int(t1[2:])> 59 or int(t2[2:])> 59:

       print("Military Tine Format Required: Minutes must be between me and 59, try again")

       continue

Explanation:

The python Datetime package is used to manipulate date and time, creating immutable Datetime objects from the various python data types like integer and string. The block of code above is a conditional for-loop statement that gets two user time value inputs and prints out the difference as a string in Military forest time format.

5 0
3 years ago
In a virtual memory system, each process must have its own page table.(True or False?)
Anna71 [15]

Answer: True

Explanation:

 Virtual memory is the secondary storage memory and this type of memory are addressed as main part of the memory.

When the virtual memory copying in the physical memory then, at that time the operating system divide the memory into the file page with the address and definite size number. Then, the each page are store in a disk.

When this page are required then, the operating system copy from disk to main memory and then, the virtual address are converted into the  real address.

6 0
3 years ago
Other questions:
  • The definition of an "analog device" is that it is a type of _____.
    5·1 answer
  • The first step in the five-step process for problem solving is to ____. evaluate take action understand the task or need complet
    10·2 answers
  • Twitter is an example of a __________. social bookmarking website social tagging website microblogging website blogging website
    12·1 answer
  • A ____ database supports data distributed across several different sites.
    7·1 answer
  • What does TIA stand for?
    7·2 answers
  • You use an escape sequence to include ___________________ in a string.
    15·1 answer
  • Which rotation speed is not a typical spindle rotation speed for magnetic hard drives?3100; 5400; 7200; 10000
    8·1 answer
  • 3s X 82 = X +y? is this true
    10·2 answers
  • Discuss at least 1 Microsoft Windows security features that could protect data?
    5·1 answer
  • One way to check if a website is secure is to look for a/an<br> in the address bar.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!