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
WARRIOR [948]
4 years ago
10

BlockPy: #38.2) While Input Use a while loop to repeatedly take input from the user and print whatever they type in. When the us

er enters the empty string (""), then your program should stop. Note that if your program accidentally loops forever, your browser may become unresponsive for up to 15 seconds. Be very careful while writing while loops!
Computers and Technology
1 answer:
BARSIC [14]4 years ago
8 0

Answer:

strr=input("please enter something: ")

while strr is not "":

   print(strr)

   strr=input("please enter something: ")

Explanation:

whenever the user will enter an empty string the loop will terminate

You might be interested in
Write a program that will use user input. The program should be called PrintNumberToWordie which prints "ONE", "TWO",..., "FIVE"
andrezito [222]

Answer:

import java.util.Scanner;

public class PrintNumberToWordie {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter a number");

       int num = in.nextInt();

       if(num == 1){

           System.out.println("ONE");

           if(num%2==0)

               System.out.println("Divisible by 2");

       }

       else if (num == 2){

           System.out.println("TWO");

           if(num%2==0)

               System.out.println("Divisible by 2");

       }

       else if (num == 3){

           System.out.println("THREE");

           if(num%2==0)

               System.out.println("Divisible by 2");

       }

       else if (num == 4){

           System.out.println("FOUR");

           if(num%2==0)

               System.out.println("Divisible by 2");

       }

       else if (num == 5){

           System.out.println("FIVE");

           if(num%2==0)

               System.out.println("Divisible by 2");

       }

       else if (num == 6){

           System.out.println("SIX");

           if(num%2==0)

               System.out.println("Divisible by 2");

       }

       else if (num == 7){

           System.out.println("SEVEN");

           if(num%2==0)

               System.out.println("Divisible by 2");

       }

       else if (num == 8){

           System.out.println("EIGHT");

           if(num%2==0)

               System.out.println("Divisible by 2");

       }

       else if (num == 9){

           System.out.println("NINE");

           if(num%2==0)

               System.out.println("Divisible by 2");

       }

       else if (num == 10){

           System.out.println("TEN");

           if(num%2==0)

               System.out.println("Divisible by 2");

       }

       else{

           System.out.println("No Match");

       }

 }

}

Explanation:

  • Using Java programming language
  • Import Scanner class
  • Prompt user to enter a number, receive and store in a variable
  • Use if and else if statements to check the value of the number and output the corresponding spelling
  • Use and inner if statement to check divisibility by two using the modulo operator
5 0
3 years ago
What does error code 18 indicate?
RSB [31]

Answer:

you need to reinstall the drivers for the device

7 0
3 years ago
HELP!!! Bad things about Helen Keller. I'm doing a debate and i need to prove that Steve Jobs is better than Helen Keller!!
Luden [163]
Steve jobs invented a way for a large amount of people to communicate. Hellen Keller is an example for only a select people (deaf and blind) on how to communicate
6 0
3 years ago
Questions
allsm [11]

Answer:

intrusion detection

Explanation:

The internet content filter is not going to check whether you are not welcome to any site, and that is done by intrusion detection, and hence, this is not performed by the internet content filter. However, content inspection, malware inspection, and URL filtering are performed by the internet content filter.

4 0
3 years ago
Which Tab provides the command to add a hyperlink to a document?
Natali [406]

Answer:

I love it is your responsibility is accepted the second one was for the database reply to your account we should wear the same same Dp xd I have tow bar is the only one hour u

7 0
3 years ago
Read 2 more answers
Other questions:
  • A company that offers services for accessing and using the Internet is: *
    10·1 answer
  • The _________ check is a type of hardware control that involves adding a "1" or a "0" to the end of every 8 bit byte such that t
    11·1 answer
  • How does Taylorism (scientific management used to streamline mass production) resemble a bureaucracy? Select one: a. Routinizati
    5·1 answer
  • A researcher wants to do a web-based survey of college students to collect information about their sexual behavior and drug use.
    7·1 answer
  • The common programming structure that implements "conditional statements" is called an____ statement.
    7·1 answer
  • Someone pls help me with this question (Java)
    5·2 answers
  • Which type(s) of license(s) allow the underlying software code to be viewed?
    15·1 answer
  • What is the purpose of indexing?
    15·2 answers
  • Computer applications
    9·1 answer
  • THE DIFFERENCE BETWEEN COPY AND PASTE AND CUT AND PASTE IS: *
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!