>>> phrase = "abcdefgh"

>>> phrase[3:6]

Answers

Answer 1

Answer:

Following are the correct code to this question:

phrase = "abcdefgh"#defining a variable phrase that holds a string value

print(phrase[3:6])#use print method for slicing and print its value

Output:

def

Explanation:

In the above code, a variable "phrase" is defined that holds a string value, and use a print method, inside the method, the variable is used as a list and use slicing.

It is a characteristic that enables you to access the series parts like strings, tuples, and lists. It also uses for modifying or removing objects in series, in the above slicing it starts from 3 and ends when it equal to the 6th letter, that's why it will print "def".


Related Questions

True or false: The objective of an Enterprise Resource Planning (ERP) system is to create a customized software program that integrates the information of departments and functions of a company into a single computer system.

Answers

Answer:

True

Explanation:

A string is represented as an array of characters. If you need to store an array of 5 strings with the maximum length of a string is 100, how would you declare it

Answers

Answer:

char str[5][100]

Explanation:

See attachment for options:

From the options, we can see that the programming language is C language.

The syntax to store an array of m strings with a maximum of n elements in C is:

char array-name[m][n]

In this case:

[tex]m = 5[/tex] --- Number of strings in the array

[tex]n = 100[/tex] --- Maximum character in each string

Assume the array name is str, the syntax can be expressed as:

char str[5][100]

An alternative design for a canary mechanism place the NULL value just below the return address. What is the rationale for this design decision

Answers

Answer:

This is to prevent attacks using the strcpy() and other methods that would return while copying a null character.

Explanation:

Canary is a mechanism used to monitor and prevent buffer overflow. The alternative canary design that places a null value just before the return address is called the terminator canary.

Though the mechanism prevents string attacks, the drawback of the technique is that the value of the canary is known which makes it easy for attackers to overwrite the canary.

*explain why computer literacy is vital to access in today’s business work

Answers

Answer:

Computer literacy is vital to access in today’s business work because of advanced technology which ensured that most companies run a computerized system as against the manual one which was existent in the past.

The use of computerized system enables work to be done faster and in a more accurate manner which is why bring a computer literate is widely embraced in the world today.

What is the acronym that helps you remember the order of math operations?

Answers

Answer: BEDMAS

Explanation:

for business teachings its BEDMAS

Write a code in C++ that can save 100 random numbers in an array that are between 500 and 1000. You have to find the average of the 100 random numbers. To find the average of the numbers, you have to use a functions. You are not allowed to use return, cin or cout statements in the functions.

Hint : you have to use function call by reference.

Answers

Answer:

#include <iostream>

#include <random>

//here we are passing our array and a int by ref

//to our function called calculateAverage

//void is infront because we are not returning anything back

void calculateAverage(int (&ar)[100], int &average){

 int sum = 0;

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

   //adding sum

   sum += ar[i];

 }

 //std:: cout << "\naverage \t\t" << average;

//calculating average here

 average += sum/100;

}

int main() {

 int value = 0;

 int average = 0;//need this to calculate the average

 int ar[100];

 //assign random numbers from 500 to 1000

 //to our array thats called ar

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

   value = rand() % 500 + 500;

   ar[i] = value;

   

 }

 calculateAverage(ar,average);

 // std:: cout << "\naverage should be \t" << average;

 

}

Explanation:

not sure how else this would work without having to pass another variable into the function but I hope this helps!

I commented out the couts because you cant use them according to ur prof but I encourage you to cout to make sure it does indeed calculate the average!

Write a print statement that displays a random integer between 5 and 5000. Assume the random library is imported.

Answers

Answer:

Explanation:

The following code is written in Java. It is a very simple three line statement (assuming that the random library was imported) that chooses a random integer value between 5 and 5000 and prints it to the screen using the println statement.

Random rand = new Random();

int randomNum = rand.nextInt((5000 - 5) + 1) + 5;

