Question

In: Computer Science

Python: Using Jupyter Notebook 1. Write code to generate Fibonacci series. Fibonacci numbers – 1, 1,...

Python: Using Jupyter Notebook

1. Write code to generate Fibonacci series.

Fibonacci numbers – 1, 1, 2, 3, 5, 8, …

2. Check if a number is an Armstrong number

A positive integer is called an Armstrong number of order n if

abcd... = a^n + b^n + c^n + d^n + ...

In case of an Armstrong number of 3 digits, the sum of cubes of each digits is equal to the number itself. For example:

153 = 1*1*1 + 5*5*5 + 3*3*3 // 153 is an Armstrong number.

3. define and use a function that determines the area of a triangle given the height and the base

4. For the following array

A = [[1, 4, 5, 12],
[-5, 8, 9, 0],
[-6, 7, 11, 19]]

Calculate the row sums and column sums

Solutions

Expert Solution

1 ans:

2 ans:

3 ans:

4 ans:

#if you have any doubt or more information needed comment below..i will respond as possible as soon..thanks...


Related Solutions

Python HW Open a new Jupyter notebook Create a new function named fibonacci() that takes one...
Python HW Open a new Jupyter notebook Create a new function named fibonacci() that takes one required parameter: maxint, an integer that will serve as the upper bound of the loop Following the example on the Python tutorial: https://docs.python.org/3/tutorial/introduction.html#first-steps-towards-programming Our implementation will have a few changes: While you will use a while loop to make a Fibonacci sequence, the upper bound of the sequence will be your maxint parameter. Store the results into a list and append each new generated...
Focuses on the design, development, implementation, and testing of a Python program using Jupyter Notebook only...
Focuses on the design, development, implementation, and testing of a Python program using Jupyter Notebook only to solve the problem described below. You will write a program that simulates an Automatic Teller Machine (ATM). For this program, your code can have of user-defined functions only. However, the program must not call on any external functions or modules to handle any of the input, computational, and output requirements. Note, the program can be completed without the use of user-defined functions. Requirements:...
Create a new Python 3 Jupyter Notebook. At the top, be sure to name your notebook...
Create a new Python 3 Jupyter Notebook. At the top, be sure to name your notebook as "*assignment 2.08 - Your Name Here.ipynb*" (obviously, replace the "Your Name Here" part with your actual name). Create a single python cell to program the following specifications. Use what you've learned on this page to: 1. Find the index of "lmno" in the English alphabet using an appropriate instruction and store it in a variable. (hint: you'll need to define a string that...
Write a program IN PYTHON of the JUPYTER NOOTBOOK that keeps getting a set of numbers...
Write a program IN PYTHON of the JUPYTER NOOTBOOK that keeps getting a set of numbers from user until the user enters "done". Then shows the count, total, and average of the entered numbers. This should the answer when finished Enter a number: 55 Enter a number: 90 Enter a number: 12 Enter a number: done You entered 3 numbers, total is 157, average is 52.33333
Machine Learning do using python on jupyter notebook 1. Linear Regression Dataset used: Diabetes from sklearn...
Machine Learning do using python on jupyter notebook 1. Linear Regression Dataset used: Diabetes from sklearn You are asked to solve a regression problem in the Diabetes dataset. Please review the Diabetes dataset used before creating a program to decide which attributes will be used in the regression process. please use the cross-validation step to produce the best evaluation of the model. All you have to do is • Perform linear regression using the OLS (Ordinary Least Square) method (sklearn.linear_model.LinearRegression)...
please solve using jupyter notebook . 10.9- (Square Class) Write a class that implements a Square...
please solve using jupyter notebook . 10.9- (Square Class) Write a class that implements a Square shape. The class should contain a side property. Provide an __init__ method that takes the side length as an argument. Also, provide the following read-only properties: a) perimeter returns 4 × side. b) area returns side × side. c) diagonal returns the square root of the expression (2 × side2). The perimeter, area and diagonal should not have corresponding data attributes; rather, they should...
"PYTHON" Write some code " USING PYTHON" to keep reading numbers from the user until the...
"PYTHON" Write some code " USING PYTHON" to keep reading numbers from the user until the users enters a negative number. The program then prints out: a) the sum of all the numbers b) the average of all the numbers c) the max of the numbers d) the min of the numbers Note we did not cover lists (array) so you will not use them in this problem. Finally, ask the user for their name, then print their name as...
Write a program IN PYTHON of the JUPYTER NOOTBOOK Write a Python program that gets a...
Write a program IN PYTHON of the JUPYTER NOOTBOOK Write a Python program that gets a numeric grade (on a scale of 0-100) from the user and convert it to a letter grade based on the following table. A: 90% - 100% B 80% - 89% C 70% - 79% D 60% - 69% F <60% The program should be written so that if the user entered either a non-numeric input or a numeric input out of the 0-100 range,...
Part 1: Write a recursive function that will calculate Fibonacci numbers using a recursive definition. Write...
Part 1: Write a recursive function that will calculate Fibonacci numbers using a recursive definition. Write a short program to test it. The input of this program must be a positive integer n; the output is the corresponding Fibonacci number F(n) Part 2: Write an iterative function to calculate Fibonacci numbers. Write a test driver for it. The input of this program must be a positive integer n; the output is the corresponding Fibonacci number F(n). Part 3: Write a...
Q1:Write a Java program to find Fibonacci Series using 1) using for loop 2) using while...
Q1:Write a Java program to find Fibonacci Series using 1) using for loop 2) using while loop To Understand what the Fibonacci series is: The Fibonacci sequence is a series of numbers where a number is the sum of the previous two numbers. Starting with 0 and 1, the sequence goes 0, 1, 1, 2, 3, 5, 8, 13, 21, and so on. Q2: Write a Java program to find the Factorial of a number using a while loop. To...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT