Question no 1:
% It is a program which takes coordinates (x, y) of a center of a circle and its radius r from user, % and determine that whether any point z with lies inside the circle, on the circle or outside the
% circle. For this if ,elseif and else statements will be used there.
function result= circle() x=input('Enter value of x Cordinate:'); y=input('Enter value of y Cordinate:'); r=input('Enter value of Radius:'); c=r*r; z=x*x+y*y; if c==z fprintf('The point is on the Circle'); elseif c>z fprintf('The point is outside the Circle'); else fprintf('The point is inside the Circle');
…show more content…
end
Output:
Question no 2:
function m=ques2() x=input('Enter no of Rows: '); y=input('Enter no of columns '); for i=1:x %loop for rows for j=1:y %loop for columns str=['Enter elements in row' num2str(i) ',col' num2str(j) ': '] ; % Input values a(i,j)=input(str); end end display(a); % Call display function end function b=display(a) %Display function b=5*a; disp(b);
end
…show more content…
switch a %switch statement case 't' n1 = input('Enter number '); n2 = input('Enter number '); Table(n1,n2); % call of Table(); case 'f' n3 = input('Enter number '); Factorial(n3); % call of Factorial(); case 'p' n4 = input('Enter number '); Prime(n4); % call of Prime(); case 's' n5 =char([]); fprintf('Enter Array of characters \n'); for i=1:1:5 n5(i) = input (''); end c = input('Enter character to be searched:'); fprintf(' ******************************* \n '); fprintf(' Menu for Search \n '); fprintf(' ******************************* \n '); fprintf('s: for sequntial search \n'); fprintf('b: for binary search \n'); choice = input('Enter choice: '); Search(n5, c, choice); % call of Search(); otherwise fprintf('Invalid choice'); end end
Output:
% /////////// Funtion of Table Printing ////////////
function x=Table(n1,n2)
Table 5.2.3: stdlib.h Macros Several functions supported by stdlib.h include: Function Description double atof(const char *str) This function will convert the string, which is referred by the argument str to a floating-point number (of the type
10.a WHILE LOOP: In this loop architecture 'while' is followed by a condition and if it is satisfied, the execution of the loop starts. After execution of each cycle, compiler will check whether the condition under while
In Table \ref{parameter_table} we present the values of the input parameters using the DAs of $N$. %In this section, we will only consider the central values of these parameters. \begin{table}[t] \addtolength{\tabcolsep}{10pt} \begin{tabular}{ccccccc} \hline\hline
line from x = y to y = x. Mathematically, x = y and y = x mean the same thing. How- ever, this is not so in programming. Run the second program.
if self.number2.is_integer() = = True: self.number2 = int(self.number2) if self.operator = = '1': ret = self.
1. 31 counties, 2551652 is total 2010 population, Washington county in Arkansas has largest area of 956.1 square miles 2. New York has largest number of African Americans, District of Columbia (DC) has largest percen tage of African Americans 3. Middle Atlantic has 3014385 4. - FIPS code is the field that can use to join table with dating table.
Unit III: Chapter 9 Concepts and Identifications (Please clearly explain the significance of each). Africanity A distinct culture that existed all throughout Africa and united the continent as a whole.
5, Alternative execution which the second form of the "If" statement. It has two possibilities and the condition determines which one gets executed. It hold If and else and show us either True or
(MIP-1) After the fall of rome there were issues (SIP-A) Poverty was common throughout europe (STEWE-1) A lot of the people were poor- without the good roads the trade fell apart so people survived by farming for themselves and if the weather was bad then they would starve without the food (Richardson). (STEWE-2) People suffered from diseases- they heavily relied on herbal medicine and lots of hope to survive (Richardson). (SIP-B) Without military there was nobody to protect the land (STEWE-1)
1.) Mali: The empire of Mali was known for its variety of imported goods. The rich Muslim merchants imported items such as copper, brass, spices, Arabian horses, manufactured goods, slaves, and gold. Slaves and gold were the two major exports of the Mali empire. The high demand for gold caused foreigners to travel to Africa in search of the elite metal.
1. If given the power, I would support and convert the US system into a direct democracy which means the winner of the presidential popular vote would win the presidency. On page 182 in the book, it states that a direct democracy enables all actors with a voice (the ability to vote) to make decisions on the matter at hand. Furthermore, a direct democracy provides voice to those affected by the issue.
CHM1 Task 2 A. Personal Values Here are my four top personal core values. 1. One of my personal core values is honesty. Being honest is personally meaningful to me because I believe that it is important for others to know that I am trustworthy and truthful so that they can feel secure that I will act in an ethical way. By being honest I gain trust, which matters to me.
Chapter 12 is about how teachers can develop an action plan for differentiation. There is a total of 8 steps, but the 1-7 steps is more about developing the plan while the 8th step is about finally putting the plan into action. The chapter even has an image of the school-based action plan for differentiation. Towards at the end of the book before the conclusion parts, the arthur has some tips for keeping differentiation alive and has a walkthrough indicators of differentiation in action. Clarify: I believe the steps for the action plan of differentiation is interesting.
Participants will then be asked to circle any objects in the incorrect location. They will have --- minutes to complete this part of the task. These papers will then be collected and analyzed for the number of objects correctly
Here number n is given but a, b, c, d are variable numbers. For formation of a