System.out.println(randomNum);

The random number generator is initialized and given a value between 5 and 5000. Since random number Generator will generate a number between 0 and the given value then subtracting 5 from the initial generated number makes sure that it is not more than 5000 and then adding 1 and 5 after wards makes sure that it is more than 5 always.

what are the differences of location decisions between manufacturing establishment and service establishment?​

Answers

Organizations can be divided into two broad categories: manufacturing organizations and service organizations, each posing unique challenges for the operations function. There are two primary distinctions between these categories. First, manufacturing organizations produce physical, tangible goods that can be stored in inventory before they are needed. By contrast, service organizations produce intangible products that cannot be produced ahead of time. Second, in manufacturing organizations most customers have no direct contact with the operation. Customer contact occurs through distributors and retailers. For example, a customer buying a car at a car dealership never comes into contact with the automobile factory. However, in service organizations the customers are typically present during the creation of the service. Hospitals, colleges, theaters, and barber shops are examples of service organizations in which the customer is present during the creation of the service.

images Manufacturing organizations

Organizations that primarily produce a tangible product and typically have low customer contact.

images Service organizations

Organizations that primarily produce an intangible product, such as ideas, assistance, or information, and ...

Have you ever played the game Mad Libs? Basically, the goal is to build a story using a template and have other people fill in the blanks. They make for pretty funny stories because the people filling in the blanks don’t know what the story is about!
For this activity, you will be creating your own Mad Libs game. It’s similar to the way you created the Introduction paragraph in the unit.
Start by typing out your Mad Libs fill-in-the-blank story in a word processing document. Make it as creative as possible! Identify whether your blanks should be filled by nouns, verbs, adjectives, or adverbs. Your story should include at least 10 blanks.
Next, transform your story into one big Python print statement in REPL.it, using variables in place of the blanks.
Finally, create the variables you need for your template by putting them at the top of your program. You should use input statements to make the game interactive.
Test out your program thoroughly, fixing any syntax errors or bugs that arise. Once you are happy with it, take a screenshot of your code actually being run.
Copy and paste your code into the same document where you wrote your fill-in-the-blank story, so that you have the regular fill-in-the-blank version and the code version.
Have a friend or family member try your Mad Lib (the typed or the coded version). Record yourself reading the result.

Someone please help!

Answers

Answer:

oh hi i can answer now lol

Explanation:

What is syntax?

A. syntax is the rules of the programming language
B. It is used to read information
C. it is used to output information
D. syntax is the word used to describe an error

Answers

Answer:

A

Explanation:

Provide an example of an IT project from your readings, experience, and/or other sources and discuss some of the challenges faced in its implementation. Suggest ways to overcome such challenges to achieve successful outcomes.

Answers

Answer:

kindly check the explanation.

Explanation:

Getting any project to be a successful one is not an easy task at all as many projects failed even before it nears completion stage. The Project Management Institute[PMI] states that only 69% [mean percentage] are able to complete and meet the original goals for and business intent of the project.

The reasons behind this failed IT projects are numerous, few of them are given below:

=> When estimates for the IT project is inaccurate. Th inaccuracy  do cause IT projects to not meet the target.

=> When the available resources are not enough and there is poor project management it causes the IT projects to fail.

=> When team members are not diligent. The procrastination of team members do lead to failed projects.

The ways that such problems can be overcome in order to to achieve successful outcomes is given below;

=> Someone should be held accountable. That is there should be a seasoned and qualify project manager to supervise the project and can be hold accountable for how things turns how to be.

=> The scope of the project should be flexible so that when things changes the plan can also change.

=> Making sure that all the estimates are accurate.

Ann Marie would like to test her hypothesis. To do that, she needs to show groups of data that are similar in some way. Which data-mining techniques should she use?

Answers

Answer:

Clustering Analysis

Explanation:

