Lab 1 (Jan 16_19) - COMP-1001-001_002_003_056 (Intro to Programming & Laboratory)
.pdf
keyboard_arrow_up
School
Memorial University of Newfoundland *
*We aren’t endorsed by this school
Course
1001
Subject
Computer Science
Date
Apr 3, 2024
Type
Pages
9
Uploaded by rami_h
4/1/24, 8:22 AM
Computer Science 1001 - Lab 1
https://online.mun.ca/d2l/le/content/567611/viewContent/5087522/View
1/9
Computer Science 1001 - Lab 1
Chapter 2
Practice working with assignment statements and numeric data types
Practice working with string data types
Learn to use the turtle to draw geometric figures (optional)
In order to answer each online multiple choice question, click on the down arrow of
the box containing the possible answers and click on the one you think is correct.
When you have answered the questions, click on the Check My Answers
button to
determine how many questions you have answered correctly. The Dismiss Results
button closes the results window. The Reset
button sets all the answers back to the
default values. If the question is a fill-in-the-blank instead of a multiple choice, you
simply have to click in the blank box and type your answer; then click on Check My
Answers
.
If you think an answer to an electronically tested question is incorrect or you are
having trouble with a particular topic, please contact one of the lab assistants for
help.
When checking your answers online, you may click on the Check My Answers
button after you answer each
question or when you have finished answering all the
questions for that section. It does not matter if you get answers wrong or send your
answers many times; the results are not recorded.
When using functions or constants from library modules, make sure you import
them. There are several ways to do this, but the method we will use in this lab is to
import the required functions/constants from the module so that we do not have to
reference the module when calling one or more functions from that module. For
example, to use the sqrt
function from the math
module to find the square root of 9,
we can use:
from math import sqrt
at the beginning of our code, then when we want to use the square root function, we
can simply use sqrt(9)
rather than math.sqrt(9)
. If there are multiple functions or
constants to import, they may be imported on the same line using comma
separation. For example,
from math import sqrt, pi
Readings
Objectives
Notes
Pre-lab Exercises
4/1/24, 8:22 AM
Computer Science 1001 - Lab 1
https://online.mun.ca/d2l/le/content/567611/viewContent/5087522/View
2/9
Create a folder to store your Lab 1 files. Download each of the Python code files, as
needed, and store them in your lab folder for use with each exercise.
Check My Answers
Reset
Dismiss Results
1.
Uninitialized variables.
In Python a variable cannot be accessed without being defined or initialized.
A variable is accessed if its value is used in a statement.
Download the following Python file:
uninitialized.py (click to download)
#Uninitialized variables problem.
f = 10
g *= f
g = 2
g += f
*
5
print
(
g
)
Run the program, correct the errors that you encounter by re-ordering the
statements, then answer the following question:
1.1
What is the output from the program? 2.
Swapping the value of variables.
Download the following Python file:
swapvalues.py (click to download)
#Given two variables with values as shown below in the first two statements, #swap the values in the variables so that quantity holds the int value and #unitCost holds the float value.
quantity = 15.9
unitCost = 10
print
(
"Quantity is:"
,
quantity
)
print
(
"Unit Cost is:"
,
unitCost
)
#Correct the following if you do not agree that this will give you the #correct results. unitCost = quantity
quantity = unitCost
print
(
"Quantity is:"
,
quantity
)
print
(
"Unit Cost is:"
,
unitCost
)
4/1/24, 8:22 AM
Computer Science 1001 - Lab 1
https://online.mun.ca/d2l/le/content/567611/viewContent/5087522/View
3/9
Run the program, correct any errors you encounter and complete the
program according to the comment statements of the program.
Show Solution
3.
Exploring division.
Download the following Python file:
division.py (click to download)
a = 2
b = 14
print
(
"e1:"
,
a
/
2
)
print
(
"e2:"
,
a
//2)
print
(
"e3:"
,(
a + b
)
//2)
print
(
"e4:"
,(
a + b
)/
2
)
print
(
"e5:"
,
a + b
/
2
)
Run the program and answer the questions.
3.1
Give the result of each of the following expressions from the above
program (assume a = 2 and b = 14).
Expression
Result
a/2
a//2
(a + b)//2
(a + b)/2
a + b/2
3.2
Why is e1 different from e2? !
1. e1 uses real division whereas e2 uses integer division
2. e2 uses real division whereas e1 uses integer division
3. after executing e1, the variable a
has changed so e2 produces a
different result
4. there is no difference in the two results
3.3
Why is e3 different from e4? !
4/1/24, 8:22 AM
Computer Science 1001 - Lab 1
https://online.mun.ca/d2l/le/content/567611/viewContent/5087522/View
4/9
Check My Answers
Reset
Dismiss Results
1. e3 uses real division whereas e4 uses integer division
2. e4 uses real division whereas e3 uses integer division
3. after executing e3, the variables a
and b
have changed so e4 produces a
different result
4. there is no difference in the two results
3.4
Why is e4 different from e5? !
1. the parentheses used in e4 change the order of operations so the
division is done before the addition
2. the parentheses used in e4 change the order of operations so the
addition is done before the division
3. after executing e4, the variables a
and b
have changed so e5 produces a
different result
4. there is no difference in the two results
3.5
Is there any difference between a/2 and a/2.0? !
1. no, there is no difference
2. yes, the result in the first expression is an integer whereas the result in
the second expression is a real value
3.6
Is there any difference between 2//4 and 2//4.0? !
1. no, there is no difference
2. yes, the result in the first expression is an integer whereas the result in
the second expression is a truncated real value
4.
Obtaining input data.
Download the following Python file:
statistics.py (click to download)
#This program inputs four integer values and computes and prints the highest
#and lowest of the values. The program also computes the average and #prints all the computed values with appropriate labels.
a = input
(
"Enter the first value: "
)
b = input
(
"Enter the second value: "
)
c = input
(
"Enter the third value: "
)
d = input
(
"Enter the fourth value: "
)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
6:40
Back
Assignment Details
Object Oriented Programming
Student
first_name : string
last_name: string
id: int
gpa : double
major: string
+ set(): void
+ print(): void
Sample Run (User input in bold):
Student Information Database
First Name: Elaine
Last Name: Benes
ID: 1961
GPA: 4.0
Major: French_Literature
First Name: George
Last Name: Costanza
◄ Previous
Submit Assignment
Dashboard Calendar
7
To Do
C
Notifications
LTE 264
Next ►
Inbox
arrow_forward
2. First Even Road
by CodeChum Admin
I've been newly assigned as the city's road planner but this job seems tougher than I thought!
Almost all of the roads in this city are uneven. To fix these, I need to find an even road as a reference. Fortunately, the mayor told me that there's 1 even road somewhere and if I persevere, I could find it.
Could you please help me with this?
Instructions:
Your task is to ask the user for the number of rows and columns of a 2D array.
Then, print the row number of the row where the sum of all of its elements is even.
For this problem, it is guaranteed that there is one and only one such row.
Input
1. Number of rows
2. Number of columns
3. Elements of the 2D array
Output
Note that the row number starts at 0, not 1.
Enter # of rows: 3
Enter # of columns: 3
Enter elements:
2 7 4
1 1 2
0 5 0
Even row: 1
arrow_forward
2. First Even Road
by CodeChum Admin
I've been newly assigned as the city's road planner but this job seems tougher than I thought!
Almost all of the roads in this city are uneven. To fix these, I need to find an even road as a reference. Fortunately, the mayor told me that there's 1 even road somewhere and if I persevere, I could find it.
Could you please help me with this?
Instructions:
Your task is to ask the user for the number of rows and columns of a 2D array.
Then, print the row number of the row where the sum of all of its elements is even.
For this problem, it is guaranteed that there is one and only one such row.
Input
1. Number of rows
2. Number of columns
3. Elements of the 2D array
Output
Note that the row number starts at 0, not 1.
arrow_forward
2. First Even Road
by CodeChum Admin
I've been newly assigned as the city's road planner but this job seems tougher than I thought!
Almost all of the roads in this city are uneven. To fix these, I need to find an even road as a reference. Fortunately, the mayor told me that there's 1 even road somewhere and if I persevere, I could find it.
Could you please help me with this?
Instructions:
Your task is to ask the user for the number of rows and columns of a 2D array.
Then, print the row number of the row where the sum of all of its elements is even.
For this problem, it is guaranteed that there is one and only one such row.
Input
1. Number of rows
2. Number of columns
3. Elements of the 2D array
Output
Note that the row number starts at 0, not 1.
Enter·#·of·rows:·3
Enter·#·of·columns:·3
Enter·elements:
2·7·4
1·1·2
0·5·0
Even·row:·1
arrow_forward
Python Programming
Please use only numpy no other library like cv2 Or any other
Write a python program that doesn't use any special libraries aside from numpy that takes an image.raw and performs histogram equalization and then exports it as a raw image
arrow_forward
Python Programming
Please use only numpy to export image no other library cv2 , pil Or any other
Write a python program that doesn't use any special libraries aside from numpy that takes an image.raw and performs histogram equalization and then exports it as a raw image
arrow_forward
python programming language
arrow_forward
G thresh skin x O Chrye Hist x M x
Ge3/0-Goo x
D Account Sur x
m GMA Redire X
My McDs A x
Descr
https://universityafmanitoba.desire2learn.com/d2/e/content/321335/viewContent/1510469/View
The gear ratio (R) of a bike is calculated as the quotient of the chainring over the cog size:
chainring teeth
cog teeth
R=
Distance per wheel turn
You can calculate the distance covered by one complete revolution of the wheel by calculating the circumference (e) of the wheel:
e = wheel size x #
Gear development
Depending on the gear ratio, the cog (and Ihus rear wheel) are going to spin completely around several times for each turn of the chainring. This
measurement is called the "gear development d, and is calculated as:
d= exR
Gear inches
A gear inch is a relative measurement of the mechanical advantage of different gears. A low value for gear inches is an "easy" gear, and a high value for
gear inches is a "hard gear.
Gear inches, as the name implies, is calculated in inches:
gear inches di x R…
arrow_forward
Scenario Instructions
You are a Mathematics major who has
agreed to teach an elementary school math
class where the students are studying
geometry. They are just starting to learn
about sine, cosine, and tangent.
You've decided that you want to show the
students what these functions look like when
they have been graphed.
Write a Python program to display three
separate graphs for sin, cos, and tan. Add
the ability to show all three graphs on a
single graph with one row and three
columns.
arrow_forward
5. Lemniscate or figure 8
You should have learned lemniscate or the famous figure 8 in high school as well. The following is a snip from
Wikipedia.
Lemniscate of Bernoulli
From Wikipedia, the free encyclopedia
In geometry, the lemniscate of
Bernoulli is a plane curve
defined from two given points F1
and F2, known as foci, at
distance 2c from each other as
the locus of points P so that
PF₁·PF₂ = c². The curve has a
shape similar to the numeral 8
and to the ∞ symbol. Its name is
F2
P
A lemniscate of Bernoulli and its two foci F₁ and F2
Figure 8.
Write a computer program (with graphics and GUI parts) that draws the figure 8. Show your analysis if
applicable (which means any equation?).
9
arrow_forward
A testnavclient.psonsvc.net/#/question/2896870d-7203-41a3-a0c3-e2d6bace85a5/34c0be18-53a8-4234-b085-4759c8.
Review -
A Bookmark
Quiz 6P1.3 Sound Waves (COPY) / 8 of 13
Which choice best identifies media through which sound can travel?
A. vacuums and liquids
B. solids and outer space
C. gases and outer space
D. solids and liquids
X
arrow_forward
Computer Science - Programming Languages and Compilers
Natural Semantics
https://docs.google.com/document/d/1iEI9hGkgLgdbZ4BkcuGmHi-mIirL1X0w6dtqgYHFl1o/edit?usp=sharing
Link has all the instructions needed
thank you
arrow_forward
Background and formula:
Ellipse has two types of axis - Major Axis and Minor Axis. The longest chord of the ellipse is the
major axis. The perpendicular chord to the major axis is the minor axis, which bisects the major axis
at the center as shown in Figure 1. Ellipse is different with circle which has only one radius. There is
no simple formula to calculate the exact or accurate value of perimeter of an ellipse. Therefore, we use
approximation formulas to calculate the approximate value of an ellipse's perimeter. One of the
approximation methods is called Ramanujan Formula as follows:
p zn[3(a+b) –
Г(За + b) (а + зь)|
where a is the semi major axis and b is the semi minor axis of the ellipse, respectively, as shown in
Figure 1.
be
major axis
Figure 1. Ellipse
The problem
An input file, data.txt has the following information:
data.txt
4
3
8
4
3
2
7
Write a complete C++ program that read the values of major axis and minor axis from input file,
data.txt; and then compute its perimeter…
arrow_forward
Background and formula:
Ellipse has two types of axis - Major Axis and Minor Axis. The longest chord of the ellipse is the
major axis. The perpendicular chord to the major axis is the minor axis, which bisects the major axis
at the center as shown in Figure 1. Ellipse is different with circle which has only one radius. There is
no simple formula to calculate the exact or accurate value of perimeter of an ellipse. Therefore, we use
approximation formulas to calculate the approximate value of an ellipse's perimeter. One of the
approximation methods is called Ramanujan Formula as follows:
p z n[3(a + b) – (3a + b)(a + 3b)]
where a is the semi major axis and b is the semi minor axis of the ellipse, respectively, as shown in
Figure 1.
b
(major axis
data.txt
4
8
5
7
Write a complete C+ program that read the values of major axis and minor axis from input file,
data.txt; and then compute its perimeter using the Ramanujan Formula. The first column in the input
file is the major axis, while the…
arrow_forward
Credit card numbers follow certain patterns: It must have between 13 and 16 digits, and the number must start with:■ 4 for Visa cards■ 5 for MasterCard credit cards■ 37 for American Express cards■ 6 for Discover cards
In 1954, Hans Luhn of IBM proposed an algorithm for validating credit card numbers. The algorithm is useful to determine whether a card number is entered correctly or whether a credit card is scanned correctly by a scanner. Credit card numbers are generated following this validity check, commonly known as the Luhn check or the Mod 10 check, which can be described as follows (for illustration, consider the card number 4388576018402626):
1. Double every second digit from right to left. If doubling of a digit results in a two-digit number, add up the two digits to get a single-digit number.
2. Now add all single-digit numbers from Step 1.
3. Add all digits in the odd places from right to left in the card number.
4. Sum the results from Steps 2 and 3.
5. If the result from…
arrow_forward
Question 9
The postfix equivalent of mathematical expression 9x(5-(3+6)) is
the expression + 36 - 5 x 9
the expression x 9 -5 + 36
the expression 9 5 3 6 + - x
the expression 6 3 + 5 x 9-
arch
arrow_forward
python programming (turtle) question
arrow_forward
Plot artificial intelligence
Python
You have to write code
arrow_forward
Topics: Graph Data Structures, Depth-First Search, Breadth-First Search, Dijkstra’s Algorithm, Bellman-Ford Algorithm, Kruskal’s Algorithm, Prim’s Algorithm, Quick Find, Quick Union, Weighted Quick UnionTO DO: Create a Python Program that satisfies all the testcases
Since an electronic circuit is the interconnection of several components, it might not be surprising that they can be represented as graphs which allow our computers to simulate the behavior of the circuit. A sample resistor network has its corresponding netlist representation used in ngspice (see Figure 1).
Description:
This problem focuses on properly parsing the input. To test this, your code should be able to properly store each input resistor and store them in a data structure and representation of your choice. To verify this, your code should be able to identify which resistors are in series and which resistors are in parallel. In the context of a graph, two resistors can be considered in series if there are no…
arrow_forward
Please add an gif image/plot an gif to this code. This is a brownian motion python code
here it is code
import numpy as np
import matplotlib.pyplot as plt
def brownian_motion(L, N):
# initialize position in the center of the grid
x = L // 2
y = L // 2
# initialize the grid
grid = np.zeros((L, L), dtype=np.int32)
# loop over the number of steps
for i in range(N):
# choose a random direction
direction = np.random.choice(['up', 'down', 'left', 'right'])
# move one step in that direction
if direction == 'up':
" y += 1"
elif direction == 'down':
"y -= 1"
elif direction == 'left':
"x -= 1"
elif direction == 'right':
"x += 1"
# make sure the particle is still on the grid
if x < 0 or x >= L or y < 0 or y >= L:
"continue"
# update the grid
grid[y, x] = 1
return grid
if __name__ == '__main__':
# set the size of the grid
L…
arrow_forward
computer graphics simple utilty curvewrite c#.net and send the designi need same link design and code and output
please curve and i need to input the Coordinates
https://www.codeproject.com/Articles/5267642/A-Simple-Utility-for-Drawing-Function-Curves
arrow_forward
python programming:
Topic: Functional model
Write a program one statement long (it can span multiple lines) that displays the curvature of a sinusoid.
arrow_forward
Python language
What is an f-string, and how can it be used when printing information to screen? (hint, show an example of how an f-string can be used to print the value of x to screen)
arrow_forward
Python code not working, please check my code.
Here is the question it is based off:
Building and using DNA Motifs
Background
Sequence motifs are short, recurring (meaning conserved) patterns in DNA that are presumed to have a biological function. Often they indicate sequence-specific binding sites for proteins and other important markers. However, sometimes they are not exactly conserved, meaning some mutations can happen in a motif in a particular organism. Mutations can be DNA substitutions/deletions/insertions. Therefore, sequences are usually aligned and a consensus pattern of a motif is calculated over all examples from organisms.
The following are examples of a transcription factor binding (TFB) site for the lexA repressor in_ E. Coli _located in a file called lexA.fasta:
>dinD 32->52 aactgtatataaatacagtt >dinG 15->35 tattggctgtttatacagta >dinH 77->97 tcctgttaatccatacagca >dinI 19->39 acctgtataaataaccagta >lexA-1 28->48 tgctgtatatactcacagca…
arrow_forward
Decrease-by-Constant-Factor Fake-Coin puzzle method in Java or C++ to find the fake coin out of n coins. Assume the false coin is lighter. Randomly place the false coin among the n coins. Submit results images and code files.
arrow_forward
Help with Python Turtle: Need help finalizing turtle drawing and to be fixed. I've included an picture to show what I need for the code to resemble.1. Lowering top circles to the middle of the canvas to be able to view the WHOLE island.2. The possibilities of the circles being more irregular when generating.3. Rivers being bold/thick and cutting through the island on a diagonal. Previous question: https://www.bartleby.com/questions-and-answers/help-with-python-turtle-struggling-with-last-few-steps-to-complete-what-i-want-the-following-1.-make/41857550-b5f1-46eb-95e1-dc46d2033b37 The code:import turtleimport randomimport tkinter as tkfrom tkinter import simpledialogfrom PIL import Image
# Define colorsocean = "#000066"sand = "#ffff66"grass = "#00cc00"lake = "#0066ff"mountain_color = "#808080" # Gray color for mountains
# Store mountain positionsmountain_positions = []
def draw_irregular_circle(radius, line_color, fill_color, irregularity=10, spikeyness=0.2):…
arrow_forward
it is not a quiz it is a homework i don't know how to solve it
arrow_forward
Select the answer choice that most closely satisfies the inquiry.Programs in this category include word processors, spreadsheet editors, e-mail clients, and web browsers.
arrow_forward
Programming language C#
arrow_forward
Computer Science
GIS Cartography Question: Name a couple of ways you could lessen the number of colors used in a class-type map.
arrow_forward
Using C++ language create the program for the image below
arrow_forward
Software used is Visual Basic.
arrow_forward
Computer organization and assembly language
I need help with writing the " Methodology" section PLEASE. Just the Methodology
Please and thanks!
I will paste the Introduction that I did down below:
Introduction
The Hamming code as we know it has a long history. The Hamming Code technique was developed by American Mathematician Richard W. Hamming to detect errors and correct them. Mr. Richard published a paper in 1950 in which he introduced a concept of the number of positions in which two code-words differ and the number of changes required to transform one code-word into another. It is now popularly known as Hamming distance. After this study, Hamming created a family of mathematical error-correcting codes, which today we called Hamming codes. This landmark study not only solved an important problem in telecommunications and computer science, but it introduced a whole new field of study. He created the Hamming Code which is still commonly used today in applications such as ECC…
arrow_forward
pizza (python)Mario owns a pizzeria. Mario makes all of his pizzas from 10 different ingredients, using 3 ingredients on each pizza. Mario’s cousin Luigi owns a pizzeria as well. Luigi makes all his pizzas from 9 ingredients, using 4 ingredients on each pizza. Mario and Luigi have made a bet: Mario believes that customers can order a larger selection of pizzas in his pizzeria than they can order in Luigi’s pizzeria. Use functions for this assignment.
Implement a factorial() function yourself (do not use the one from the math module)
When choosing k items from n possible items, the number of possibilities can be obtained using the following formula:
(??)=?!?!(?−?)!(nk)=n!k!(n−k)!
Make a function called choose with two parameters n and k, that implements the above formula.
Write a program that calculates the number of pizzas Mario and Luigi can make. The outcome should look like this:
Mario can make 120 pizzas.Luigi can make 126 pizzas. Luigi has won the bet.
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Related Questions
- 6:40 Back Assignment Details Object Oriented Programming Student first_name : string last_name: string id: int gpa : double major: string + set(): void + print(): void Sample Run (User input in bold): Student Information Database First Name: Elaine Last Name: Benes ID: 1961 GPA: 4.0 Major: French_Literature First Name: George Last Name: Costanza ◄ Previous Submit Assignment Dashboard Calendar 7 To Do C Notifications LTE 264 Next ► Inboxarrow_forward2. First Even Road by CodeChum Admin I've been newly assigned as the city's road planner but this job seems tougher than I thought! Almost all of the roads in this city are uneven. To fix these, I need to find an even road as a reference. Fortunately, the mayor told me that there's 1 even road somewhere and if I persevere, I could find it. Could you please help me with this? Instructions: Your task is to ask the user for the number of rows and columns of a 2D array. Then, print the row number of the row where the sum of all of its elements is even. For this problem, it is guaranteed that there is one and only one such row. Input 1. Number of rows 2. Number of columns 3. Elements of the 2D array Output Note that the row number starts at 0, not 1. Enter # of rows: 3 Enter # of columns: 3 Enter elements: 2 7 4 1 1 2 0 5 0 Even row: 1arrow_forward2. First Even Road by CodeChum Admin I've been newly assigned as the city's road planner but this job seems tougher than I thought! Almost all of the roads in this city are uneven. To fix these, I need to find an even road as a reference. Fortunately, the mayor told me that there's 1 even road somewhere and if I persevere, I could find it. Could you please help me with this? Instructions: Your task is to ask the user for the number of rows and columns of a 2D array. Then, print the row number of the row where the sum of all of its elements is even. For this problem, it is guaranteed that there is one and only one such row. Input 1. Number of rows 2. Number of columns 3. Elements of the 2D array Output Note that the row number starts at 0, not 1.arrow_forward
- 2. First Even Road by CodeChum Admin I've been newly assigned as the city's road planner but this job seems tougher than I thought! Almost all of the roads in this city are uneven. To fix these, I need to find an even road as a reference. Fortunately, the mayor told me that there's 1 even road somewhere and if I persevere, I could find it. Could you please help me with this? Instructions: Your task is to ask the user for the number of rows and columns of a 2D array. Then, print the row number of the row where the sum of all of its elements is even. For this problem, it is guaranteed that there is one and only one such row. Input 1. Number of rows 2. Number of columns 3. Elements of the 2D array Output Note that the row number starts at 0, not 1. Enter·#·of·rows:·3 Enter·#·of·columns:·3 Enter·elements: 2·7·4 1·1·2 0·5·0 Even·row:·1arrow_forwardPython Programming Please use only numpy no other library like cv2 Or any other Write a python program that doesn't use any special libraries aside from numpy that takes an image.raw and performs histogram equalization and then exports it as a raw imagearrow_forwardPython Programming Please use only numpy to export image no other library cv2 , pil Or any other Write a python program that doesn't use any special libraries aside from numpy that takes an image.raw and performs histogram equalization and then exports it as a raw imagearrow_forward
- python programming languagearrow_forwardG thresh skin x O Chrye Hist x M x Ge3/0-Goo x D Account Sur x m GMA Redire X My McDs A x Descr https://universityafmanitoba.desire2learn.com/d2/e/content/321335/viewContent/1510469/View The gear ratio (R) of a bike is calculated as the quotient of the chainring over the cog size: chainring teeth cog teeth R= Distance per wheel turn You can calculate the distance covered by one complete revolution of the wheel by calculating the circumference (e) of the wheel: e = wheel size x # Gear development Depending on the gear ratio, the cog (and Ihus rear wheel) are going to spin completely around several times for each turn of the chainring. This measurement is called the "gear development d, and is calculated as: d= exR Gear inches A gear inch is a relative measurement of the mechanical advantage of different gears. A low value for gear inches is an "easy" gear, and a high value for gear inches is a "hard gear. Gear inches, as the name implies, is calculated in inches: gear inches di x R…arrow_forwardScenario Instructions You are a Mathematics major who has agreed to teach an elementary school math class where the students are studying geometry. They are just starting to learn about sine, cosine, and tangent. You've decided that you want to show the students what these functions look like when they have been graphed. Write a Python program to display three separate graphs for sin, cos, and tan. Add the ability to show all three graphs on a single graph with one row and three columns.arrow_forward
- 5. Lemniscate or figure 8 You should have learned lemniscate or the famous figure 8 in high school as well. The following is a snip from Wikipedia. Lemniscate of Bernoulli From Wikipedia, the free encyclopedia In geometry, the lemniscate of Bernoulli is a plane curve defined from two given points F1 and F2, known as foci, at distance 2c from each other as the locus of points P so that PF₁·PF₂ = c². The curve has a shape similar to the numeral 8 and to the ∞ symbol. Its name is F2 P A lemniscate of Bernoulli and its two foci F₁ and F2 Figure 8. Write a computer program (with graphics and GUI parts) that draws the figure 8. Show your analysis if applicable (which means any equation?). 9arrow_forwardA testnavclient.psonsvc.net/#/question/2896870d-7203-41a3-a0c3-e2d6bace85a5/34c0be18-53a8-4234-b085-4759c8. Review - A Bookmark Quiz 6P1.3 Sound Waves (COPY) / 8 of 13 Which choice best identifies media through which sound can travel? A. vacuums and liquids B. solids and outer space C. gases and outer space D. solids and liquids Xarrow_forwardComputer Science - Programming Languages and Compilers Natural Semantics https://docs.google.com/document/d/1iEI9hGkgLgdbZ4BkcuGmHi-mIirL1X0w6dtqgYHFl1o/edit?usp=sharing Link has all the instructions needed thank youarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education