Design a pseudo code that determines if a given number is even or odd number

Answers

Answer 1
0. Start
1. Print "Enter Any Number to Check, Even or Odd"
2. Read input of a number
3. If number mod = 0
4. Print "Number is Even"
5. Else
6. Print "Number is Odd"
7. End
Answer 2

The pseudocode determines if a given number is even or odd by checking if it's divisible by 2 and then prints the respective result.

Here's a simple pseudocode to determine if a given number is even or odd:

Input: number

Output: "Even" if the number is even, "Odd" if the number is odd

if number is divisible by 2 with no remainder then

   Print "Even"

else

   Print "Odd"

end if

This pseudocode checks whether the given number is divisible by 2. If it is, it prints "Even" since even numbers are divisible by 2. Otherwise, it prints "Odd" since odd numbers are not divisible by 2.

Learn more about pseudocode here:

https://brainly.com/question/17102236

#SPJ7


Related Questions

How many types of Robots are there ?

Can you please Write them down.​

Answers

Answer:

There are 6.

Explanation:

1) Polar

2) Delta

3) Cartesian

4) SCARA

5) Cylindrical

6) Vertically articulated

The most common types of robots are

-Autonomous mobile robots (AMRs)

-Automated guided vehicles (AGVs)

-Robotic arms

-Humanoid robots

-Hybrids

-Cobots

Hope this helps :)

What are three ways that clouds affect climate?
Explain your answer in science

Answers

The influencing clouds They allow solar radiation to be filtered and contribute to the refraction of infrared radiation towards the Earth's surface, thus contributing to the global increase in temperature

What are the three types of clouds?

Based on appearance, three types are distinguished: cirrus, cumulus and stratus. Cirrus are tall, white, wispy, fibrous clouds. Stratus are layers that cover most or all of the sky. Cumulus are individual globular masses of clouds, with the appearance of raised domes.

The different types of clouds are determined by altitude and appearance. Clouds are made up of water droplets, ice crystals and condensation nuclei. They are classified according to altitude and appearance. Clouds are clusters of water droplets and small ice crystals suspended in the air.

See more about clouds at brainly.com/question/18370044

#SPJ1

three classifications of operating system​

Answers

Answer:

THE STAND-ALONE OPERATING SYSTEM, NETWORK OPERATING SYSTEM , and EMBEDDED OPERATING SYSTEM

Which of the following best describes how computing devices represent information? A. A computer will either represent information as bits or bytes but not both B. A computer represents data as a byte which is either a 0 or a 1 C. A computer represents data as bits which is either a 0 or a 1 D. A computer represents information as bits which contain 8 bytes.

Answers

Answer:

The Answer is B

Explanation:

The reason the answer is B is because "bytes" are the correct form of storing memory in 0's and 1's.

Using concepts of data representation in a computer, it is found that the correct option is:

C. A computer represents data as bits which is either a 0 or a 1.

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

In computer science, it is a common saying that "everything inside a computer is either a 0 or 1".The unit of measure that only has 0s and 1s is bits.If we load a file, either text or image, all the values at each position on the file are composed by 0's and 1's, for example.Thus, option C is correct.

A similar problem is given at https://brainly.com/question/17399642

Create a program that will compute the voltage drop across each resistor in a series circuit consisting of three resistors. The user is to input the value of each resistor and the applied circuit voltage. The mathematical relationships are 1. Rt- R1 R2 + R3 It Vs/Rt Where Rt -Total circuit resistance in ohms R1,R2,R3 Value of each resistor in ohms It - Total circuit current in amps Vs -Applied circuit voltage Vn- Voltage drop across an individual resistor n (n-1, 2 or 3) in volts Rn-R1,R2, or R3
Use the values of 5000 for R1, 3000 for R2,2000 for R3, and 12 for Vs. The output of the program should be an appropriate title which identifies the program and include your name. All values should be accompanied by appropriate messages identifying each. Submit a printout of your program and the printed output to your instructor

Answers

Answer:

The program in Python is as follows:

R1 = int(input("R1: "))

R2 = int(input("R2: "))

R3 = int(input("R3: "))

   

Rt = R1 + R2 + R3

Vs = int(input("Circuit Voltage: "))

It = Vs/Rt

V1= It * R1

V2= It * R2

V3= It * R3

print("The voltage drop across R1 is: ",V1)

print("The voltage drop across R2 is: ",V2)

print("The voltage drop across R3 is: ",V3)  

Explanation:

The next three lines get the value of each resistor

R1 = int(input("R1: "))

R2 = int(input("R2: "))

R3 = int(input("R3: "))

This calculates the total resistance    

Rt = R1 + R2 + R3

This prompts the user for Circuit voltage

Vs = int(input("Circuit Voltage: "))

This calculates the total circuit voltage

It = Vs/Rt

The next three line calculate the voltage drop for each resistor

V1= It * R1

V2= It * R2

V3= It * R3

The next three line print the voltage drop for each resistor

print("The voltage drop across R1 is: ",V1)

print("The voltage drop across R2 is: ",V2)

print("The voltage drop across R3 is: ",V3)

3. A file has 250 pages, each page contains 50 lines. Each line can be represented by
9 bits. Your network can download the whole file within 50 seconds. What is the
bit rate for your network?
(6 Points)​

Answers

Answer:

2,250b/s

Explanation:

50*250=12,500 (Lines in total)

12,500*9=112,500 (Bits in total)

12,500/50=2,250 (Bits per second)

Read three integers from user input without a prompt. Then, print the product of those integers. Ex: If input is 2 3 5, output is 30. Note: Our system will run your program several times, automatically providing different input values each time, to ensure your program works for any input values. See How to Use zyBooks for info on how our automated program grader works.

Answers

Answer:

Explanation:

The following code is written in Java and simply grabs the three inputs and saves them into three separate variables. Then it multiplies those variables together and saves the product in a variable called product. Finally, printing out the value of product to the screen.

import java.util.Scanner;

public class Main{

   public static void main(String[] args){

       Scanner in = new Scanner(System.in);

       int num1 = in.nextInt();

       int num2 = in.nextInt();

       int num3 = in.nextInt();

       int product = num1 * num2 * num3;

       System.out.println(product);

   }

}

Answer: Python

Explanation:

num1 = int(input())

num2 = int(input())

num3 = int(input())

product = num1 * num2 * num3

print(product)

who is known as father of computer​

Answers

Charles Babbage KH FRS was an English polymath. A mathematician, philosopher, inventor and mechanical engineer, Babbage originated the concept of a digital programmable computer. Babbage is considered by some to be "father of the computer"

You turn on your Windows computer and see the system display POST messages. Then the screen goes blank with no text. Which of the following items could be the source of the problem?
1. The video card
2. The monitor
3. Windows
4. Microsoft word software installed on the system.

Answers

Answer:1)The video card
***HOPE THIS HELP YOU***

the computer that process data that are represented in the form of discrete values are called​

Answers

Answer:

Digital computer

Explanation:

The computer that process data that are represented in the form of discrete values are called digital computer.

I am doing a customer service manual and need a toc. I can't get the numbers lined up. Can someone please help me? I am using Microsoft word

I am doing a customer service manual and need a toc. I can't get the numbers lined up. Can someone please

Answers

Below is a Table of Contents (TOC) for your customer service manual with aligned numbers using Microsoft Word:

Welcome StatementGetting StartedWays to Discern Customers' Needs and ConcernsTelephone Communication4.1 Transferring a Customer's Call4.2 Sending an EmailSelf-Care After the JobHow to Manage Your Time WiselyFundamental Duties of a Customer Service WorkerEnhancing Customer Impressions and SatisfactionDifference Between Verbal and Nonverbal CommunicationKey TraitsBest Speaking SpeedKnowing the Different Problems and How to Manage Them12.1 Extraordinary Customer Problems12.2 Fixing Extraordinary Customer ProblemsKnowing Customer Diversity13.1 Tactics for Serving Diverse and Multicultural CustomersKnowing How to Handle Challenging Customers