Clustering analysis or otherwise called cluster analysis is a task composed of grouping sets of objects in a way that objects in the same group tend to be more similar to each other than to objects in some other groups. Like the question said, Ann would love to show groups of data that are similar in some way. This makes Clustering analysis the perfect choice of pick, because of the similarity that's needed. A result of cluster analysis is capable of being used in the creation of something like customer profiling.

There are several security frameworks and architectures available to use as templates for creating a secure environment. These include ISO, NIST, COBIT, ETSI, RFC, and ISA/IEC. Select three security frameworks/architectures and use the Internet to research each of them. How are they predominately used

Answers

Answer:

Answered below

Explanation:

The International Standards Organisation (ISO) security framework is very well recognised and used by businesses and companies worldwide because of its effectiveness and high quality standards.

The Control Objectives for Information and related Technology (COBIT) framework, is a security framework widely used in finance companies for identification and mitigation of risks.

The US National Institute of Standards and Technology (NIST) framework has an abundance of information security best practices and standards and is trusted by large enterprises due to its legacy over the years.

how risk can impact each of the seven domains of a typical IT infrastructure: User, Workstation, Local Area Network (LAN), Local Area Network-to-Wide Area Network (LAN-to-WAN), Wide Area Network (WAN), Remote Access, and System/Application domains

Answers

Answer and Explanation:

User Domain:

Risk

User can destroy the data and delete all User can find checked and use a password to delete all the work User can insert the USB flash and Infected CD.

Work Station Domain:

The workstation domain has some software vulnerability that connects remotely and steals data. A workstation can fail because of lost data.

LAN domain

A worm can spread and infect the computer.LAN have some known software vulnerability. An unauthorized access of the organization workstation in

LAN WAN domain

LAN WAN domain that consists of internet and semi-private lines Service providers have major network problems. Server can receive the DOS File Transfer protocol can allow uploaded illegal software.

LAN/WAN Domain

The boundary between the trusted and untrusted zones. Hacker can penetrate the IT infrastructure and gain access. Week ingress and egress filtering performance. A firewall with the ports open can allow access to the internet.

System Storage Domain:

A fire can destroy the data DOC can cripple the organization's email. A database server can be attacked by the injection of SQL and corrupting data.

Remote Access Domain

Communication circuit outage the connections Remote communication from the office can be unsecured VPN tunneling between the remote computer and router

The ability of a build system for handling a rise in the amount of code that it blends and analyzes is called ___________.

Answers

Answer:

Build integration

Explanation:

The ability of a build System to handle the rise in amount of code it blends/analyses is known as build integration.

It is the overall capacity of the build System to handle the growing amount of code. It is also a process where the system tries to handle potentials to accommodate growth. This is a very important condition.

Define the following propositions: c: I will return to college. j: I will get a job. Translate the following English sentences into logical expressions using the definitions above: (a) Not getting a job is a sufficient condition for me to return to college. (b) If I return to college, then I won't get a job.

Answers

Answer:

Answered below

Explanation:

//Program is written in Kotlin programming language

//Initialize Boolean variables

var getJob:Boolean = true

var returnToCollege: Boolean = false

//First sentence. If no job then return to //college.

if( !getJob ) {

returnToCollege = true

}

//Second sentence. If you have returned to college then you cannot get a job.

if (returnToCollege == true){

getJob = false

}

g A string is represented as an array of characters. If you need to store an array of 5 strings with the maximum length of a string is 100, how would you declare it

Answers

Answer:

Declare it as: char str[5][100]

Explanation:

The attachment completes the question

The options in the attachment shows that the programming language being described is more likely to be C language.

In C language, the following syntax is used to store an array of m number of strings and a maximum of n elements in each string,

char array-name[m][n]

 

From the question:

[tex]m = 5[/tex]

[tex]n = 100[/tex]

Let array-name be str.

The array will be declared as: char str[5][100]

