Write a program that will keep asking for a user input (until a blank line is entered) and will inform me whether what I entered was a valid number or not (without crashing). The program should use at least one try/except loop The program should include at least two custom written functions (a main() function can count as one of the two)

Answers

Answer 1

Answer:

Follows are the program code to this question:

def check():#defining a method check

   while(True):#defining a while loop that uses for the input value

       x=input("Enter value to check valid or not: ")#print message

       if x=='':#use if block that check input is null  

           break#use break keyword for exit

       else:#defining else block

           try:#use try block

               x=float(x)#use x vaiable to convert value into float

               print("valid number")#print message

           except:#use except block

               print("not valid number")#print message

           continue#use continue keyword

check()#call ing method

Output:

please find the attachment.

Explanation:

In the above-given program, a method "check" is defined, and inside the method, a while loop is used to input the value in the "x" variable.

In the next step, a conditional statement is used in the if block, it checks if x value is equal to null it will use break keyword to exit the program.

In the else block x variable is used, that converts the integer value into float and uses the try and except for check the given value and print the message respectively.

Write A Program That Will Keep Asking For A User Input (until A Blank Line Is Entered) And Will Inform

Related Questions

When the InfoSec management team’s goals and objectives differ from those of the IT and general management communities, what items should be considered for the resolution, and who should be involved and provide an example of a situation where such a conflict might exist

Answers

phone holder 2 questions

In which column(s) might replication have been used

Answers

Answer:

Explanation:

wdym?

Mark me brainliest

The internet allows you quick access to research and digital media what do you need to do if you want to use someone’s else’s work?

Answers

Answer:

You need to cite someone else's work

Explanation:

The internet solves a variety of problems. How does it solve the problem of data storage?
Responses

Even if your device is damaged, with the cloud, your information is still available online.

It allows people to store all their data safely on physical devices such as memory sticks.
It allows people to store all their data safely on physical devices such as memory sticks.

It allows people to work from home and always keep all their data with them on their devices.

With the cloud, even if the internet is not working, your information is still available on a device.

Answers

Answer:

i would say B

Explanation:

it makes the most sense

1.) Explain one way the internet has impacted the way we behave.

2.) Explain one way the internet has impacted the way we think.

1.) Explain one way the internet has impacted the way we behave.2.) Explain one way the internet has

Answers

The Internet has turned our existence upside down. It has revolutionized communications, to the extent that it is now our preferred medium of everyday communication. In almost everything we do, we use the Internet. Ordering a pizza, buying a television, sharing a moment with a friend, sending a picture over instant messaging. Before the Internet, if you wanted to keep up with the news, you had to walk down to the newsstand when it opened in the morning and buy a local edition reporting what had happened the previous day. But today a click or two is enough to read your local paper and any news source from anywhere in the world, updated up to the minute.

The Internet itself has been transformed. In its early days—which from a historical perspective are still relatively recent—it was a static network designed to shuttle a small freight of bytes or a short message between two terminals; it was a repository of information where content was published and maintained only by expert coders. Today, however, immense quantities of information are uploaded and downloaded over this electronic leviathan, and the content is very much our own, for now we are all commentators, publishers, and creators.
1) we use the internet for help on school work instead of doing it ourselves.

2) we rely on the internet for answers even if we need to know those answers.

Which Azure networking component is the core unit, from which administrators can have full control over IP address assignments, name resolution, security settings and routing rules

Answers

Answer:

The correct answer will be "Virtual networks".

Explanation:

This networking seems to be the major element of azure connectivity that further keep track of almost all of the essential administrative responsibilities. Its function involves complete ownership over all the appointments of Ip addresses as well as the settlement of names.This decides based on the criteria for transferring the information from one place to another other.

which statements describes the size of an atom

Answers

answer:

A statement that I always think about to understand the size of an atom. If you squish a person down to the size of an atom. It will make a black hole. and if you squish the whole Earth. down to the size of a jelly bean it will also make a black hole. This is just a approximation.

-----------------------

I use the scale to understand how small that is I am open to hear more principles if you were talking about math wise that would be glad to help.

if you have anymore questions I will try to answer your questions to what I know.

.

Declare a 4 x 5 list called N.

Using for loops, build a 2D list that is 4 x 5. The list should have the following values in each row and column as shown in the output below:

