answer.
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
balu736 [363]
2 years ago
3

What happens when the print function prints a string literal with embedded newline characters?

Computers and Technology
1 answer:
meriva2 years ago
4 0

Answer and Explanation:

The print function denoted print() in a computer programming language such as Python is a function that prints values assigned to its parameter. When assigned a string literal("I'm not going" for example) and break line statements/new line characters(\n), it prints the value such as "I'm not going\n" and starts a new line where a break line is indicated in the instruction(after "going" in the example)

You might be interested in
Wendy is an attacker who recently gained access to a vulnerable web server running Microsoft Windows. What command can she use t
VikaD [51]

Answer:

I would say that if she is connected to the server and has grained access to the server, Wendy would have to use the command shortkey win+r (to run) or she could just use the "Type here to search" function.

Then you can type the words "cmd" to bring up the command prompt

Lastly, she would need to use the protocol scp to transfer files. Wendy might need to include a destination for the files to be directed to.

7 0
2 years ago
James has created some artwork portraying life on a different planet. He wants to show a world where everything is beautiful and
PIT_PIT [208]
What are the answer choices if so can you please post it with answer choices ?
5 0
2 years ago
Modify the sentence-generator program of Case Study so that it inputs its vocabulary from a set of text files at startup. The fi
Snezhnost [94]

Answer:

Go to explaination for the program code.

Explanation:

Before running the program you need to have these files created like below in your unix box.

Unix Terminal> cat nouns.txt

BOY

GIRL

BAT

BALL

Unix Terminal> cat articles.txt

A

THE

Unix Terminal> cat verbs.txt

HIT

SAW

LIKED

Unix Terminal> cat prepositions.txt

WITH

BY

Unix Terminal>

Code:

#!/usr/local/bin/python3

import random

def getWords(filename):

fp = open(filename)

temp_list = list()

for each_line in fp:

each_line = each_line.strip()

temp_list.append(each_line)

words = tuple(temp_list)

fp.close()

return words

articles = getWords('articles.txt')

nouns = getWords('nouns.txt')

verbs = getWords('verbs.txt')

prepositions = getWords('prepositions.txt')

def sentence():

return nounPhrase() + " " + verbPhrase()

def nounPhrase():

return random.choice(articles) + " " + random.choice(nouns)

def verbPhrase():

return random.choice(verbs) + " " + nounPhrase() + " " + prepositionalPhrase()

def prepositionalPhrase():

return random.choice(prepositions) + " " + nounPhrase()

def main():

number = int(input('Enter number of sentences: '))

for count in range(number):

print(sentence())

if __name__=='__main__':

main()

kindly check attachment for code output and onscreen code.

6 0
2 years ago
A communication pattern in which the parties slowly reduce their dependence on one another, withdraw, and become less invested i
zepelin [54]

Answer:

The correct answer to the following question is option A. an avoidance spiral.

Explanation:

An avoidance spiral is a spiral in which parties avoid the conflicts at all cost in which leads to reducing the influence, dependence, etc. This spiral can also be destructive.

In other words, it is the only spiral in parties slowly reduces their dependence and the influence on the one and another.

7 0
2 years ago
Write a recursive, string-valued method, replace, that accepts a string and returns a new string consisting of the original stri
ch4aika [34]

Answer:

Check the explanation

Explanation:

public String replace(String sentence){

  if(sentence.isEmpty()) return sentence;

  if(sentence.charAt(0) == ' ')

     return '*' + replace(sentence.substring(1,sentence.length()));

  else

     return sentence.charAt(0) +            replace(sentence.substring(1,sentence.length()));

3 0
2 years ago
Other questions:
  • Mark’s friends told him about an automated program that sends unsolicited messages to multiple users. Which type of program were
    11·2 answers
  • Data Analysis The Iris Plants Database contains 3 classes of 50 instances each, where each class refers to a type of Iris plant.
    15·1 answer
  • A form that dedicates a page for each item retrieved for a case; it allows investigators to add more detail about exactly what w
    10·1 answer
  • Write a program that prints the U.S. presidential election years from 1792 to present day, knowing that such elections occur eve
    9·1 answer
  • You have enabled IPv6 on two of your routers, but on the interfaces you have not assigned IPv6 addresses yet. You are surprised
    10·1 answer
  • Which of the following methods could be considered a "best practice" in terms of informing respondents how their answers to an o
    7·1 answer
  • JAVA
    7·1 answer
  • Write code that determines the number of full days represented by the number of hours stored in the variable hours and stores th
    15·1 answer
  • Choose the reasons why Windows Server operating systems are a popular choice for a network because they _____. Select all that a
    12·1 answer
  • What are the primary IP addresses for DNS servers hosted on the x128bit, iskytap and cloudparadox domains
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!