What is the customer service manual?

Below is how you can create a Table of Contents (TOC) with aligned numbers in Microsoft Word:

Step 1: Place your cursor at the beginning of the document where you want to insert the Table of Contents.

Step 2: Go to the "References" tab in the Microsoft Word ribbon at the top of the window.

Step 3: Click on the "Table of Contents" button, which is located in the "Table of Contents" group. This will open a drop-down menu with different options for TOC styles.

Step 4: Choose the TOC style that best fits your needs. If you want aligned numbers, select a style that includes the word "Classic" in its name, such as "Classic," "Classic Word," or "Classic Format." These styles come with aligned numbers by default.

Step 5: Click on the TOC style to insert it into your document. The TOC will be automatically generated based on the headings in your document, with numbers aligned on the right side of the page.

Step 6: If you want to update the TOC later, simply right-click on the TOC and choose "Update Field" from the context menu. This will refresh the TOC to reflect any changes you made to your headings.

Note: If you're using a different version of Microsoft Word or a different word processing software, the steps and options may vary slightly. However, the general process should be similar in most word processing software that supports the creation of TOCs.

Read more about customer service here:

https://brainly.com/question/1286522

#SPJ1

See text below

I am doing a customer service manual and need a toc. I can't get the numbers lined up. Can someone please help me? I am using Microsoft word

Welcome Statement

Getting Started

Ways to discern customers' needs and concerns

Telephone communication....

Transferring a customer's call

Sending an email

Self-Care after the job

How to manage your time wisely

Fundamental duties of a Customer Service Worker

Enhancing Customer Impressions and Satisfaction

N

5

.5

6

Difference between Verbal and Nonverbal Communication

.6

Key Traits.....

.7

Best speaking speed

7

Knowing the different problems and how to manage them

Extraordinary Customer Problems

Fixing Extraordinary Customer Problems

Knowing Customer Diversity

Tactics for serving diverse and Multicultural customers

Knowing how to handle challenging customers.

Sure! Here's a Table of Contents (TOC) for your cu

A student is creating a school newspaper.
The space at the top where the student puts the title is the blank

Answers

The space at the top where the student puts the title is the known to be title bar.

What is title bar Bar?

The title bar is known to be a kind of an horizontal bar that is known to be found at the very top of a window in a  MS word or GUI.

Note that this is said to be a bar that tends to show or displays the title of the said document or software, as well as the name of the current  file, or other text that tells about the contents of that window.

Therefore,  one can say that the space at the top where the student puts the title is the known to be title bar.

Learn more about title bar from

https://brainly.com/question/20380901
#SPJ1

Question 1 of 4
OSHA requires which of the following trenches to have a protective system installed?
Select the best option.
O
A trench 1 foot deep.
A trench 3 feet deep.
A trench 14 feet deep.

Answers

Answer:

These are all wrong. OSHA requires a trench to have a protective system starting at 5 feet.

Explanation:

OSHA's own rules state this, unless it is in stable rock. If it is under 5 feet, it isn't required and can be decided by someone qualified.

A trench 14 feet deep would definitely require a protective system, due to the the minimum being 5 feet.

Following Aristotle,man by nature is a political animal,justify the above claim in the light of the Russian invasion of Ukraine

Answers

Following Aristotle, man by nature is a political animal using the claim in the light of the Russian invasion of Ukraine is that:

Aristotle stated that State is natural due to the fact that nature has not made man to be in a self-sufficient state. But Man has a lot of -different type of needs  which they want them to be fulfilled. Russian need and Ukraine need differs and as such, man is fighting to satisfy their needs.

What is the quote about?