1 3 5 7 9
1 3 5 7 9
1 3 5 7 9
1 3 5 7 9
Write a subprogram called printList to print the values in N. This subprogram should take one parameter, a list, and print the values in the format shown in the output above.

Call the subprogram to print the current values in the list (pass the list N in the function call).

Use another set of for loops to replace the current values in list N so that they reflect the new output below. Call the subprogram again to print the current values in the list, again passing the list in the function call.

1 1 1 1 1
3 3 3 3 3
5 5 5 5 5
7 7 7 7 7

Answers

Answer:

# Define the list N

N = [[0 for j in range(5)] for i in range(4)]

# Populate the list with the initial values

for i in range(4):

   for j in range(5):

       N[i][j] = 2*j + 1

# Define the subprogram to print the list

def printList(lst):

   for i in range(len(lst)):

       for j in range(len(lst[i])):

           print(lst[i][j], end=' ')

       print()

# Print the initial values of the list

printList(N)

Output
1 3 5 7 9

1 3 5 7 9

1 3 5 7 9

1 3 5 7 9

--------------------------------------------------------------------

# Update the values of the list

for i in range(4):

   for j in range(5):

       N[i][j] = 2*i + 1

# Print the new values of the list

printList(N)

Output

1 1 1 1 1

3 3 3 3 3

5 5 5 5 5

7 7 7 7 7

Explanation:

What type of file is MyFile.bat?

executable file

batch file

data file

helper file

Answers

Answer:

the correct answer is batch file

Answer:

This is considered a batch file

Explanation:

.bat

In order to average together values that match two different conditions in different ranges, an excel user should use the ____ function.

Answers

Answer: Excel Average functions

Explanation: it gets the work done.

Answer:

excel average

Explanation:

What is the condition for setting an alarm clock

Answers

Answer:

The time in which the alarm clock will sound

Explanation: Hope this helped please give me brainliest

HURRY PLEASE
Maria is creating a game that will need a random number. Which line of code should be included in this program?
import random
print(random number)
1num = random
create random

Answers

Answer:

import random

Explanation:

Using the random module in python you could generate a random number.

Answer: Import

Explanation:

What are recommended CPUs?

Answers

INTEL:

It does vary depending on your PC use, however, for office work, the i5 8th Gen is a recommended CPU as it can handle the requirements for office use without stress. For Gaming and high-end use, the i9 is a recommended CPU as it can handle games easily without stress.

AMD:

AMD Ryzen 3 3300X is good for office work and can handle office scenarios and the AMD Ryzen 7 3800x is good for gaming and high-end use.

Hope this helps,

Azumayay

HELP ASAP PLZ PLZ PLZTegan is playing a computer game on her smartphone and the battery is getting low. When she goes to charge her phone, she notices that the cord is broken. What can Tegan do to solve her problem?
Plug in the smartphone to charge.
Put tape around the broken part of the cord.
Ask a trusted adult for help replacing the cord.
Use the laptop charger instead.

Answers

Answer:

3rd choice

Explanation:

Write a java program that accepts the ingredients for a recipe in cups and converts to ounces

Answers

Answer:

Explanation:

public static int cupsToOunces (int cups) {

   

       int ounces = cups * 8;

       return ounces;

       

   }

This is a very simple Java method that takes in the number of cups in the recipe as a parameter, converts it to ounces, and then returns the number of ounces. It is very simple since 1 cup is equal to 8 ounces, therefore it simply takes the cups and multiplies it by 8 and saves that value in an int variable called ounces.

Students who respond promptly to e-mails are following which netiquette rule?

A. keeping content appropriate
B. assessing an online environment
C. respecting everyone’s time
D. practicing ethical behaviors

Answers

Answer:

respecting everyone's time

Explanation:

they don't make people wait for a response

Its Option C - Respecting Everyone’s Time.
Thank you!

What type of 3-phase connection requires only two transformers?

Answers

The use of two single-phase transformers to step down a high 3-phase voltage to a lower 3-phase voltage is possible using a rudimentary configuration dubbed an "open delta."

