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
Alex Ar [27]
3 years ago
14

Implement a function that meets the specifications below.

Computers and Technology
1 answer:
Alex787 [66]3 years ago
4 0
Def sum_digits(s):  result=0;  isSummed=False;  for char in s:    if char=="0" or char=="1" or char=="2" or char=="3" or char=="4" or char=="5" or char=="6" or char=="7" or char=="8" or char=="9":      result+=int(char);      if not isSummed:        isSummed=True;  if not isSummed:    raise ValueError();  else:    return int(result);
You might be interested in
A(n) ________ is usually a live broadcast of audio or video content. Select one: A. instant message B. webcast C. podcast D. wik
navik [9.2K]

Answer: B webcast

Explanation:

A webcast is a technology that allows the live broadcast of an audio or video event on the Internet. It is also known as Web lecture, virtual meeting, etc. The major advantage is that it gives room for an event to have a larger reach. Webcast participation can be through PC, smart phones, tablets and other devices with quality Internet access.

7 0
4 years ago
Read 2 more answers
What would be the most efficient way for the chain's
Aleks [24]

Answer: The answer is D)

Explanation:

Just got it correct!

8 0
4 years ago
Bruno is asked to create a program that will require the user to enter a passcode. If the wrong passcode is entered, the user ca
almond37 [142]

Answer:

a condition controlled loop

Explanation:

if a user get the password right he will not have to restart

3 0
2 years ago
Compare and contrast the following codes of ethics, including a listing of their similarities and differences: The ACM Code of E
lora16 [44]

Answer:

Please see the explanation

Explanation:

ACM professional code has following characteristics:

Genaral moral Imperative- This further consists of:

Contribute to society and human well being

Avoid harm to others

Be honest and trustworthy

Honor property rights including copyrights and patent

Respect the privacy of other

2) Professional responsibilities

Acquire and maintain professional coompetence

Achieve the highest quality

Accept and provide appropriate professional review

Respect the existing laws

Access computing and communication resources only when authorized to do so.

3) Organizational leadership

Articulate social responsibilities of members of an organizational unit and encourage full acceptance of those responsibilities.

Manage personnel and resources to design and build information systems that enhance the quality of working life.

Ensure that users and those who will be affected by a system have their needs clearly articulated during the assessment and design of requirements; later the system must be validated to meet requirements.

Create opportunities for members of the organization to learn the principles and limitations of computer systems.

4) Compliance with Code

Uphold and promote the principles of this Code.

Treat violations of this code as inconsistent with membership in the ACM.

Software Engineering Code of Ethics and Professional Practice

In accordance with their commitment to the health, safety and welfare of the public, software engineers shall adhere to the following Eight Principles:

Public: Software engineers shall act consistently with the public interest.

Client and Employer: Software engineers shall act in a manner that is in the best interests of their client and employer, consistent with the public interest.

Product: Software engineers shall ensure that their products and related modifications meet the highest professional standards possible.

Judgement: Software engineers shall maintain integrity and independence in their professional judgment.

Management: Software engineering managers and leaders shall subscribe to and promote an ethical approach to the management of software development and maintenance.

Profession: Software engineers shall advance the integrity and reputation of the profession consistent with the public interest.

Colleagues: Software engineers shall be fair to and supportive of their colleagues.

Self: Software engineers shall participate in lifelong learning regarding the practice of their profession and shall promote an ethical approach to the practice of the profession.

Australian Code of Professional Conduct

As an ACS member you must uphold and advance the honour, dignity and effectiveness of being a professional. This entails, in addition to being a good citizen and acting within the law, your conformance to the following ACS values.

1. The Primacy of the Public Interest

You will place the interests of the public above those of personal, business or sectional interests.

2. The Enhancement of Quality of Life

You will strive to enhance the quality of life of those affected by your work.

3. Honesty

You will be honest in your representation of skills, knowledge, services and products.

4. Competence

You will work competently and diligently for your stakeholders.

5. Professional Development

You will enhance your own professional development, and that of your staff.

6. Professionalism

You will enhance the integrity of the ACS and the respect of its members for each other.

In a situation of conflict between the values, The Primacy of the Public Interest takes precedence over the other values.

This Code of Professional Conduct is aimed specifically at you as an individual practitioner, and

is intended as a guideline for your acceptable professional conduct. It is applicable to all ACS

members regardless of their role or specific area of expertise in the ICT industry

All the three codes focus on the public interest, honestl, loyalty, ensuring quality of life, and professional development.

In Australian Code of conduct, in a situation of conflict between the values, The Primacy of the Public

Interest takes precedence over the other values, while there is no such thing in other two codes.

Software Engineering Code of Ethics and Professional Practice includes development of self, that is, Software engineers shall participate in lifelong learning regarding the practice of their profession and shall promote an ethical approach to the practice of the profession, which is not usually seen in other two codes.

8 0
3 years ago
On a piano, a key has a frequency, say f0. Each higher key (black or white) has a frequency of f0 * rn, where n is the distance
lesantik [10]

Answer:

In C:

#include <stdio.h>

#include <math.h>

int main(){

   float f0,r,temp;

   r = pow(2.0,1.0/12);

   printf("f0: ");    scanf("%f", &f0);

   temp = f0;

   for(int i = 0; i<=4;i++){

       f0 = f0 * pow(r,i);

       printf("%.2lf ", f0);

       f0 = temp;    }

   return 0;

}

Explanation:

This declares f0, r and temp as float

   float f0,r,temp;

This initializes r to 2^(1/12)

   r = pow(2.0,1.0/12);

This prompts the user for f0

   printf("f0: ");    scanf("%f", &f0);

This saves f0 in temp

   temp = f0;

This iterates the number of keys from 0 to 4

   for(int i = 0; i<=4;i++){

This calculates each key

       f0 = f0 * pow(r,i);

This prints the key

       printf("%.2lf ", f0);

This gets the initial value of f0

       f0 = temp;    }

   return 0;

8 0
3 years ago
Other questions:
  • What would be the result of running the program below?list ← [ 1, 2, 3 ]APPEND ( list, 5 )INSERT ( list, 4, 4 )REMOVE ( list, 5
    9·1 answer
  • Dr. Laos gets a referral for a 6 month old who has become listless and stopped eating lately. Her pediatrician wanted her to be
    15·1 answer
  • The set of instructions that directs the computer to perform a variety of tasks is known as a
    9·1 answer
  • In this lab, you declare and initialize variables in a Java program. The program file named NewAge.java, calculates your age in
    14·1 answer
  • Create a program in c/c++ which accepts user input of a decimal number in the range of 1 -100. Each binary bit of this number wi
    9·1 answer
  • Será que me podrían ayudar pasandome los códigos por favor
    13·1 answer
  • Why was CDR the most developed country in nepal. Highlight any six reasons​
    9·1 answer
  • What is data and information
    9·1 answer
  • Qué es que puede pasar lo mismo con la galaxia<br>​
    13·1 answer
  • Which of the following types of tasks are comparatively easy for artificial intelligent systems?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!