Write a function (getResults) that has a parameter (myGrades - a List data type). The function will return the sum of numbers in the list which are positive. (python)

Answers

Answer 1

There are both positive and negative numbers on the list of grades. The get Results function returns 347 as the total of all "yes" grades.

How do you make a Python list include only positive values?

The "lambda" function is utilised: The lambda function, as we all know, applies the condition to each element. Hence, we can determine whether the integer is bigger than zero using lambda. If it is greater than zero, It will print the list of all positive numbers.

def getResults(myGrades):

total = 0 in myGrades for the grade:

if grade > 0:\s total += grade

return total\sgrades = [90, -5, 85, 75, -10, 92]

print result = getResults(grades) (result) # Output: 347 (sum of positive grades: 90 + 85 + 75 + 92 = 347)

To know more about function  visit:-

https://brainly.com/question/28939774

#SPJ1


Related Questions

Select the correct answer.
Which statement best describes a website builder?
A. an application that enables code editing to create a unique website
B.
a tool that enables developers to create web apps without programming knowledge
C.
a tool that enables developers to create websites without programming knowledge
D. an application that automatically applies HTML tags to text

Answers

The statement that best describes a website builder is option C. a tool that enables developers to create websites without programming knowledge

What is programming?

A website builder is a software tool that allows individuals or organizations to create websites without the need for advanced technical skills or knowledge of programming languages.

Website builders are designed to simplify the website creation process by providing an intuitive drag-and-drop interface and pre-designed templates that users can customize with their own content.

Therefore, With a website builder, users can create and edit web pages, add images and videos, and customize the design and layout of their website without needing to write code.

Read more about programming here:

https://brainly.com/question/23275071

#SPJ1

In PowerPoint, if a developer wanted to include audio in a presentation, they can either record their own audio, or ___.
A) select an audio clip saved on their PC
B) choose from sound clips available in PowerPoint
C) use the SmartArt feature to include sound
D) select online audio clips

Answers

Answer:

Explanation:

In PowerPoint, you can add audio to your presentation by either recording your own audio or by inserting an audio file. When inserting an audio file, you have the option to select an audio clip saved on your PC, choose from the sound clips available in PowerPoint or even select online audio clips.

PowerPoint provides a built-in library of sound clips that you can choose from, including music, sound effects, and narration tracks. You can access this library by selecting the "Insert" tab, clicking on "Audio," and then selecting "Audio on my PC" or "Online Audio" to browse through the available sound clips.

Using the built-in sound clips can save time and effort for developers as they don't have to spend time creating or searching for suitable audio files. Additionally, PowerPoint's sound clips are often designed to work well with the program's features and can enhance the overall quality of the presentation.

Write code in MinutesToHours that assigns totalHours with totalMins divided by 60

Given the following code:

Function MinutesToHours(float totalMins) returns float totalHours
totalHours = MinutesToHours(totalMins / 60)
// Calculate totalHours:
totalHours = 0

Function Main() returns nothing
float userMins
float totalHours

userMins = Get next input
totalHours = MinutesToHours(userMins)

Put userMins to output
Put " minutes are " to output
Put totalHours to output
Put " hours." to output

Answers

Answer:

Function MinutesToHours(float totalMins) returns float totalHours

   // Calculate totalHours:

   totalHours = totalMins / 60

   return totalHours

End Function

Explain the following terms and how they relate to mobile technology​

Answers

Answer: Mobile technology refers to the technology used in mobile communication devices such as smartphones

Explanation:

Mobile technology refers to the technology used in mobile communication devices such as smartphones, tablets, and wearable devices. Mobile technology allows users to access information and communication services on the go, anywhere and anytime.

Mobile technology has evolved rapidly over the years, leading to the development of various applications and services that have transformed the way we communicate, work, and entertain ourselves. Some of the key features of mobile technology include:

Portability: Mobile devices are designed to be portable and can be carried around easily, making them convenient for use while on the move.

Connectivity: Mobile technology allows users to stay connected to the internet, enabling them to access various services and applications.

Personalization: Mobile devices can be customized to suit individual preferences, with various settings and features that can be tailored to the user's needs.

Location-based services: Mobile technology allows for the delivery of location-based services, such as navigation and weather updates.

Overall, mobile technology has revolutionized the way we interact with the world around us, making information and communication more accessible and convenient. It has also opened up new opportunities for businesses and individuals to connect and engage with their target audience.

