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
Ne4ueva [31]
3 years ago
11

Forms often allow a user to enter an integer. Write a program that takes in a string representing an integer as input, and outpu

ts yes if every character is a digit 0-9.
Computers and Technology
2 answers:
Bond [772]3 years ago
7 0

Answer:

user_string = input("Input a string : ")

output = user_string.isnumeric()

if output == True:

   print("yes")

else:

   print("no")

Explanation:

  • First of all check whether user input have all numeric value or not .
  • Display yes if string contain all numeric values .
  • Display no if string contain at least one non - integer character .

evablogger [386]3 years ago
4 0

Answer:

text = input("enter a value: ")

if text.isdigit():

       print("yes")

Explanation:

The program is written in python.

text = input("enter a value: ")  This expression prompt the user to input  a string value containing any form of character . The inputted character might be letters, digits etc.

if text.isdigit():

This check if the inputted value is a digit .

print("yes")

if the value is a digit the system will display yes.  

You might be interested in
Which of these is NOT a sign that someone might be drunk
earnstyle [38]

Answer:

what are the signs someone would or would not be drunk

7 0
3 years ago
Read 2 more answers
What is the function of a slide transition in a presentation program? A. It enables you to change the presentation layouts. B. I
Lelechka [254]

The answer would be

C. It adds visual effects when you move from one slide to another.

Hope this has helped you! :)

5 0
3 years ago
Read 2 more answers
For this programming assignment, you have to write a Java program that tests whether a given input string represents a Valid E-m
Step2247 [10]

Answer:

To check if the email address is correct it should have only one "@" symbol, we have to split the input string by this symbol. The code in java to achieve this is the following:

class Main {

 public static void main(String[] args) {

   String email = "[email protected]";

   String[] email_split = email.split("@");

   long count_a = email.chars().filter(ch -> ch == '@').count();

   if(count_a == 1){

     System.out.println("User name:   "+email_split[0]);

     System.out.println("Domain name: "+email_split[1]);

   }else{

     System.out.println("There is no valid email address.");

   }

 }

}

Explanation:

The explanation of the code is given below:

class Main {

 public static void main(String[] args) {

   String email = "[email protected]"; //input string to evaluate if is valid email

   long count_a = email.chars().filter(ch -> ch == '@').count(); //Count how many times the symbol @ appears

   if(count_a == 1){ //A valid email only contains one at

     String[] email_split = email.split("@"); //separate the values using the at in an array

     System.out.println("User name:   "+email_split[0]); //the first element is the username

     System.out.println("Domain name: "+email_split[1]); //the second element is the domain name

   }else{

     System.out.println("There is no valid email address."); //If there isn´t an at or are more than one then display a message saying the email is not valid

   }

 }

}

8 0
3 years ago
What a suitable variable name to store the number of years old a person is
navik [9.2K]

age is a suitable variable name. It's descriptive and concise. Make sure it's lowercase.

8 0
3 years ago
What does a proxy server do?
Otrada [13]

I believe your answer would be C, but that also falls under a VPN.


8 0
3 years ago
Read 2 more answers
Other questions:
  • Monica needs a printer to use at home. She wants fine-quality prints at an affordable cost. Which printer will help her achieve
    9·1 answer
  • Wich of these is an example of magnetic storage
    11·1 answer
  • “What does it mean when we “rework” copyrighted material?”
    15·2 answers
  • The Sumif formula will add numbers together from a range of numbers ONLY IF they contain the criteria. True or false
    8·1 answer
  • Clep allows students to do all of thw following except which?
    11·2 answers
  • First Person Who Answers Fast As Possible Will Be Marked As Brainiest ​
    12·1 answer
  • Please choose odd one out please tell fast ​
    13·2 answers
  • A customer is looking for a storage archival solution for 1,000 TB of data. The customer requires that the solution be durable a
    9·1 answer
  • It is a minor cereal of importance only in West Africa where it is eaten in place of rice during during famines. Used for salads
    10·1 answer
  • Design an Application called Student Course Management create interface called Student Course add an abstract method called ad C
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!