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
Wow that funny a heck
lorasvet [3.4K]

Answer:

Seriously??? Omg - Orange Trump!!

3 0
2 years ago
Keeping in mind the role the order of precedence plays in equations, what would Excel display as the result of the following equ
Arlecino [84]
Keeping in mind the role the order of precedence plays in equations, what would Excel display as the result of the following equation?

=(24+75)/(6*3)
=99/18
= 5.5
18)99.0.
90.0
9.0

D. 5.5



6 0
3 years ago
Assume that x is a double variable that has been initialized. Write a statement that prints it out, guaranteed to have a decimal
Feliz [49]

Answer:

cout <<showpoint << x; is  the statement which  prints the decimal point,        but without forcing scientific.

Explanation:

The showpoint function in c++ print the decimal point number without forcing scientific.The showpoint function set  the showpoint format flag for the str stream in c++.

Following are the program in c++

#include<iostream> //header file

using namespace std; // namespace

int main() // main function

{

   double x=90.67; // double variable

   cout <<showpoint << x; // display x  without forcing scientific

  return 0;

}

Output

90.6700

6 0
3 years ago
In which of the following locations can you edit all of the Properties of a PowerPoint file?
Lapatulllka [165]
Access the File<span> menu, choose </span>Info Pane<span> to get to </span>Backstage view, you can see Properties on t<span>he area on the right side </span>of the current PowerPoint presentation.  <span>Within the </span>Properties<span> pane click the </span>Show All Properties<span>  option , T</span><span>his will displays properties such as </span>Size<span>, the number of </span>Slides<span>,  </span>Hidden Slides<span>, the number of </span>Multimedia Clips, etc.  Some of the entries are editable w<span>ithin the  </span>Properties pane, and some are not. Just move your mouse cursor over any detail of a property. The editable sections will change the cursor into edit mode.  
6 0
3 years ago
According to a case study in one of our weekly chapter reading, nearly..................... percent of all employees send work e
ozzi

Answer:

A.80, and uncontrolled

3 0
3 years ago
Read 2 more answers
Other questions:
  • Which protocol, as a companion protocol to RTP, provides monitoring and reporting for RTP connections?
    14·1 answer
  • All the computers in this type of network are connected to two other computers.
    12·1 answer
  • The Internet shopping cart is an example of which version of the web?
    15·1 answer
  • True / False
    5·1 answer
  • The purpose of a lockout tagout checklist is to​
    9·2 answers
  • Which of the following is used by credit card companies to determine APR?
    10·2 answers
  • . Which of the following is NOT a valid declaration for a character string?
    6·1 answer
  • A company is developing a smart TV that connects to a wireless home network. Which technology can best help to establish this co
    11·2 answers
  • What is meant by the term text?
    14·2 answers
  • A serial schedule:
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!