If you want to learn more you can visit this blog

https://www.janbasktraining.com/blog/mobile-automation-testing/

Many real world problems that we encounter including Information Systems problems are wicked in nature. The following statements are TRUE of the wickedness of these problems EXCEPT….

Answers

They have clear avenues for solutions that are simple to identify. Wicked problems lack precise problem descriptions, making them ambiguous, complex, and challenging to resolve.

What are some instances of wicked dilemmas in real life?

Some of the most difficult and intricate problems of our time—many of which endanger human health—are referred to as "wicked." Examples of such wicked challenges include climate change, biodiversity loss, persistent poverty, the growing obesity pandemic, and food insecurity.

What constitutes a wicked example?

adjective a cruel and evil deed In the play, she took on the role of the evil stepmother. After winning, she grinned viciously. Her caustic sense of humour is well recognised. She was a bad case.

To know more about Wicked problems visit:-

https://brainly.com/question/29854616

#SPJ1

Question:

Many real-world problems that we encounter, including Information Systems problems, are wicked in nature. The following statements are TRUE of the wickedness of these problems EXCEPT:

a) They have unclear problem definitions and no definitive solutions.

b) They have multiple and changing constraints.

c) They have well-defined solution paths that can be easily determined.

d) They require a unique approach to every problem instance.

1. The US Constitution establishes that only a natural born citizen who is at least thirty-five years of age is eligible to be President of the US (Article 2/section 1). Create a Java program to help a user determine if s/he is eligible to be President. (Use Dialog boxes for input/output).

Answers

Answer:

import javax.swing.JOptionPane;

public class PresidentEligibility {

 public static void main(String[] args) {

   

   String ageInput = JOptionPane.showInputDialog("Please enter your age:");

   int age = Integer.parseInt(ageInput);

   

   String citizenshipInput = JOptionPane.showInputDialog("Please enter your citizenship status:");

   String citizenship = citizenshipInput.toLowerCase();

   

   if(age >= 35 && citizenship.equals("natural born citizen")) {

     JOptionPane.showMessageDialog(null, "You are eligible to be President!");

   } else {

     JOptionPane.showMessageDialog(null, "Sorry, you are not eligible to be President.");

   }

 }

}

Find the product solution of

Dr(r, θ) =

∂2u

∂r2

+

1

r

∂u

∂r

+

1

r

2

∂2u

∂θ2

= 0​

Answers

This is the product solution of the two independent solutions of the form:

R(r)Θ(θ)

where R(r) is the radial component and Θ(θ) is the angular component.

We can assume that the second term of the equation is separable, meaning that we can rewrite it as:

∂2u

∂θ2

= -λu

where λ is a separation constant.

Substituting this into the original equation, we get:

∂2u

∂r2

1

r

∂u

∂r

λ

r

2

u

= 0

Multiplying both sides by r^2, we get:

r^2

∂2u

∂r2

r

∂u

∂r

λu

= 0

This is a form of the Bessel differential equation, which has solutions of the form:

u(r) = AJv(√λr) + BYv(√λr)

where Jv and Yv are Bessel functions of the first and second kind, respectively, and A and B are constants determined by the boundary conditions.

Substituting this back into the product solution, we get:

Dr(r, θ) = (d^2/dt^2 + λ) [R(r)Θ(θ)]

This shows that the product solution is a linear combination of functions that satisfy the partial differential equation.

Question 9 of 15 Which benefit does Infrastructure as a Service (laaS) provide to IT professionals and SysAdmins, as opposed to on-premises setups? O They can communicate to the cloud with on-premises data centers They can dedicate specific hardware racks in cloud data centers for additional security O They can provision free infrastructure at scale They can provision infrastructure without having to worry about physical servers or networking O I don't know this yet. Submit answer​

Answers

Answer:

Answer: They can provision infrastructure without having to worry about physical servers or networking

What do you think will be different between telling a person about your imagine and telling a computer about your image?

Answers

Telling a person your image could be simplified in the other persons head with few words. Telling a computer your imagine on the other hand has to be exact and precise. You have to give every detail, where as humans can fill in the blanks.

Making sure that every employee has a stake in customer happiness is the best way to ensure:
A) Lower marketing research costsB) Lower employee turnoverC) That you are creating a customer-centric corporate cultureD) A higher percentage of market share

Answers

Answer: C) That you are creating a customer-centric corporate culture