What is a single-phase transformer?For industrial applications, three phase transformers perform significantly better. Most heating, air conditioning, lighting, and house applications employ single phase systems in residential settings. When compared to low-power industrial systems and machines, they are less productive. A specific type of transformer called a single phase transformer functions using only one phase of power. This device carries electrical power from one circuit to another by the mechanism of electromagnetic induction. It is a passive electrical device. A transformer cannot change single-phase electricity into three-phase power, even if single-phase power can be produced from a three-phase power source. Phase converters or variable frequency drives are needed to convert single-phase electricity to three-phase power.

To learn more about single phase transformers, refer to:

https://brainly.com/question/29665451

Use the drop-down menus to complete statements about archiving and backing up data fileArchiving data files manages the size of a mailbox for storage.
Creating an Outlook data file
data files in storage on a computer.

Answers

Answer:

Archiving data files manages the size of a mailbox for  

local

storage.

Creating an Outlook data file  

protects

data files in storage on a computer.

Explanation:

Because its right.

Answer:

an increase in cloud computing

Explanation:

HELP NOW PLS now now now

HELP NOW PLS now now now

Answers

Answer:

6.enable data to pass between computers in a network to aid communication between users. As a network engineer, you'll have responsibility for setting up, developing and maintaining computer networks within an organisation or between organisations.

7.Sony

At times, what seems to be an effective value network can also be vulnerable to quickly losing effectiveness. At one time, Sony Corporation set up a value network designed to have a "one-stop" gaming experience for its customers. From 2003 to 2008, Sony designed an all-encompassing gaming portal. However, the network was disrupted when computer hackers began breaking into the system and retrieving sensitive banking data from the network users. As a result, the effectiveness of the network was severely compromised.

Explanation:

What is number of maximum number of virtual processors for each of the
following Hyper-V client?
Answer by a number such as 16.
1. Windows 7
2. Windows 8
3. Open SUSE 12.1

Answers

The number of maximum number of virtual processors for each of the

following Hyper-V client are:

Windows 7 - 4 virtual processorsWindows 8 - 32 virtual processorsOpen SUSE 12.1 - 64 virtual processors

What is the virtual processors?

Hyper-V is a hypervisor-located virtualization platform that allows diversified virtual machines to gossip a single physical apparatus. One of the key advantages of virtualization is the skill to allocate virtual processors for each virtual system, which allows the computer software for basic operation running inside the virtual tool.

The maximum number of in essence processors that can be filling a place a virtual machine depends on various factors, containing the capabilities of the physical main part of computer and the version of the computer software for basic operation running inside the virtual machine.

Learn more about virtual processors from

https://brainly.com/question/30628655

#SPJ1

in Python
# Create a function called get_total. The function should have 2 parameters : price and count
# if either parameter value is negative return 0
# otherwise return total which is calculated as price * count
# call the function with the values 3 and 8
# print the returned result. (NOT in the function)
# call the function again with the values -5 and 4
# print the returned result. (NOT in the function)

Answers

Note that the Phyton function that executes the above-described tasks is given as follows:

def get_total(price, count):

   if price < 0 or count < 0:

       return 0

   else:

       return price * count

# Call the function with the values 3 and 8

result1 = get_total(3, 8)

print(result1)

# Call the function again with the values -5 and 4

result2 = get_total(-5, 4)

print(result2)



What is the rationale for the above response?

In the first function call, the values of price and count are both positive, so the function returns their product, which is 24.

In the second function call, the value of price is negative, so the function returns 0.

Note that the output wil be


24

0

Learn more about Phyton:
https://brainly.com/question/19070317

#SPJ1

C++ 3.4.4: If-else statement: Print senior citizen. Write an if-else statement that checks patronAge. If 55 or greater, print "Senior citizen", otherwise print "Not senior citizen" (without quotes). End with newline.

Answers

Answer:

#include <iostream>

using namespace std;

int main()

{

   int patronAge = 71;

   

   if(patronAge >=55)

       cout<<"Senior citizen"<<endl;

   else

       cout<<"Not senior citizen"<<endl;

   return 0;

}

Explanation:

Initialize the patronAge age, in this case set it to 71

Check the patronAge. If it is greater than or equal to print "Senior citizen". Otherwise, print "Not senior citizen". Use "endl" at the end of each print statement to have new lines.

The Ntds. dit file is a database that stores Active Directory data, including information about user objects, groups, and group membership. It includes the password hashes for all users in the domain.
Just take the points.

Answers

Answer:

I hate it

