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
azamat
3 years ago
7

ad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (an

d hopefully funny) ways. Complete the program to read the needed values from input, that the existing output statement(s) can use to output a short story. Ex: If the input is:

Computers and Technology
1 answer:
WINSTONCH [101]3 years ago
4 0

Answer:

Python

name =input("")  #input name

location = input("")  #input location

number = int(input(""))  #input number

pluralNoun = input("")  #input plural noun

print(name, 'went to', location, 'to buy', number, 'different types of', pluralNoun) #prints the short story using input variables

JAVA:

import java.util.Scanner;   // to accept input from user

public class Main {  

public static void main(String[] args) {  //start of main function

  Scanner input = new Scanner (System.in) ; //creates Scanner class object

   String subject;  //declares string type variable to hold name

   String location;  //declares string type variable to hold location

   int number;  //declares int type variable to hold number

   String object;  //declares string type variable to hold plural noun

  subject = input.next();  //reads input subject string value

  location = input.next();  //reads input location string value

  number = input.nextInt();  //reads input number integer value

  object = input.next();  //reads input object string value

  System.out.println(subject + " went to " + location + " to buy " + number + " different types of " + object + "."); } } //prints the short story using input values and existing string added with input values

In C++

#include <iostream> //to use input output functions

using namespace std; //to identify objects like cin cout

int main(){ //start of main function

   string first_name; // string variable that holds the first_name value

   cin>>first_name; //reads the first_name from user

   string generic_location; // string variable that holds the generic location

   cin>>generic_location; //reads the generic location  from user

   int whole_number; // int variable that holds the whole_number value

   cin>>whole_number; //reads the whole number  from user

   string plural_noun; // string variable that holds the plural_noun value

   cin>>plural_noun; //reads the plural_noun from user

cout<<first_name<<" went to "<< generic_location<<" to buy "<< whole_number<<" different types of "<<plural_noun;} //prints the short story using input values and existing string added with input values

Explanation:

The complete statement is:

If the input is:

Ex: If the input is

Eric

Chipotle

12

cars

Then the output is:  

Eric went to Chipotle to buy 12 different types of cars

Now to complete this program we read the needed values from input, that the existing output statements can use to output a short story.

If you look at the input Eric which is a name can be used as an input value as the name can be different for different users. Chipotle is a location that should aslo be an input value because locations can vary too of different users. 12 is a numeric that can also vary. For example a person can have more than or less than 12 cars. Lastly, cars which is  plural noun can also be used as input value. Now to get the above output we concatenated the input variables with the strings in the print statement in order to output a short story.

You can name the variables whatever you like as i have used different variable names in different programs.

You might be interested in
Identify the correct XHTML syntax for inserting an image as a hyperlink from the options provided. A. book.gif B. C. D.
mariarad [96]

Answer:

The Correct syntax for inserting an image as hyperlink is given in explanation section

Explanation:

To make an image act as a hyperlink, place the image element within the HTML anchor "<a></a>"  element.

The syntax of inserting image hyperlink in XHTML is given below.

<a href = "link_that_can_be_accessible"><img src="source of image" alt="display name if image not shown in the browser" border="0"/></a>

for example lets insert image as hyperlink

<a href="ajax.html"><img src="logo.gif" alt="AJAX" border="0" /></a>

The default appearance is a blue border around the image. Specifying border="0" removes the border around the image.

if you want to insert image from another folder then the image hyperlink looks like this:

<a href="ajax.html"><img src="/images/html5/logo.gif" alt="AJAX" border="0" /></a>

If you want to insert image from another server then image hyper link looks like this:

<a href="ajax.html"><img src="https://www.myExample.com/images/html5/logo.gif" alt="AJAX" border="0" /></a>

4 0
3 years ago
Which of these is the function of a modeler?
Liono4ka [1.6K]

Answer:

Create 3D assets from sketches

Explanation:

A modeler Job is to model all of the 3D/2D assets needed to obtain the final result wanted by the developers. The modeler creates the assets from sketches or images provided to him according to the theme.

5 0
3 years ago
Read 2 more answers
Select all the correct answers.
oksano4ka [1.4K]

Explanation: 2 and 5

3 0
3 years ago
Read 2 more answers
How could you insert a new row between rows 20 and 21?
love history [14]
<span>The Answer is C. Right-click row 21's row number, and then click Insert.

</span>
6 0
2 years ago
Read 2 more answers
What two things should you do before starting the design process
Charra [1.4K]

Answer: B and C

Explanation: Analyze the audience

                      Identify the problem

8 0
2 years ago
Other questions:
  • Privileged instructions 1) generate an interrupt so they can execute before non-privileged instructions. 2) are valid only when
    5·1 answer
  • Refer to the exhibit. A web designer calls to report that the web server web-s1.cisco is not reachable through a web browser. Th
    15·1 answer
  • What's the 16-bit hexadecimal representation of the signed decimal integer, -331? Answeers?
    14·1 answer
  • 4. Scientists are not concerned with the human impact on the environment. True or False?
    6·2 answers
  • Refer to the exhibit. the gigabit interfaces on both routers have been configured with subinterface numbers that match the vlan
    11·1 answer
  • According to a recent study, more than 75 percent of teens between the ages of twelve and seventeen in the United States have a
    11·2 answers
  • What is a benefit of the Name Manager feature?​
    12·2 answers
  • When classified data is sent over an unclassified network, what is this incident called?
    5·1 answer
  • In C, how could I use a command line input to remove certain characters from an existing string? For example, if I have string '
    8·1 answer
  • Which of the following operation is not performed by a mouse 1) left click , middle click , right click, double click​
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!