In his Politics, Aristotle was  known to be a man who believed man to be a "political animal" due to the fact that he is a social creature that is said to have the power of speech and also one that has moral reasoning:

He sate that man is a lover of war and as such, Aristotle stated that State is natural due to the fact that nature has not made man to be in a self-sufficient state. But Man has a lot of -different type of needs  which they want them to be fulfilled. Russian need and Ukraine need differs and as such, man is fighting to satisfy their needs.

Learn more about Aristotle from

https://brainly.com/question/24994054

#SPJ1

write a statement that assigns middleinitial with the character t

Answers

MiddleInitial is a variable that has been assigned a character value such as 'T' or 't' . It can be used to store the middle initial of a person's name.

middleinitial = 't'; .

MiddleInitial is a variable that can be used to store the middle initial of a person's name. It is typically a character variable and can be used in various ways depending on the specific application.

For example, middleInitial might be used as a part of a larger data structure that stores personal information, such as a person's name, address, and phone number. This information can then be used in a program to generate a mailing label or to search for a specific person in a database.

Another way middleInitial might be used is in a program that takes user input and performs validation checks on it. For example, a program that prompts a user to enter their name might check that the middle initial entered is a single uppercase letter before proceeding.

It's important to note that the exact behavior of middleInitial in a program will depend on how it is used and where it is used. And also it's value is not predetermined, it's value will be assigned by the user or the programmer.

Learn more about middleInitial here:

https://brainly.com/question/14283266

#SPJ4

EMERGENCY- I am giving 55 points for this, please help. WITH working out
What would be the size of a sound file, which is 30 seconds in length and has a bitrate of 96kbps? You must show your working out.

Answers

Answer:

360 kilobytes

Explanation:

(Time × Bitrate) / 8

30 × 96 = 2880 / 8

360 kilobytes

8: kilobits in a kilobyte

Time is always in seconds to obey the kb*ps* rule

Bitrate is always on bits so thats kilobits not kilobytes purpose of conversion

A CPU scheduler that assigns higher priority to the I/O-bound processes than the CPU-bound processes causes:

Answers

Answer:

Low CPU utilization and high I/O utilization

Explanation:

Barbarlee suspected and found a loophole in the university computer's security system that allowed her to access other students' records. She told the system administrator about the loophole, but continued to access others' records until the problem was corrected 2 weeks later. Was her actions unethical or not. Explain your position? What should be the suggested system administrators response to Barbarlee's actions? How should the university respond to this scenario?​

Answers

Answer:

Explanation:

I can give you my opinion on the matter, not sure if this was taught to you or not so please take it with a grain of salt.

Her actions are highly unethical and even illegal to some extent. Especially in USA, FERPA prevents random people from accessing your educational records without your permission and there's hundreds of universities with their own rules/regulations on protecting students' privacy. The sys admin should have first recorded this event when she reported it and then actually went into the system to see if unwanted access has been done by any user(s). University should look at disciplinary actions since the person willingly accessed the system even after they reported the bug and also let ALL the university student/faculty/staff know of the problem and how they plan on fixing it.

This is only a summary, and this is my opinion. please expand in places where needed.

I found another answer in go.ogle:

I feel the actions of this person were unethical.

The student's action in searching for the loophole was neither definitively ethical nor unethical, as their motives are unclear.

The student's action in continuing to access records for two weeks was unethical, as this is a violation of privacy.

The system admin's failure to correct the problem could be considered unethical, but it is difficult to surmise, as there are not enough details.

Consider a model of a drone to deliver the orders of the customers within the range of 20 km of the coverage area.

Identified at least 5 factors (inputs) required to experiment with the above mention system model (e.g. speed of the drone).


Write down the levels (range or setting) for each factor mentioned above. (e.g. speed ranges from 10km/h to 30km/h).


On what responses (results) will you analyses the experiment’s success or failure (e.g. drone failed to deliver the package on time), mention at least 3 responses

