Create logic using the loop command to repeat the word “hello” 4 times, then add the word “world”. (There should be a space between each word, but not before the first instance of “hello”.) (Note, all letters are lower case!) What is the hash for the resulting string? Question 7 options: ( Use RStudio Please) a) 5861445 b) 391355581 c) 1083008829 d) 464284261 e) 1101163537 f) 373200873   Hide hint for Question 7     Review the loop instructions provided in the prior questions. These are examples of the for loop that can guide your creating a solution to this question. Using the paste function, you can control the separator character between each string using the sep= argument. For example: a = paste( a, s1, sep=""); Experiment with different ways of using paste(). Try each of these to see how it works: a = paste( s1, sep=""); a = paste( a, s1, sep=""); a = paste( a, s1, sep=""); a = paste( a, s1, sep=" "); a = paste( s1, s2, sep=""); Build your loop to create the string of repeated words. After the loop is finished, add an additional line of code (outside the code block of the loop) to append the "world" value at the end of the string.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Create logic using the loop command to repeat the word “hello” 4 times, then add the word “world”. (There should be a space between each word, but not before the first instance of “hello”.) (Note, all letters are lower case!) What is the hash for the resulting string? Question 7 options: ( Use RStudio Please)

a) 5861445

b) 391355581

c) 1083008829

d) 464284261

e) 1101163537

f) 373200873

 

Hide hint for Question 7

   

Review the loop instructions provided in the prior questions. These are examples of the for loop that can guide your creating a solution to this question.

Using the paste function, you can control the separator character between each string using the sep= argument. For example:

a = paste( a, s1, sep="");

Experiment with different ways of using paste(). Try each of these to see how it works:

a = paste( s1, sep="");
a = paste( a, s1, sep="");
a = paste( a, s1, sep="");
a = paste( a, s1, sep=" ");
a = paste( s1, s2, sep="");

Build your loop to create the string of repeated words. After the loop is finished, add an additional line of code (outside the code block of the loop) to append the "world" value at the end of the string.

Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
SQL Functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education