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
In a relational database, the three basic operations used to develop useful sets of data are:_________.
olga_2 [115]

In a relational database, the three basic operations used to develop useful sets of data are:

\sf\purple{a.\: Select, \:project,\: and\: join. }

\large\mathfrak{{\pmb{\underline{\orange{Mystique35 }}{\orange{❦}}}}}

6 0
3 years ago
Which section is optional in a resume?
suter [353]

<em>Career Objectives </em>are pointless in a resume, Things like experience, Contact details, education and skills, help the company decide whether to take you or not, in accordance with their needs. They don't need to know why you want the job as opposed to how you could help them.

7 0
3 years ago
Dell, previously the world’s number one PC manufacturer, has seen its market share shrink because of rivals copying its value ch
stepladder [879]

Answer:

A) underscore the importance of continually assessing a firm's strategic position among changing market conditions.

Explanation:

Dell computers believed their leadership position would last forever and forgot the basic rule that it is very hard to reach the top, but it's even harder to stay there.

The market conditions changed since globalization made the world smaller, increasing the potential customers but also increasing competition. Dell wasn't able to revise their strategic position and adapt it to changing markets. A company's strategic position refers to how its strategy deals with changing:

  • environments,
  • competition,
  • resources,
  • stakeholders' expectations.

The same thing happened to General Motors, that once used to be the largest and most profitable car manufacturer in the world, and then went bankrupt. It is still under a lot of financial stress and is continuously losing market share in the US and around the world.

5 0
4 years ago
Guidelines on how to write a report on how technology has affected office duties
UNO [17]

Answer:

weweweweweewewwewweewewweeew

Explanation:

weweweweewweweweewweewweewewew

5 0
3 years ago
Which of the following are the differences between DDR3 SDRAM and DDR2 SDRAM? DDR3 transfers data at twice the rate of DDR2. DDR
Free_Kalibri [48]

Answer:

DDR3 SDRAM having twice rate of data transferring as compared to DDR2 SDRAM both have 240 pin connection. DDR3 memory power consumption is 40 % less as compared to DDR2. both are transfers data on a 64 data bits wide bus. The physical difference occur in both type a cut is present at bottom along pin in DDR2 it is occur probably in center and In DDR3 it is occur at left  through center.

7 0
3 years ago
Other questions:
  • F=M×A<br> What is the acceleration of 50kg object pushed with a force of 500 newton?
    14·1 answer
  • The _____ element of the wsdl describes the data being exchanged between the web service providers and the consumers, including
    12·1 answer
  • Which type of RAM is used exclusively in laptops?<br> a) SODIMM<br> b) DDR3<br> c) DDR<br> d) DDR4
    15·1 answer
  • How do you navigate multiple computer screen at one time?
    5·1 answer
  • Hey guys i need help again on coding
    7·1 answer
  • CorpServ is a small company with 14 client systems and a network printer. Because there are only a limited number of networked s
    13·1 answer
  • Open excel program then use the (IF) function to fill the column of (Expensive/Cheap) then save your
    9·1 answer
  • SOMEONE HELP ME PLEASE <br> What are three reasons technology is beneficial to teens
    11·1 answer
  • What is the address space of a computer with a 64-bit address bus?
    7·1 answer
  • us refe rence: so 1 ac 2 2. describe the applications for merged documents in terms of the following benefits 2. describe the ap
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!