Explanation:

Mark it as the brainliest if u love god

The previous Discussions have provided the opportunity to share some elegant solutions to programming challenges, and many of them share one common trait—they all handle multiple objects with ease. Forget, for the moment, about some of the complexity involved. The formulas may seem strange, but do not worry. At this stage of programming, you are not expected to generate such things on your own; very few new programmers can. Instead, stop to consider the ways programs embrace the computer’s true assets.

Machines do not mind doing the same thing over and over again; they never get bored. They are also capable of handling massive amounts of data in an impeccably organized manner. One of your challenges as a programmer is to communicate, through code, in an efficient way that plays to the computer’s strengths.

Consider, for example, having to write a program to manage personnel records for all of the people working for your company. You certainly would not want to have to write a program with a unique variable for each unique person in the company. Every time a new employee was hired, someone would have to modify the program to add a new variable for that employee. Every time an employee left the company, someone would have to modify the program to remove that employee’s variable and data from the program. Clearly, this would be a very tedious way to automate personnel records. Instead, you need a way to manage that collection of personnel information in a more organized manner. In fact, you need a way of representing the collection of individual employees as just that, a single variable that provides access to all of the employees. Then, you can use loops to process the employee data. Fortunately, Java provides the concept of an array (and other similar collections, such as the ArrayList) to manage collections of similar objects.

It takes time to truly grasp how powerful object-oriented programming can be and how you can harness its "objects-first" focus to make your own programs concise and elegant. Unfortunately, some programmers do not invest that time. They rely on brute force—repetitive methods resulting in long programs that are, by nature, hard to review and debug.

Return to the open source repositories you previously explored. Find a program that (A) uses at least one loop and a list effectively or (B) could use a loop and a list to improve the program.

*. Response that summarizes your findings. The post should:

1. Include a copy of the code that either (A) exemplifies concise, generalized code or (B) presents the perfect opportunity to apply loops, arrays, and lists to reduce the length of the program using a more elegant solution. Do not undertake a lengthy program; limit your code to approximately 20 lines.
2. If the code is an exemplar of good coding, explain what leads you to that conclusion. Be specific.
3. If the code needs improvement, include a rewritten version of the code, in which you apply one of the methods described above to improve the program. Explain how your solution better embraces a computer’s strengths as a tool that can perform calculations quickly, perform repetitive tasks, and/or manage data effectively.
4. Add or revise comments in the code to accurately describe the function of the loop and list.
Do not include the entire source code of the program you choose. Select just the portion with the necessary information, such as variable declarations and methods called from outside the class or method.

Answers

Answer:

I can't make out the question

Fill in the blanks: The _____ is useful for predicting future results. A. mean. B.median. C.mode

Answers

A. the mean should be useful predicting future results

Answer:

Mean

Explanation:

TWO (2) negative effects of how technology use in education affects students' learning. Your response should include a minimum of FIVE (5) credible sources.​

Answers

Technological advancements have taken education to new heights, yet they have come with their fair share of drawbacks.

What is the explanation for the above response?

Two such demerits of utilising technology in classrooms are distraction and lack of retention capacity among students.

Given the myriad choices provided by tech in terms of entertainment such as social networking sites or online games, students tend to lose focus and face negative consequences such as poor academic performance.

Technology dependency poses a vulnerability that can hinder student learning outcomes.

Students whose reliance rests solely on technology may face challenges related to critical thinking and problem-solving abilities - two necessary skills for achieving academic success.

Learn more about technology  at:

https://brainly.com/question/28288301

#SPJ1

Introduction to Programming Workbook
Draw flowchart to find the largest among threu different numbers entered by a user

Answers

Haije jiôes 1w mòé si aimx

50 POINTS please helpppppp What does SET used to secure emails? S/MIME stand for secure/multipurpose Internet extensions it is a standard for public key encryption. this standard uses a digital _______ to secure emails

Answers

Answer:

signature!

Explanation:

hope this helped

Answer:

Answer Is Signature

Explanation:

What is the function of a breadcrumb trail in a website?

Answers

It lets users keep track of what they’re doing

Answer: traces between homepage and current web page

Explanation:

What is the function of a breadcrumb trail in a website?


Using examples, evaluate the open source model of software development. In your discussion highlight some of its advantages and disadvantages. Furthermore, explain some of the alternatives that also exist.