Answers

Answer:

Explanation:

suna shahani kesa a ..

Suppose point W,X and Y represent three vertices of rectangle WXYZ. Where should point Z be plotted?

Answers

If W, X and Y are the vertices of a rectangle, we can conveniently ascertain where vertex Z lies via the properties of rectangles.

What are Rectangles?

Rectangles encompass two pairs of parallel lines, thus line segment WX is alike in parallelism to line segment YZ and similarly, the line segment WY accords with line segment XZ parallelism.

We may rapidly uncover the coordinates of point Z, by extending the line segments WX and YZ until they concur at an intersection point, which is absolutely vertex Z's location as well.

Moreover, if preferred, we could utilize the midpoint formula so as to determine the midpoint of line segment WY, followed by discovering the point that concurrently stands equidistant from that midpoint and point X; it would yield the same end result, for this point shall prove to be the place of vertex Z.

Read more about triangles here:

https://brainly.com/question/1058720

#SPJ1

You are part of a sales group that has been asked to give a presentation.
Before you begin, what should you and your group do?
O A. Figure out who is the best public speaker.
O B. Look into file-sharing options so that everyone can work on the
same file at the same time.
OC. Buy the best software on the market.
O D. Ask if you have to give a slide presentation.

Answers

The answer is the 2 one becuase I took the test

Business letter in block style

Business letter in block style

Answers

The format for the Business letter in block style is given below

What is Business letter?

[Your Name]

[Your Position]

[Your Company Name]

[Company Address]

[City, State ZIP Code]

[Date]