Write a function named average_value_in_file that accepts a file name as a parameter and reads that file, assumed to be full of numbers, and returns the average (mean) of the numbers in that file. The parameter, filename, gives the name of a file that contains a list of numbers, one per line. You may assume that the file exists and follows the proper format. For example, if a file named input.txt contains the following numbers

Answers

def average_value_in_file(filename):

   f = open(filename)

   total = 0

   count = 0

   for x in f.read().splitlines():

       total += int(x)

       count += 1

   return total/count

print(average_value_in_file("input.txt"))

I used an input file that looks like this:

1

1

1

1

Which of the following is NOT provided by the Device
Manager?
List of attached external peripheral devices
List of installed software with versions
List of attached internal peripheral devices
List of installed drivers
Submit

Answers

Answer:

well techincly in windows 10 the only thing that is in the device manager is the services and software it doesn't tell you what devices are connected only what is running and the prefrmance

of your machine

Explanation:

Write code to play a Tic-tac-toe tournament. Tic-tac toe is a game for two players who take turns marking the spaces with Xs and Os in a 3x3 grid. The purpose of the game is to place three of your marks in a horizontal, vertical or diagonal.

Answers

Answer:

Explanation:

The following code is written in Python and is a full Two player tic tac toe game on a 3x3 grid that is represented by numbers per square.

# Making all of the main methods of the game

board = [0,1,2,

        3,4,5,

        6,7,8]

win_con = [[0,1,2],[3,4,5],[6,7,8],

           [0,3,6],[1,4,7],[2,5,8],

           [0,4,8],[2,4,6]] # possible 3-in-a-rows

def show():

   print(board[0],'|',board[1],'|',board[2])

   print('----------')

   print(board[3],'|',board[4],'|',board[5])

   print('----------')

   print(board[6],'|',board[7],'|',board[8])

def x_move(i):

   if board[i] == 'X' or board[i] == 'O':

       return print('Already taken!')

   else:

       del board[i]

       board.insert(i,'X')

def o_move(i):

   if board[i] == 'X' or board[i] == 'O':

       return print('Already taken!')

   else:

       del board[i]

       board.insert(i,'O')  

 

# Creating the main loop of the game

while True:

   turn_num = 1

   board = [0,1,2,3,4,5,6,7,8]

   print('Welcome to Tic-Tac-Toe!')

   print('AI not implemented yet.')

   while True:

       for list in win_con: #check for victor

           xnum = 0

           onum = 0

           for num in list:

               if board[num] == 'X':

                   xnum += 1

               elif board[num] == 'O':

                   onum += 1

               else:

                   pass

           if xnum == 3 or onum == 3:

               break

       if xnum == 3 or onum == 3: # break loops

           break

       if turn_num > 9: # Check if there are any more moves available

           break

       show()

       if turn_num % 2 == 1:

           print('X\'s turn.')

       else:

           print('O\'s turn.')

       move = int(input('Choose a space. '))

       if turn_num % 2 == 1:

           x_move(move)

       else:

           o_move(move)

       turn_num += 1

   if xnum == 3:  #If game ends

       print('X Won!')

   elif onum == 3:

       print('O Won!')

   else:

       print('Draw!')

   play_again = input('Play again? Y or N ')

   if play_again == 'Y' or play_again == 'y':

       continue

   else:

       break

Please go support me I started 3 weeks ago and I get no views
(PLEASE SHARE)

Answers

Answer:

ok ill go check you out!!!

Answer:

i got u!

Explanation:

No problem hon!

What is the output?

answer = 0

for numA in [2,4]:

for numB in [3, 5]:

answer = answer + numA + numB

print (answer)

Output:

Answers

Answer:

The output is 28

Explanation:

Required

Determine the output of the code segment

The first line initializes "answer" to 0