That you are creating a customer-centric corporate culture is the best way to ensure customer happieness.

What is Corporate culture?

Corporate culture is the set of values and practices that guide how management and employees should work together and interact inside an organization.

It may have an impact on staff recruitment and retention, productivity, financial success, and long-term viability of the organization. International trade, economic trends, national cultures and traditions, company size, and goods all have an impact on corporate culture.

A company's corporate culture embodies its guiding principles in both theory and practice. Clan culture, adhocracy culture, market culture, and hierarchical culture are the four different forms of business cultures.

Therefore, That you are creating a customer-centric corporate culture is the best way to ensure customer happieness.

To learn more about Customer centric corporate, refer to the link:

https://brainly.com/question/14030342?

#SPJ2

Using An assembly code
Read a 3 digit number from one row, then a 1 digit number from the second row. Subtract the 1 digit number from the 3 digit number, and display the result. Make sure you print your name first, then your output.
Sample Input
123
1
Output
Name Last name
122
Sample Input
100
1
Output
Name Last name
099 (or you can display 99 without the 0, either one is fine)

Sample Input
001
1

Output

Name Last name
0 (or you can display 000, either one is fine by me)

Answers

An example implementation of the algorithm you described in x86 assembly language using NASM syntax:

The Assembly Language Program

section .data

   ; Define your data here if needed

section .text

   global _start

_start:

   ; Print your name here

   

   ; Read the 3-digit number

   mov eax, 3       ; number of characters to read

   mov ebx, 0       ; file descriptor (stdin)

   mov ecx, buf     ; buffer to store the input

   mov edx, eax     ; maximum number of characters to read

   int 0x80         ; invoke the read system call

   

   ; Convert the input to a number

   mov eax, buf

   sub eax, '0'     ; convert the hundreds digit

   mov ebx, 10

   imul ebx

   mov ecx, buf+1

   sub ecx, '0'     ; convert the tens digit

   add eax, ecx

   imul ebx

   mov ecx, buf+2

   sub ecx, '0'     ; convert the units digit

   add eax, ecx

   

   ; Read the 1-digit number

   mov eax, 1       ; number of characters to read

   mov ebx, 0       ; file descriptor (stdin)

   mov ecx, buf     ; buffer to store the input

   mov edx, eax     ; maximum number of characters to read

   int 0x80         ; invoke the read system call

   

   ; Convert the input to a number

   mov ebx, 10

   mov ecx, buf

   sub ecx, '0'     ; convert the digit

   mul ebx

   

   ; Subtract the 1-digit number from the 3-digit number

   sub eax, ecx

   

   ; Convert the result to a string

   mov ebx, 10

   div ebx

   add edx, '0'     ; convert the units digit

   mov [result+2], dl

   div ebx

   add edx, '0'     ; convert the tens digit

   mov [result+1], dl

   add eax, '0'     ; convert the hundreds digit

   mov [result], al

   

   ; Print the result

   mov eax, 4       ; system call for write

   mov ebx, 1       ; file descriptor (stdout)

   mov ecx, result  ; address of the string to print

   mov edx, 3       ; number of characters to print

   int 0x80         ; invoke the write system call

   

   ; Exit the program

   mov eax, 1       ; system call for exit

   xor ebx, ebx     ; exit status

   int 0x80

section .bss

   buf resb 4       ; buffer for input (3 digits + newline)

   result resb 4    ; buffer for output (3 digits + null terminator)

Note that this implementation uses system calls for input/output and assumes that the input is terminated by a newline character. You may need to modify it to suit your specific requirements or platform.

Read more about assembly language here:

https://brainly.com/question/30299633

#SPJ1

he files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it works properly.

An example of the program is shown below:

Enter a number between 1 and 20 >> 5
5 4 3 2 1 Blastoff!
JAVA CODE:
// Prompt user for value to start
// Value must be between 1 and 20 inclusive
// At command line, count down to blastoff
// With a brief pause between each displayed value
import java.util.Scanner;
public class DebugSix3
{
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
int userNum, val;
final int MIN = 1;
final int MAX = 20;
final int TIME_WASTER = 100000;
System.out.print("Enter a number between " + MIN +
" and " + MAX + " >> ");
userNum = keyboard.nextInt();
while(userNum < MIN && userNum < MAX)
{
System.out.println("Number out of range");
System.out.print("Enter a number between " + MIN + " and " +
MAX + " inclusive >> ");
userNum = keyboard.nextInt();
}
for(val = userNum; val == 0; --val)
{
System.out.print(val + " ");
for(int x = 0; x < TIME_WASTER; ++x)
for(int y = 0; y < TIMEWASTER; ++y)
for(int z = 0; z < TIME_WASTER;);
// Adjust these numbers for faster or slower performance
}
System.out.println("Blastoff!");
}
}

