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
Finger [1]
3 years ago
13

2. Given the following list, write a snippet of code that would print the individual elements of the list using the indexes of t

he elements. my_list = [‘Rain fell from blue sky’, ’while I was having coffee,’, ‘procrastinating’]
Computers and Technology
1 answer:
disa [49]3 years ago
5 0

Answer:

my_list = ["Rain fell from blue sky", "while I was having coffee,", "procrastinating"]

print(my_list[0])

print(my_list[1])

print(my_list[2])

Explanation:

Using Python Programming language:

Since the given list contains three string elements, the indexes are from 0-2

The print function can then be used to print elements are specific indexes as given above

You might be interested in
Hypertext Markup language (HTML) version _____ added support for style sheets to give web designers greater control over page la
Ipatiy [6.2K]

Answer:

4.01 version .

Explanation:

A hypertext Markup language is used for designing the web page when we added the CSS on the web page we can create the web page more efficient manner and also there is more control over the web page because we can easily call the classes of CSS.

The Hypertext Markup language version 4.01 provides greater flexibility on the web page also We can also control the page layout in a very easy manner. The appearance of the web page is good as compared to version HTML 4

8 0
3 years ago
In most programming languages, the compiler carries a preprocessing step to determine if certain statements will compile. For in
MakcuM [25]

Answer:

See explaination for program code

Explanation:

package com.company;

import java.io.IOException;

import java.nio.file.Files;

import java.nio.file.Paths;

import java.util.Stack;

/*

* A program which reads input from given text filename and prints

* whether it passed the pre-processing stage or not

* Sample input

* int A = (a + b);static void display(int x)

* {

* //A sample input file

* }

* */

public class MyPreprocessor {

/*

* Reads input from filename and returns a string

* containing whole text

* */

public String readInput(String filename) {

String content = "";

try {

content = new String(Files.readAllBytes(Paths.get(filename)));

} catch (IOException e) {

e.printStackTrace();

}

return content;

}

/**

* Filters input since we are only concerned with

* a subset of input = '{}[]()/*'

*/

public String filterText(String text) {

String output = "";

for(int i = 0;i<text.length();++i) {

switch (text.charAt(i)) {

case '[':

case ']':

case '{':

case '}':

case '(':

case ')':

case '*':

case '/':

output += text.charAt(i);

}

}

return output;

}

/*

* Uses stack to determine if input is valid or not

* */

public boolean parse(String input) {

Stack<Character> St = new Stack<Character>();

// '$' is special symbol to represent bottom of stack

St.push('$');

for(int i = 0;i<input.length();++i) {

Character symbol = input.charAt(i);

if(St.peek().equals(getOpenSymbol(symbol)))

St.pop();

else St.push(symbol);

}

return St.peek() == '$';

}

private static Character getOpenSymbol(Character symbol) {

switch (symbol) {

case '}': return '{';

case ']': return '[';

case ')': return '(';

case '*': return '*';

case '/': return '/';

default: return ' ';

}

}

public static void main(String[] args) {

MyPreprocessor preprocessor = new MyPreprocessor();

String inputText = preprocessor.readInput("src/input.txt");

String filteredInput = preprocessor.filterText(inputText);

if(preprocessor.parse(filteredInput))

System.out.println("preprocessing passed.");

else System.out.println("preprocessing failed!");

}

}

6 0
3 years ago
Convert 1/32 GB into MB​
kiruha [24]

Answer:

31.25 megabytes.

31.25 megabytes

7 0
2 years ago
30 POINTS Conduct Interviews
Kitty [74]

Answer:

still need help with this if so lmk so o can help ya asap:)9

5 0
3 years ago
A major weakness of a lot of file processing systems is that ____.
Gnesinka [82]

They are several weaknesses or disadvantages of file processing systems but the major weakness is data redundancy and inconsistency. By data redundancy, I mean duplication of data. There are no better methods to validate insertion of duplicate data in file systems. Data redundancy can also increase the chance for errors.






7 0
3 years ago
Other questions:
  • Two samples of dirt are collected from a suspect's tread in his shoe and a crime scene. The forensic investigator does a gross e
    6·2 answers
  • ____ are programs that need to be attached to other files to install themselves on computers without the users’ knowledge or per
    5·1 answer
  • Most smartphones use operating systems developed by ________. Select one: A. Symbian and Apple B. Apple and Microsoft C. Microso
    13·1 answer
  • The data in a database management system that identifies the names of​ tables, fields in each​ table, and the properties of each
    13·2 answers
  • A(n) _________ is a computer system which is part of a larger system which performs a dedicated function.
    8·1 answer
  • Public class Main{ public static void main(String [] args){ String name=WelcomeJava; Runnable r1=() -&gt; System.out.println(nam
    12·1 answer
  • What are the process of boots up a computer?​
    15·2 answers
  • What is the difference between MySQL and MariaDB?
    9·1 answer
  • The lower band and upper band of integer data type​
    6·1 answer
  • Under the Home tab, controls for aligning text and objects can be found in the
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!