The next two lines iterate through lists [2,4] and [3,5

Each of these lists have two elements; So, the number of iterations is 2 * 2 i.e. 4.

In the first iteration

numA = 2, numB = 3, answer = 0

So:

[tex]answer = answer + numA + numB= 0 + 2 + 3 = 5[/tex]

In the second iteration

numA = 2, numB = 5, answer = 5

So:

[tex]answer = answer + numA + numB= 5 + 2 + 5 = 12[/tex]

In the third iteration

numA = 4, numB = 3, answer = 12

So:

[tex]answer = answer + numA + numB= 12 + 4 + 3 = 19[/tex]

In the fourth iteration

numA = 4, numB = 5, answer = 19

So:

[tex]answer = answer + numA + numB= 19 + 4 + 5 = 28[/tex]

Lastly, the value of "answer" is printed

Hence, the output is 28

Answer: 28

Explanation: got it right on edgen

How can innovation,including technology, be sustained in schools?

Answers

Answer:

Answered below

Explanation:

Schools can encourage and sustain innovation and innovative ideas in technology through teaching, exposure and awareness of the benefits of using technology in solving our everyday problems.

Students should be invited to participate in tech roundtables and think about problems encountered in their society or environment and figure out how technology can be applied in such situations to providing a solution to those problems.

This encourages new, innovative and creative ideas, enthusiasm and opportunities.

Brian gathers data from his classmates about the computers they own such as the type of operating system, the amount of memory, and the year the computer was purchased. Who/what are the individuals in this data set

Answers

Incomplete question. The Options read;

A. The year purchased

B. Brian's classmates

C. The amount of memory

D. The type of operating system

Answer:

B. Brian's classmates

Explanation:

Remember, the question is concerned about "the individuals" in the data set, so the year they purchased their computer, neither is the amount of memory of the computer and the type of operating system can be classified as individuals in the data set.

Hence, we can correctly say, only Brian's classmates are the individuals in this data set.

Operands may be any of the following: (select all that apply) Group of answer choices constant or constant expression register name variable name (memory) reserved word

Answers

Answer:

constant or constant expression

register name

variable name (memory)

Explanation:

Literally, operand means data which an operation can be performed on. The operation could be an arithmetic or logical operation.

From the list of options, several operations can be performed on:

constants e.g. [tex]\pi = 3.14[/tex]registers andvariables e.g. (a + b)

However, no operation can be performed on keywords and/or reserved words.

Write a class named Octagon whose objects represent regular octagons (eight-sided polygons). Your class should implement the Shape interface defined, including methods for its area and perimeter. An Octagon object is defined by its side length

Answers

Answer:

Answered below

Explanation:

//Code is written using Kotlin programming language.

interface Shape{

var length : Double

fun area(length: Double)

fun perimeter (length: Double)

}

Class Octagon(var length: Double) : Shape{

val side: Int = 8

override var length: Double = length

override fun perimeter ( length: Double):Double{

return side * length

}

override fun area(length: Double): Double {

return 2*side**2(1+\Math.sqrt(2)

}

}

//Test class

Class Main{

fun main(){

val octagon = Octagon(2.5)

val perimeter = octagon.perimeter()

val area = octagon.area

print(perimeter, area)

}

}

Write a program that will read a line of text as input and then display the line with the first word moved to the end of the line

Answers

Answer:

The program in Python is as follows:

text_input = input("Enter text: ")

first_word = text_input.split(" ")

new_text = text_input.replace(first_word[0], "")

new_text = new_text + " "+ first_word[0]

print("New Text: " + new_text)

Explanation:

This line gets a line of text from the user

text_input = input("Enter text: ")

This line splits the text into list

first_word = text_input.split(" ")

This line deletes the first word of the string

new_text = text_input.replace(first_word[0], "")

This line appends the first word to the end of the string

new_text = new_text + " "+ first_word[0]

This line prints the new text

print("New Text: " + new_text)

Write a program in python whose input is a string which contains a character and a phrase, and whose output indicates the number of times the character appears in the phrase.

Answers

Answer:

Explanation:

The following is written in Python as requested and performs this task with a function called count_appearances. It first makes the character and the phrase into all lowercase and then loops through each word in the phrase and compares it to the character. If they are the same it adds 1 to the counter. Once the loop is over it returns the counter which is the number of times that the character appeared in the phrase.

def count_appearances(character, phrase):

   count = 0

   character = character.lower()

   phrase = phrase.lower()

   for x in phrase.split():

       if x == character:

           count += 1

   return count

how would i change this:
" try:
userChoice = input("Would you like to Add or Multipy?(A/M): ")
except:
print("Please enter 'A' or 'M'") "

so it only allows me to put "A" or "M" so that it runs the except part

Answers

You wouldnt use a try and except statement. Use a loop.

1. Discuss the pros and cons of human-computer interaction technology?
2. Discuss the ACID database properties in details ​

Answers

!

gcoo!!Exykgvyukhhytocfplanationufvhyg:

Other Questions
Find the following, giving your answers to 1 decimal place? Read the passage below from The True Confessions of Charlotte Doyle and answer the question.No piracy for us, Mr. Jaggery, Cranick replied with a vigorous shake of his head. Only justice. We could not get it on land. We shall have it at sea.Justice, say you! Under whose authority? the captain demanded.Based on this passage, what can we infer about Captain Jaggerys point of view about the mutiny?A. It is legal but unjustified.B. It is unjust and illegal.C. It is justified based on his cruelty.D. It is surprising but justified. Pls anyone knows them all Which aspect of Raphael's life is portrayed in both the short story "The Child of Urbino" and the biography? On February 21, a student observes that the Moon cannot be seen in the clear night sky. On what date will the student not be able to see the Moon again in the clear night sky? In "Rosa," how does the illustration of black people marching for voting rights support the text? A. It shows that black people specifically felt disadvantaged and wanted change. B. It shows that black people did not deserve rights. C. It shows that black people had equal rights. D. It does not support the text. Reread the quotation, and then identify each statement as true or false. James Madison believed in one government for everyone. The federal and State governments are in fact different agents and trustees of the people, constituted with different powers, and designed for different purposes. -James Madison, The Federalist No. 46, 1788 The national government and a state government share the same powers. DONE Which are true of beta radiation?Check all that apply.A. It has a mass of 0.0005 amus.B. It has no charge.c. It doesn't change the mass number of the atom.D. It causes transmutation. The validity of scientific theories and laws depends on evidence. Which of the following statements of evidence supports a law rather than a theory?Electrons orbit the nucleus of an atom within a certain radius.DNA analysis reveals that a modern species is related to an extinct species.Seafloor spreading occurs at a rate of three centimeters per year in the mid-Atlantic.The amount of matter in a closed system is the same at the start of a reaction as at the end of the reaction. 3. What powers did the AOC give the federal government?What powers did states have? where did all the tutors dissappear to? 2. How do the nitrogenous bases pair? ____ pairs with ____ ____ pairs with ____3. If a strand of DNA has 20% C, what percent will be G? ________4. If a strand of DNA has 35% A, what percent will be T? ________ 5. If a strand of DNA has 10% G, what percent will be T? 5. List three facts about the structure of DNA A company has two manufacturing plants with daily production levels of 7x+19 items and 5x2 items, respectively. The first plant produces how many more items daily than the second plant? Please hurry I need to get this done, Please help me I will give you the brain thing and extra points.image below 9 I NEED THIS ANSWER RIGHT NOW OR IMA FAIL MY MATH CLASS PLZ HELP Jermaine buys T-shirts for $6 each and marks up the price by 45%.How much profit does Jermaine make for each T-shirt sold? Please help I will mark brainliest Name the colonies located in the Southern region and the year each colony was established. Hi please help I suck at spanish past, present and future long term care? Which of the following minerals is not Metallic? *olivinepyritegalenagraphite