Answers

Hope this helps! Good luck!
Using examples, evaluate the open source model of software development. In your discussion highlight
Other Questions
What aspects of Americas role in World War I were African Americans bitter about fighting for? What was the real name of british author lewis carroll?. What is the solution??? let f(x) = 3x^2 - 7 and g(f(4)) = 9. what is g(f(-4))? please help! thanks! a. It grows better at lower temperatures than at higher temperatures. b. It grows better at higher temperatures than at lower temperatures. c. It grows equally well at low and high temperatures. d. Temperature has no effect on seed growth. Please select the best answer from the choices provided A B C D On January 1, 2024, Splash City issues $410,000 of 9% bonds, due in 20 years, with interest payable semiannually on June 30 and December 31 each year.Assuming the market interest rate on the issue date is 10%, the bonds will issue at $374,826.Record the bond issue on January 1, 2024, and the first two semiannual interest payments on June 30, 2024, and December 31, 2024. Which shape has: 4 lines of symmetry 4 right angles 4 sides of equal lengthA, Cube B, Cuboid C, Rectangle D, Square E, Cone What are the two mechanisms by which signal strength is increased in long-term potentiation of a neuronal pathway ALMOST DONE! TRY TO ANWSER CORRECTLY 3. How many atoms are found in 5.20 g of magnesium (Mg)? Just like Donna and Alison, Lauren spends all of her income, 40 dollars, on pizza and tacos. Lauren's utility function is W(z,t)=8z+2t. Derive Lauren's demand function for tacos, as a function of the price of tacos, pt. A subunit of an organic compound that confers particular chemical and physical properties is termed. Create a social media page using your spelling words. You can use your words in status update, likes, books you have read, etc. You can even choose pictures to go along with your posts. Use the template to design your social media page. Use as many of your spelling words as you can. Underline the spelling words that you use. Upload the completed template here. The Genutech Company was very successful at manufacturing medical equipment, but the board of directors was dissatisfied with the profit levels and dividend returns to its shareholders. Under pressure to maximize profits and minimize costs, the company moved manufacturing facilities to countries with fewer environmental regulations. This situation exemplifies __________. does lemon juice have more or less H+ ions than it has OH- ions? explain at what depth would a 3.0 mhz xdcr have an attenuation of 9db? Which of the following best explains how the historical circumstances of Kennans service as a diplomat in the Soviet Union influenced his point of view regarding the Soviet structure of power in the first paragraph?A. He witnessed how the Soviet Union used its industrial capabilities to produce vastly more quantities of war equipment than Germany could produce.B. He witnessed how German atrocities had turned ethnic groups within the Soviet Union who had initially opposed Stalin against the Nazis.C. He witnessed how the Soviet Unions defeat of Nazi Germany allowed it to decide the fate of states in Eastern Europe that it occupied.D. He witnessed how conflict between Germany and the Soviet Union allowed Stalin to further centralize his power and use Russian nationalism to mobilize the population. These tables of values represent continuous functions. In which table do thevalues represent an exponential function?A X12.345y41236108324 B X 12345910111213. CX12345 7 28497091 D X 1 2 345 y 4 122028. 36. the illness that lady Macbeth refers to in this metaphor is Which statement about y = x2 - 4x - 32 is true?A. The zeros are 8 and -4, because y = (x - 8)(x + 4).B. The zeros are 8 and -4, because y = (x+8)(x - 4).C. The zeros are -8 and 4, because y=(x - 8)(x+4).D.The zeros are -8 and 4, because y=(x+8)(x - 4). PLEASE HELP: Shonda performed an experiment in which she pulled a marble out of a bag, recorded its color, put it back, and repeated. After completing 12 trials, she pulled a red marble 3 times.Which answers are good models for this bag of marbles?Select two that apply.3 red, 6 blue, 6 yellow, red, , 6, blue, , 6, yellow , ,5 red, 5 blue, 5 yellow, 5 green, red, , 5, blue, , 5, yellow, , 5, green , ,3 red, 3 purple, 3 orange, 3 green3, red, , 3, purple, , 3, orange, , 3, green , ,5 red, 3 blue, 4 yellow5, red, , 3, blue, , 4, yellow , ,3 red, 12 blue, 3 yellow, 1 green