[Recipient's Name]

[Recipient's Position]

[Recipient's Company Name]

[Company Address]

[City, State ZIP Code]

Dear [Recipient's Name],

[Opening Paragraph: Introduce yourself and the purpose of the letter]

[Body Paragraphs: Provide relevant details, explanations, or information related to the purpose of the letter. Use separate paragraphs for each topic, and ensure that the content is clear, concise, and organized.]

[Closing Paragraph: Summarize the main points and express any additional actions or follow-ups. Offer your availability for further discussion or assistance.]

[Closing: Use a polite and professional tone, and end the letter with a courteous closing, such as "Sincerely," or "Best regards," followed by your typed name and signature.]

Sincerely,

[Your Name]

[Your Position]

[Your Company Name]

Read more about Business letter here:

#SPJ1

Hello I take computer science and i just wanted to know if somone could do this and explain to me how. thank you!

(100 points)

Hello I take computer science and i just wanted to know if somone could do this and explain to me how.

Answers

Answer:

We are provided with three sets of assembly language instructions, and for each set, we need to understand the order in which memory addresses and contents are accessed.

Diagram A:

LDD 106

This instruction means "Load Direct to the accumulator from address 106." The accumulator is a special register in the processor used to hold data for arithmetic or logical operations. In this case, the value stored at memory address 106 (which is 114) will be loaded into the accumulator.

Diagram B:

LDI 104

This instruction means "Load Indirect to the index register from address 104." The index register is another special register in the processor, typically used for memory addressing calculations. Here, the value stored at memory address 104 (which is 100) will be loaded into the index register.

Diagram C:

LDR #3

This instruction means "Load immediate value 3 into the accumulator." Instead of accessing memory, this instruction loads an immediate value (in this case, 3) directly into the accumulator.

LDX 101

This instruction means "Load Direct to the index register from address 101." The value stored at memory address 101 (which is 104) will be loaded into the index register.

To summarize, each diagram represents a different set of assembly language instructions, and the memory addresses and contents accessed are as follows:

Diagram A:

Address 106: Content 114 (loaded into the accumulator)

Diagram B:

Address 104: Content 100 (loaded into the index register)

Diagram C:

No memory address accessed for LDR #3 (immediate value 3 loaded into the accumulator)

Address 101: Content 104 (loaded into the index register)

I hope my explanation has made it easier for you to comprehend these assembly language instructions and the memory accesses they need.

I really need help with CSC 137 ASAP!!! but it's Due: Wednesday, April 12, 2023, 12:00 AM

Questions for chapter 8: EX8.1, EX8.4, EX8.6, EX8.7, EX8.8

I really need help with CSC 137 ASAP!!! but it's Due: Wednesday, April 12, 2023, 12:00 AMQuestions for
I really need help with CSC 137 ASAP!!! but it's Due: Wednesday, April 12, 2023, 12:00 AMQuestions for
I really need help with CSC 137 ASAP!!! but it's Due: Wednesday, April 12, 2023, 12:00 AMQuestions for

Answers

The response to the following prompts on programming in relation to array objects and codes are given below.

What is the solution to the above prompts?

A)

Valid declarations that instantiate an array object are:

boolean completed[J] = {true, true, false, false};

This declaration creates a boolean array named "completed" of length 4 with initial values {true, true, false, false}.

int powersOfTwo[] = {1, 2, 4, 8, 16, 32, 64, 128};

This declaration creates an integer array named "powersOfTwo" of length 8 with initial values {1, 2, 4, 8, 16, 32, 64, 128}.

char[] vowels = new char[5];

This declaration creates a character array named "vowels" of length 5 with default initial values (null for char).

float[] tLength = new float[100];

This declaration creates a float array named "tLength" of length 100 with default initial values (0.0f for float).

String[] names = new String[]{"Sam", "Frodo", "Merry"};

This declaration creates a String array named "names" of length 3 with initial values {"Sam", "Frodo", "Merry"}.

char[] vowels = {'a', 'e', 'i', 'o', 'u'};

This declaration creates a character array named "vowels" of length 5 with initial values {'a', 'e', 'i', 'o', 'u'}.

double[] standardDeviation = new double[1];

This declaration creates a double array named "standardDeviation" of length 1 with default initial value (0.0 for double).

In summary, arrays are objects in Java that store a fixed-size sequential collection of elements of the same type. The syntax for creating an array includes the type of the elements, the name of the array, and the number of elements to be stored in the array. An array can be initialized using curly braces ({}) to specify the initial values of the elements.


B) The problem with the code is that the loop condition in the for loop is incorrect. The index should start from 0 instead of 1, and the loop should run until index < masses.length instead of masses.length + 1. Also, the totalMass should be incremented by masses[index], not assigned to it.

Corrected code:
double[] masses = {123.6, 34.2, 765.87, 987.43, 90, 321, 5};

double totalMass = 0;

for (int index = 0; index < masses.length; index++) {

   totalMass += masses[index];

}


The modifications made here are to correct the starting index of the loop, fix the loop condition, and increment the totalMass variable correctly.


C)

1)
Code to set each element of an array called nums to the value of the constant INITIAL:

const int INITIAL = 10; // or any other desired initial value

int nums[5]; // assuming nums is an array of size 5

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

   nums[i] = INITIAL;

}


2) Code to print the values stored in an array called names backwards:
string names[4] = {"John", "Jane", "Bob", "Alice"}; // assuming names is an array of size 4

for (int i = 3; i >= 0; i--) {

   cout << names[i] << " ".

}



3) Code to set each element of a boolean array called flags to alternating values (true at index 0, false at index 1, true at index 2, etc.):

bool flags[6]; // assuming flags is an array of size 6

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

   flags[i] = (i % 2 == 0);

}


Learn more about array objects at:

https://brainly.com/question/16968729

#SPJ1

Print "user_num1 is negative." if user_num1 is less than 0. End with newline.
Assign user_num2 with 3 if user_num2 is greater than 8. Otherwise, print "user_num2 is less than or equal to 8.". End with newline. I put:
user_num1 = int(input())
user_num2 = int(input())

if user_num1 < 0:
print ('user_num1 is negative.')
if (user_num2 > 8) or (user_num2 < 3):
print('user_num2 is less than or equal to 8.')

