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
The __________ energy in food is changed into mechanical energy by your muscles.
qwelly [4]
The chemical energy in food is transformed into mechanical energy through a process called respiration. This isn't really a computers and technology question though. Try Biology next time.
4 0
2 years ago
A Windows user contacted the help desk with a problem that requires the technician to connect to the remote computer using Remot
Yuri [45]

Answer:

Option 4 i.e., RDP, port 3389.

Explanation:

The User has informed the helpdesk with such an issue that involves the specialist to link to the remote server utilizing Remote Assist to access the user's screen with a quite informative and ambiguous error. Every attempt made by the technician to link to the virtual server outcomes in a message saying that the link has been denied.

So the combinations of RDP and port 3389 would be enabled on the remote computer’s firewall to allow this connection.

6 0
3 years ago
What do presentation and word processing software have in common?
Elza [17]
D seems like the best answer because both Microsoft Word and Power Point can do that.

6 0
3 years ago
Read 2 more answers
In which step of the Systems Development Life Cycle (SDLC) are the logical and physical components defined?
QveST [7]

Answer: Systems design

Explanation: SDLC(Systems Development Life Cycle)  is the cycle that is responsible for the development of the system including several phases related to it.

The system design phase in SDLC works with the physical or hardware units and the logical reports to make a design interface. This phase makes the requirements of the cycle into design and present it for the analysis so that it can test the efficiency of it.

8 0
2 years ago
Henry must choose which type of smart speaker to use in his home. He asked you to help him decide which one will best suit his n
Vikentia [17]

Answer:

Home

Explanation:

When buying a smart speaker, you must be sure which voice assistant you would prefer. If you want to be connected with your Amazon account, then you can get Echo. If you prefer to be connected to your Google Account and want Google Assistant, then you would prefer Home. If you fancy Microsoft, you buy Cortana, and if you love Apple, you buy Homepod. Since Henry wants his smart speaker connected to his Google Account, then he has to buy the Google Home smart speaker.

8 0
2 years ago
Other questions:
  • A drop-down menu must be contained by
    5·1 answer
  • What does OLE stand for? Object
    8·2 answers
  • List 5 items you should keep in mind when developing an app:
    7·1 answer
  • Technologies are having a negative impact on businesses.
    8·1 answer
  • How fast is a backwards long jump in Super Mario 64?
    7·1 answer
  • SATCOM in the Ku- and Ka- bands, as well as EHF systems are adversely affected by rain (the higher the frequency, the greater th
    14·1 answer
  • What kind of a bug is 404 page not found
    10·2 answers
  • What is an Operating System ??
    7·1 answer
  • Jason works for a restaurant that serves only organic, local produce. What
    15·2 answers
  • How does the issue of cybersecurity relate to the internet of things?.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!