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
Ray Of Light [21]
3 years ago
12

4.15 LAB: Mad Lib - loops Mad Libs are activities that have a person provide various words, which are then used to complete a sh

ort story in unexpected (and hopefully funny) ways. Write a program that takes a string and integer as input, and outputs a sentence using those items as below. You may assume that the string does not contain spaces.The program repeats until the input is quit 0. Ex: If the input is: apples 5 shoes 2 quit 0 the output is: Eating 5 apples a day keeps the doctor away. Eating 2 shoes a day keeps the doctor away. Note: This is a lab from a previous chapter that now requires the use of a loop. LAB ACTIVITY 4.15.1: LAB: Mad Lib - loops 0 / 10
Computers and Technology
1 answer:
Sergio039 [100]3 years ago
7 0

Answer:

Following are the program in the Python Programming Language.

#set the infinite while loop

while(True):

 #get string input from the user

 name=input()

 #get integer input from the user

 num=int(input())

 #set the if statement to break the loop

 if(num==0):

   break

 #otherwise, print the following output

 else:

   print("Eating {} {} a day keeps the doctor away.".format(num, name))

<u>Output</u>:

oranges

5

Eating 5 oranges a day keeps the doctor away.

apple

0

Explanation:

<u>Following are the description of the program</u>:

  • Set the loop that iterates at infinite times and inside the loop.
  • Declare two variables which are 'name' that get string type input from the user and 'num' that get integer type input from the user.
  • Set the if conditional statement for break the infinite while loop.
  • Otherwise, it prints the following output.
You might be interested in
File-sharing programs such as Napster, Kazaa, and iMesh make it possible for individuals to exchange music files over the Intern
Mashutka [201]

Answer:

Option A) Demand for CDs has decreased, causing equilibrium price and quantity to decrease.

is the correct answer.

Explanation:

  • File-sharing is a common practice nowadays. It helps us by providing access to different files (audio , video, images, documents) to others in a faster way.
  • A wide range of files are shared daily by using different means of file-sharing including computer networks and peer-to-peer networking.
  • Formerly, the data was shared using CDs but now this system has been replaced with the advent of internet.
  • Usage of CDs is dropped drastically and hence their demand is decreased.
  • So now the prices of CDs are not in equilibrium and their quantity is also decreased.

i hope it will help you!

3 0
3 years ago
Discuss two advantages and two disadvantages of agile methods
Fofino [41]

Answer:

Two advantages of the agile methods are:

  • The agile method require less documentation process as compared to waterfall model and saves maximum time and money. It basically reduces the efforts and the amount of work.
  • In agile method, there is always high customer satisfaction present. In agile method, it is easy to modify in the data as compared to the waterfall model. The customers and developers always interact with each other as the interaction is very important for the good results in the project.

Two disadvantages of the agile methods are:

  • For the large and complex projects, sometimes it is difficult to determine the requirements in the software development as projects are easily go off track.
  • There is less predictability and the projects are easily messed up if the projects requirement are not clear by the customer end.

6 0
3 years ago
In the SQL environment, a _____________ is a logical group of database objects – such as tables and indexes – that are related t
Paha777 [63]

Answer:Schema

Explanation: A schema is the group that contains objects of databases with views, index, triggers, tables etc features. The specific user can access schema who persist a certain username.The user is considered as the owner of the database and its element.

Schema is usually bound to have only single database.There are some schema that are already present in the system as the in-built schema .E.g.- sys, guest etc.

5 0
3 years ago
Which is the most common way to install memory in a laptop?
alina1380 [7]

install memory requires you to take off the bottom portion of the laptop.

7 0
3 years ago
Which action should you take when sending a large attachment?
zlopas [31]
Cancel out other tasks, let the internet focus upon the one attachment.
7 0
3 years ago
Other questions:
  • Choose the type of critical thinking demonstrated in the example:
    8·2 answers
  • You are configuring a switch that has three hosts attached to FastEthernet 0/2 through 0/4. All three hosts are part of a public
    11·1 answer
  • Write a function shampoo_instructions() with parameter num_cycles. If num_cycles is less than 1, print "Too few.". If more than
    7·1 answer
  • The company currently runs 60 autonomous APs and has plans to increase wireless density by 50% in the near future
    13·1 answer
  • When sketching out your Web site you create a clear and straightforward site map that divides the Web site content into a logica
    9·1 answer
  • After conducting interviews with several bad candidates, Althea, a manager at Langrover Inc. interviewed a candidate who was bet
    15·1 answer
  • Which view would you need to use to make
    14·1 answer
  • Write a public static method named evens that takes in 1 argument int a, and returns a String containing all positive even numbe
    8·1 answer
  • In terms of technology, wich of the four devices is the most recent?
    7·1 answer
  • Laptop computers use PCMCIA cards, another type of ________
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!