else:
print('user_num2 is', user_num2)
But I can not get an output. I have tried it different ways and get the same results. What am I doing wrong?

Answers

There are a few mistakes in the code:

The if statement that prints "user_num1 is negative." is not indented properly. It should be indented under the if statement.The if statement that prints "user_num2 is less than or equal to 8." is not indented properly. It should be indented under the else statement.In the if statement, the conditions to check the value of user_num2 is incorrect. It should be if user_num2 <= 8.

What is Debugging?

This refers to the systematic process of searching for where an error or errors are found in a program or code.

The corrected code would be:

user_num1 = int(input())

user_num2 = int(input())

if user_num1 < 0:

 print ('user_num1 is negative.')

if user_num2 <= 8:

 print('user_num2 is less than or equal to 8.')

else:

print('user_num2 is', user_num2)

Read more about debugging here:

https://brainly.com/question/28159811

#SPJ1

You are creating a presentation for your school Photography project and you want to make the pictures stand out. Which tool would be most efficient to use to enhance the images?
A. Symbols
B. Alt text
C. Tables
D. Picture styles

Answers

Answer:

D

Explanation:

I say D would be the answer because the other ones don’t make sense

A ______ can hold a sequence of characters such as a name.

Answers

A string can hold a sequence of characters, such as a name.

What is a string?

A string is frequently implemented as an array data structure of bytes (or words) that records a sequence of elements, typically characters, using some character encoding. A string is typically thought of as a data type. Data types that are character strings are the most popular.

Any string of letters, numerals, punctuation, and other recognized characters can be stored in them. Mailing addresses, names, and descriptions are examples of common character strings.

Therefore, a string is capable of storing a group of characters, such as a name.

To learn more about string, refer to the link:

https://brainly.com/question/17091706

#SPJ9

Why might a variable used for output have to be of a different type then a variable used for input?​

Answers

Answer:

You may use a different variable type for input in order to process the data appropriately and may use a different variable type to accommodate your program.

Explanation:

Your input may have to be different then output varying on what data you are processing.

For example, just like the last question you asked about calculating the area of the rectangle, your input MUST be converted to a different a numerical data type (i.e int or float) in order to do the math.

Based on your last question, if we didn't convert your input into a string your results wouldn't add the numbers together but only concatenate them. If I typed 3 & 5 as length & width, I would get 35 instead of 15.

Now another example is using functions (or methods whatever you want to call them), your input can be one thing and outputs another.

Let's say I want a function to tell me if I am smart. The way I want it to determine if its smart is by inputting my GPA into it, which is a numerical value. So the function would look something like this:

Code (Python)

def IsSmart(gpa):

  if (gpa >= 4):

       return True

  else

       return False

As you can see I am inputting a numerical value and it is outputting a boolean value. I can use this in a if else chain to spit out an output to the user.