Answers

Fixed code:

import java.util.Scanner;

public class DebugSix3 {
public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
int userNum, val;
final int MIN = 1;
final int MAX = 20;
final int TIME_WASTER = 100000;

Kotlin:
System.out.print("Enter a number between " + MIN + " and " + MAX + " >> ");
userNum = keyboard.nextInt();

while (userNum < MIN || userNum > MAX) {
System.out.println("Number out of range");
System.out.print("Enter a number between " + MIN + " and " + MAX + " inclusive >> ");
userNum = keyboard.nextInt();
}

for (val = userNum; val >= 0; --val) {
System.out.print(val + " ");
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
System.out.println("Blastoff!");
}

Changes made:

Fixed the while loop condition to use OR instead of AND
Fixed the for loop condition to use greater than or equal to instead of equal to
Added a try-catch block to pause the loop for 1 second using Thread.sleep() instead of nested for loops
Fixed some syntax errors and indentation issues.

program to take the command line input to cut down the blast off.

// DebugSix3.java

// Prompt user for value to start

// Value must be between 1 and 20 inclusive

// At command line, count down to blastoff

// With a brief pause between each displayed value

import javax.swing.*;

public class DebugSix3

{

 public static void main(String[] args)

 {

   String userNumString;

   int userNum, val;

   final int MIN = 1;

   final int MAX = 20;

   userNumString = JOptionPane.showInputDialog(null,

       "Enter a number between " + MIN + " and " + MAX + " inclusive");

   userNum = Integer.parseInt(userNumString);

   while(userNum < MIN || userNum > MAX)

   {

      userNumString = JOptionPane.showInputDialog(null,

       "Number out of range" +

       "\nEnter a number between " + MIN + " and " + MAX + " inclusive");

      userNum = Integer.parseInt(userNumString);

   }

   for(val = userNum; val > 0; --val)

   {

     System.out.print(val + "  ");

     for(int x = 0; x < 100000; ++x)

      for(int y = 0; y < 10000; ++y);

      // Adjust these numbers for faster or slower performance

   }

   System.out.println("Blastoff!");

 }

}

learn more about command line input here:

https://brainly.com/question/19569210

#SPJ1

H. W 2: A class includes 20 female students and 30 male students, including 15 female students and 20 male students with black hair. If a person is randomly chosen from the class, what is the probability that the chosen person is a female student with black hair? Hint: (Female student with black hair ) = P(AU B)​

Answers

Answer:

The probability that the chosen person is a female student with black hair is 15/50, or 3/10.

how do you number the dissertation correctly in the table of contents? ​

Answers

To number the dissertation correctly in the table of contents, you should follow these steps:

Use heading styles: First, use the heading styles provided in your word processor (e.g., Heading 1, Heading 2, etc.) to format your dissertation. This will ensure that the headings are properly formatted and numbered automatically.

Number the headings: Number each heading in your dissertation, starting with "Chapter 1" for the first chapter, and so on. You can use Arabic numerals (1, 2, 3, etc.) to number the chapters and sections.

Include subheadings: If you have subheadings within a chapter, number them using decimal notation (e.g., 1.1, 1.2, 1.3, etc.).

Update the table of contents: After you have formatted and numbered your dissertation headings, insert a table of contents into your document. Then, update the table of contents to ensure that it reflects the correct page numbers for each heading.

By following these steps, you can ensure that your dissertation is properly numbered and formatted in the table of contents.

You have just purchased a new Dell PowerEdge R820 Rack Server. The server is equipped with four Xeon E5-4650 CPUs, 128 GB of RAM, four 1 TB SAS hard drives, and two 750-watt power supplies. You have a 21-inch LCD monitor connected to your server. You want a UPS to keep your server running for up to 20 minutes in the event of a power failure. You prefer a rackmounted solution. Use the UPS selector tool at APC's Web site (a well-known UPS vendor). The UPS selector is at https://www.apc.com/shop/us/en/tools/ups_selector/

Determine which model of UPS will work well for this server, and state your reasons. Write a one-page memo explaining your choice and why this would work for the above situation. Upload the document here.

Answers

Answer:

To: Management

From: [Your Name]

Subject: UPS Recommendation for Dell PowerEdge R820 Rack Server

This memo is to recommend a UPS solution for the Dell PowerEdge R820 Rack Server. After considering the specs of the server and the desired use, I recommend the APC Smart-UPS RT 8000VA RM XL3U.

The Smart-UPS RT 8000VA RM XL3U is a rack mounted UPS designed for large applications. It has an output of 8000VA/5600W and can provide battery backup for up to 20 minutes. It has eight output receptacles, which should be enough to power the server, monitor, and any other peripherals that may be connected. The UPS also has a built-in web/network management interface, which allows you to monitor the UPS and its connected loads, as well as control the UPS remotely.

In addition, the Smart-UPS RT 8000VA RM XL3U can be configured with an optional external battery pack, which can provide up to 90 minutes of backup power. This is ideal for situations where an extended period of time without power is expected, such as during a blackout.

Overall, the Smart-UPS RT 8000VA RM XL3U is an excellent choice for the Dell PowerEdge R820 Rack Server. It is a powerful, reliable, and feature-rich UPS that can provide up to 20 minutes of battery backup and can be configured with an external battery pack for extended backup times.

If you have any questions or concerns about this recommendation, please do not hesitate to contact me.

Sincerely,

[Your Name]

Other Questions
A large forest of trees was recently cut down. Which of the following effects, relating only to photosynthesis, is most likely to occur in this area as a result?a An decrease in carbon dioxide in the airb An increase in sunlightc A decrease in oxygen in the aird An increase in glucose (sugar) in the area patriarchy is never found in societies that use a bilateral kinship systems. group of answer choices true false as a young child, jason repeatedly experience sexual and physical abuse from a close relative. which form of stress did jason most likely feel as a result of this trauma? recommending additional items that complements a customers purchase physical controls to safeguard assets do not include question 2 options: a) cashier department supervisors. b) locked warehouses. c) vaults. d) safety deposit boxes. Choose the correct statement(s) regarding the changes that take place in bones as a person ages. Check all that apply.a. Adults have fewer bones because many bones fuse through the years.b. At birth there are about 270 bones, but fewer bones form during childhoodc. The adult pelvis is a single hip bone, which results from the fusion of three childhood bones.d. The fusion of several bones, completed by late adolescence to the mid-20s, brings about the average adult number of 206. a state's license plates consist of 4 letters followed by 5 digits. how many possible license plates can be issued using this condition? explain your understanding of energy flow in an ecosystem links to an external site.. give relevant examples. 1. which of the following is not intended to demonstrate that emily is knowledgeable about her topic: a. emily draws on information from diverse sources. b. emily asks the audience questions. c. emily offers quotes from reputable organizations. d. emily shares her first-hand experience. COFFEE A national coffee chain makes and serves 4 billion cups of coffee in a year. If the average cup of coffee costs $3.15, how much money does the coffee chain make in a year? Write your answer in scientific notation. 2)what are few of the reasons that the developer william zeckendorf, jr., in the film skyscraper, considered the world wide plaza for development? in the binomial name for the common fruit fly, drosophila melanogaster, which two taxonomic levels are provided in the name? now fit a logistic model with a single explanatory variable mcat scores. why is the null deviance the same as that from part a.? the task that an individual can accomplish only with the assistance of a more advanced other represents the learner's: based solely on statistical probability from demographic studies, which individual has the greatest likelihood of being a smoker? a chief security officer is looking for a solution that can provide increased scalability and flexibility for back end infrastructure, allowing it to be updated and modified without disruption to services. the security architect would like the solution selected to reduce the back end server resources and has highlighted that session persistence is not important for the applications running on the back end servers. which of the following would best meet the requirements? a.Reverse proxyb.Automated patch managementc.Snapshotsd.NIC teaming an informatics nurse is preparing a training program for staff nurses in the facility. the facility will be implementing a new electronic health record. to ensure the best results, which type of training would the informatics nurse most likely use? who are the two philosophers who, in the post-war era, played a crucial role in bringing heidegger's philosophy to international recognition? all other things unchanged, an increase in loanable funds demand would most likely be caused by a(n): which of the following would ordinarily be classified as current assets on the balance sheet? note: select all that apply. check all that apply accounts receivable accounts receivable accounts payable accounts payable cash cash