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
GarryVolchara [31]
2 years ago
15

Create a program in Python that prompts the user to enter an integer number within the range of 1 to 10 inclusive. The program s

hould display “correct input” if the input is within the given range else it should display “wrong input”.

Computers and Technology
2 answers:
lapo4ka [179]2 years ago
8 0

Answer:

dont know if it works!

Explanation:

input=(input("enter number")

if input > 1

print("correct input")

if input <10

print("correct input")

else

print("wrong input")

Gwar [14]2 years ago
7 0

Python Code with Explanation:

# create a function named func to implement the required logic

def func():

# get the input from the user and store it in a variable named number

   number = int(input("Please enter an integer between 1 to 10 inclusive\n"))

# if the input number is equal or greater than 1 and equal to 10 or less then the input is correct    

   if number>=1 and number<=10:

# print correct input

       return print("Correct input")

# else the input is wrong

   else:

# print wrong input

       return print("Wrong input")

# call the function func

func()

Output:

Test 1:

Please enter an integer between 1 to 10 inclusive

4

Correct input

Test 2:

Please enter an integer between 1 to 10 inclusive

0

Wrong input

Test 3:

Please enter an integer between 1 to 10 inclusive

11

Wrong input

You might be interested in
Compare the current in two lightbulbs wired in a series circuit
julia-pushkina [17]
<span>The current flow in two light bulbs wired in a series circuit is identica</span>
7 0
3 years ago
Create a program that includes a function called toUpperCamelCase that takes a string (consisting of lowercase words and spaces)
astraxan [27]

Answer:

#include<iostream>

using namespace std;

//method to remove the spaces and convert the first character of each word to uppercase

string

toUpperCameICase (string str)

{

string result;

int i, j;

//loop will continue till end

for (i = 0, j = 0; str[i] != '\0'; i++)

{

 if (i == 0)       //condition to convert the first character into uppercase

  {

  if (str[i] >= 'a' && str[i] <= 'z')   //condition for lowercase

  str[i] = str[i] - 32;   //convert to uppercase

  }

if (str[i] == ' ')   //condition for space

  if (str[i + 1] >= 'a' && str[i + 1] <= 'z')   //condition to check whether the character after space is lowercase or not

  str[i + 1] = str[i + 1] - 32;   //convert into uppercase

if (str[i] != ' ')   //condition for non sppace character

  {

  result = result + str[i];   //append the non space character into string

  }

}

//return the string

return (result);

}

//driver program

int main ()

{

string str;

char ch;

//infinite loop

while (1)

{

fflush (stdin);

//cout<< endl;

getline (cin, str);   //read the string

//print the result

//cout<< endl << "Q";

// cin >> ch; //ask user to continue or not

ch = str[0];

if (ch == 'q' || ch == 'Q')   //is user will enter Q then terminatethe loop

  break;

cout << toUpperCameICase (str);

cout << endl;

}

return 0;

}

8 0
3 years ago
Suppose a company A decides to set up a cloud to deliver Software as a Service to its clients through a remote location. Answer
finlep [7]

Answer:

perdonnosee

Explanation:

8 0
3 years ago
Which network protocol is used to route IP addresses?<br>A. TCP<br>B. UDP<br>C. IP<br>D. ICMP
ladessa [460]

Answer:

C. IPIP

Explanation:

This protocol is known as an IP that stands for Internet Protocol. This protocol handles the simple task of making sure that the information is routed correctly to and from the corresponding computer machines through the internet. The sending and receiving machines are identified through their Internet Protocol Addresses which lets the protocol know exactly where the information is going and being sent from.

8 0
3 years ago
How can E-Commerce Portals ensure Security of online Transactions by Customers?
beks73 [17]
Ffkjlfdhaslkjfhlaksdfhlkajsdfh
6 0
2 years ago
Other questions:
  • Ann is in the middle of completing her first 1040EZ tax form. She has some questions about an instruction on the form. What shou
    8·2 answers
  • What can be designed to create annoying glitches or destroy data
    15·2 answers
  • Which button will allow you to insert quotes and notes into text into a document​
    12·1 answer
  • Your wireless network has been breached and it seems as though the attacker has modified a portion of your data that is used wit
    12·1 answer
  • Which of the following JavaScript expressions is equivalent to the given HTML code? ​ a. Document.getelementbyId("menu1").menu=
    6·1 answer
  • Why does every image on brainly look like this too me?? it started today
    15·2 answers
  • g Write a function named vowels that has one parameter and will return two values. Here is how the function works: Use a while l
    9·1 answer
  • A monopoly is a market that has few competing businesses. many sellers of the same item. many sellers of a variety of products.
    8·2 answers
  • If you would like to give another user permissions on your mailbox or to particular folders within your mailbox, which role shou
    13·2 answers
  • Consider a game that is searched using random restart hill climbing strategy. Assume that the success rate for the game is 25%.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!