The code below assigns the 5th letter of each word in food to the new list fifth. However, the code currently produces errors. Insert a try/except clause that will allow the code to run and produce of list of the 5th letter in each word. If the word is not long enough, it should not print anything out. Note: The pass statement is a null operation; nothing will happen when it executes.
food = ["chocolate", "chicken", "corn
fifth = []
for x in food:
fifth.append(x[4])

Answers

Answer:

Answered below

Explanation:

foods = ["chocolate", "chicken", "corn"]

fifth_char = []

for food in foods:

"""Add a try statement to add fifth character to fifth_char list. If word is not long enough, the except part executes the the pass and nothing is printed.""'

try:

fifth_char.append(food[4])

except:

pass

#print out elements in new list

for c in fifth_char:

print(c)

Enter an IFS statement to provide the certification grade based upon score (use the<=in your formula) include the IFERROR message as a error catch

Answers

Answer:

=IFERROR(IF(score<=100,"A",IF(score<=90,"B",IF(score<=80,"C",IF(score<=70,"D",IF(score<=60,"F","Invalid"))))),"Invalid")

Other Questions
tolerance is an allowance made for imperfections in a manufactured object. the manufacturer of an oven specifies a temperature tolerance of 15f. this means that the temperature inside the oven will be within 15f of the temperature to which it is set. write an absolute value equation to find the maximum and minimum temperatures inside the oven when the thermostat is set to 400f. let t represent the temperature inside the oven. A zoologist needs to dive into the shark exhibit to supervise its cleaning. The depth of the water in the exhibit is 40 feet, and the divers can safely descend at a rate of 2 feet per minute. Which number expresses how deep below the water the divers are after 15 minutes? 30 feet 15 feet 40 feet 2 feet How did the establishment of the people's republic of china (prc) impact the democratic party in the united states? Templeton's common stock currently sells for $41 per share. Its last dividend was $1.8 and is expected to grow at a constant rate of 6.5%. If the firm's beta is 1.29, the risk-free rate is 4% and the market premium is 6.5%, what will be the firm's cost of common equity using the CAPM approach? does total runoff occur over a longer or shorter time span after an area has been urbanized? runoff occurs over a time after urbanization (i) Find the number of distinct words that can be made up using all the letters from the word EXAMINATION (ii) How many words can be made when AA must not occur?(b) Sketch the following graphs for -pi < theta < pi (i) y = 3 cos theta (ii) y = sin 3 theta Find an expression which represents the sum of (-9x+3y) and (-3+5y) in simplest terms Hydrothermal vents that support biological communities exist because of primary productivity in the form of chemosynthesis. (True or False) a(n) _____ is a commitment with certain terms made to another party. the aggregate demand curve indicates a(n) relationship between the price level and the quantity demanded of real gdp; suppose you perform an eas reaction using 3.05 grams of isopropyl benzene, sodium iodide (1.2 equivalents) ethanol (in excess) and bleach (in excess). after purification, a di-substituted aromatic compound was recovered. calculate the theoretical yield of the expected product. type answer: adults 1841 years old represent mcdonald's ________ for the campaign. 10 The scatterplot shows the number of people in each of 8 different households and the average amount of money each household spent on groceries. Weekly Grocery Expenses y A v e r a g eA mountS p u n t o nG g r o c e r i e s( d o l l a r s )320 280 240 200 160 120 80 40 Number of People in Household x 0 2 4 6 8 Based on the scatterplot, what is the best prediction of the average amount of money spent on groceries for a household that has 7 people a patient has been diagnosed with a vaginal infection and received a prescription for metronidazole (flagyl). the nurse knows that this is the recommended treatment for a vaginal infection caused by what organism? when isolation between the production and marketing departments is so great that production does not get appropriate feedback, it is an example of a(n) blank . multiple choice question. disadvantage to departmentalization advantage to a narrow span of control disadvantage to a broad span of control disadvantage to centralized authority disadvantage to decentralized authority The table shows the number of hours spent studying for a history final exam and the score on that exam. Each row represents a single student. Which value is an outlier in the table below?Exam ScoresNumber of hours spent studying, xExam score(out of 100), y1.5652683.5714.5984.5826846.588785780(1.5, 65)(3.5, 71)(4.5, 98)(6.5, 88) Simplify completely: 3(4 9) + 6 2(8 + 5) (1 point) You've observed the following returns on Crash -n-Burn Computer's stock over the past five years : 3 percent , -9 percent , 29 percent , 18 percent , and 15 percent . What was the arithmetic average return on the company's stock over this five - year period? Many trig equations have an infinite number of solutions (ie an infinite number of angles that satisfy the equation). An example to consider is the equation sin = 1/2. Choose an equation that corresponds to f()=cos that also has an infinite number of solutions.a) What are the solutions?b) How can you locate all of them?c) Make connections to angles in standard position, as well as to graphical representations of trig functions. What is the description of elastic cartilage?