Trying Write Program Python Main Function Void Function Named Numbers Takes Arguments Retu Q43779443

I am trying to write a program in python that has a main()function and a void function named numbers() that takes noarguments and returns the variable used for the total. The numbersfunction generates 20 random integers, it is required to use therandom.randint method to generate these numbers. The range would be8 to 59 inclusive, (duplicates are okay), and prints them all onone line separated by spaces. A loop is required for this, and theloop should also total up the integers so the sum can be displayedwhen the loop ends. The main() function calls the numbers()function.
Here is what I have so far, but it only displays 1 number and notthe 20 that should be displayed. I need some guidance on what I’mdoing wrong. Thank you!

import random

def numbers():
#function that generates 20 random integers
#prints on single line and prints the total sum
#set sum to 0
total=0

for number in range(20):
number = random.randint(8, 59)
print (number, end=”)

  #add all numbers for sum
  total+=number
  print (‘n The total is ‘,total)

def main():
  #call the function
  numbers()

main()

Expert Answer


Answer to I am trying to write a program in python that has a main() function and a void function named numbers() that takes no ar…

Tudy Tools Selected Item Attempt Preview Preview Window Large Preview Cost Goods Sold Slap Q43842678

tudy Tools Selected Item Attempt Preview Preview In Window Large Preview Cost of Goods Sold Slapshot Company makes ice hockeyWindows 10 File Edit View Actions Devices Window Help Windows 1 a McGraw Hill Connect Chapter 1: Quiz X + 0 https://newconnectudy Tools Selected Item Attempt Preview Preview In Window Large Preview Cost of Goods Sold Slapshot Company makes ice hockey sticks. During the month of June, 1,900 sticks were completed at a cost of goods manufactured of $437,000. Suppose that on June 1, Slapshot had 350 units in finished goods inventory costing $80,000 and on June 30, 370 units in finished goods inventory costing $84,000. 1. Prepare a cost of goods sold statement for the month of June. Slapshot Company Cost of Goods Sold Statement For the Month of June Cost of goods manufactured 437,000 Finished goods inventory, June 1 80,000 Finished goods inventory, June 30 84,000 Cost of goods sold $357,000 2. Calculate the number of sticks that were sold during June. 1,880 units Eivacy Center | Terms of Use | Copyright Notices | Cengage Technical Support | Nelson Technical Support | Accessibility o te MacBook Pro Windows 10 File Edit View Actions Devices Window Help Windows 1 a McGraw Hill Connect Chapter 1: Quiz X + 0 https://newconnect.mheducation.com/flow/connect.html ► 0 Chapter 1: Quiz Saved A spreadsheet is an example of a(n): 12 Multiple Choice (2 01:53:01 general-purpose application specialized program O o system application utility program 12 of Graw < Prev он е на Type here to search Show transcribed image text tudy Tools Selected Item Attempt Preview Preview In Window Large Preview Cost of Goods Sold Slapshot Company makes ice hockey sticks. During the month of June, 1,900 sticks were completed at a cost of goods manufactured of $437,000. Suppose that on June 1, Slapshot had 350 units in finished goods inventory costing $80,000 and on June 30, 370 units in finished goods inventory costing $84,000. 1. Prepare a cost of goods sold statement for the month of June. Slapshot Company Cost of Goods Sold Statement For the Month of June Cost of goods manufactured 437,000 Finished goods inventory, June 1 80,000 Finished goods inventory, June 30 84,000 Cost of goods sold $357,000 2. Calculate the number of sticks that were sold during June. 1,880 units Eivacy Center | Terms of Use | Copyright Notices | Cengage Technical Support | Nelson Technical Support | Accessibility o te MacBook Pro
Windows 10 File Edit View Actions Devices Window Help Windows 1 a McGraw Hill Connect Chapter 1: Quiz X + 0 https://newconnect.mheducation.com/flow/connect.html ► 0 Chapter 1: Quiz Saved A spreadsheet is an example of a(n): 12 Multiple Choice (2 01:53:01 general-purpose application specialized program O o system application utility program 12 of Graw

Expert Answer


Answer to tudy Tools Selected Item Attempt Preview Preview In Window Large Preview Cost of Goods Sold Slapshot Company makes ice h…

Tupleh Ifndef Tupleh Define Tupleh Tuple Represents Sequence Items Type Int Range Minvalue Q43864197

Tuple.h//

#ifndef TUPLE_H
#define TUPLE_H

// A Tuple represents a sequence of items of type int in therange MINVALUE to MAXVALUE.
// The number of item in any Tuple is equal to SIZE where SIZE is astatic constant.
// The items are accessed by position where the first position is 1and the last position is SIZE.
class Tuple {
public:
static const int SIZE = 8; // SIZE could be any positive value.Don’t assume that SIZE is always 5.
static const int MINVALUE = 1, MAXVALUE = 100; // range of legalitems.
private:

int items[SIZE]; // items[0] holds the first item, items[1] holdssecond item and so on.

public:

Tuple(int init = MINVALUE); // initialize the tuple object with allitems equal to init.

// Return the nth item for any n in the range {1…SIZE}.
// Remember: The nth item is stored at index n-1, NOT indexn.
// For n < 1, return the first item and for n > SIZE, returnthe last item.
int get(int n) const;

// Assuming v in range {MINVALUE…MAXVALUE} and n in range{1…SIZE}
// set(n,v) sets the nth item to v.
// For n in range and v < MINVALUE, set(n,v) is equivalent toset(n,MINVALUE).
// For n in range and v > MAXVALUE, set(n,v) is equivalent toset(n,MAXVALUE).
// For n out of range set(n,v) does nothing, regardless of what vis.
void set(int n, int v);

// Rotate item forward by the given amount. For example, if amount= 3
// then fourth will get the original value of first, first will getthe original value of second
// second will get the original value of third and third will getthe original value of fourth.
// If amount is a multiple of SIZE or negative then rotate will donothing.
// If amount is bigger than SIZE, then rotate by amount %SIZE.
void rotate(int amount);

void reverse(); // reverse the order of elements e.g.{10,14,5,87} –> {87,5,14,10}.

void print() const; // print values in braces, separated bycommas e.g. {10,20,30,40}, then print endl.

double getAverage() const; // return the average of all items inthe Tuple.

void sort(); // arrange the value in ascending order. Usebubblesort or selection sort.

bool equal(const Tuple& t) const; // return true iff the twoTuples contain the same sequence of values.

// Return true iff the current object and t contain the samemultiset (“bag”) of items.
// That means, for any value v, if v occurs k times in oneobject
// then v must also occur k times in the other object.
// Hint: Create a sorted version of each Tuple and compare forequality.
bool equalBags(const Tuple& t) const;

};

#endif

MAIN//

#include <iostream>
#include “Tuple.h”

using namespace std;

void testSet() {
cout << “BEGIN TESTSET” << endl;
Tuple t;
t.print();
for (int i = 1; i <= Tuple::SIZE; i++)
t.set(i, Tuple::MINVALUE + i);
t.print();
t.set(Tuple::SIZE + 100, Tuple::MAXVALUE);
t.set(0, Tuple::MINVALUE);
t.print();
t.set(1, Tuple::MAXVALUE – 1);
t.set(Tuple::SIZE, Tuple::MINVALUE + 1);
t.print();
t.set(1, Tuple::MAXVALUE + 1);
t.set(Tuple::SIZE, Tuple::MINVALUE – 1);
t.print();
cout << “END TESTSET” << endl << endl;
}

void testSort()
{
cout << “BEGIN TESTSORT” << endl;
Tuple t;
for (int i = Tuple::SIZE; i > 1; i–)
t.set(i-1, t.get(i) + 1);
t.print();
t.sort();
t.print();
t.set(1,Tuple::MAXVALUE);
t.print();
t.sort();
t.print();
cout << “END TESTSORT” << endl << endl;
}

void testReverse()
{
cout << “BEGIN TESTREVERSE” << endl;
Tuple t((Tuple::MINVALUE + Tuple::MAXVALUE) / 2);
for (int i = 1; i < Tuple::SIZE; i++)
t.set(i + 1, t.get(i) + 1);
t.print();
t.reverse();
t.print();
t.reverse();
t.print();
cout << “END TESTREVERSE” << endl << endl;
}

void testRotate()
{
cout << “BEGIN TESTROTATE” << endl;
Tuple t;
for (int i = 1; i < Tuple::SIZE; i++)
t.set(i + 1, t.get(i) + 1);
t.print();
for (int i = -1; i <= 2 * Tuple::SIZE; i++) {
Tuple u = t;
u.rotate(i);
u.print();
}
cout << “END TESTROTATE” << endl << endl;
}

int main()
{
testSet();
testSort();
testReverse();
testRotate();
return 0;
}

TUPLE.CPP (FILL IN THE BLANKS BASED ON INSTRUCTIONS INTUPLE.H)

#include “Tuple.h”
#include <iostream>
using namespace std;

Tuple::Tuple(int init) {
  

  
}

int Tuple::get(int n) const {

  
}

void Tuple::set(int position, int value) {

  
}

void Tuple::rotate(int amount) {
  

  
}

void Tuple::reverse() {

  
}

void Tuple::print() const {

}

double Tuple::getAverage() const {

  
}

void Tuple::sort() {

}

bool Tuple::equal(const Tuple& t) const {
  

}

bool Tuple::equalBags(const Tuple& t) const {

}

BEGIN TESTSET {1,1,1,1,1,1,1,1) {2,3,4,5,6,7,8,9) {2,3,4,5,6,7,8,9) {99,3,4,5,6,7,8,2} {100,3,4,5,6,7,8,1} END TESTSET BEGINBEGIN TESTSET {1,1,1,1,1,1,1,1) {2,3,4,5,6,7,8,9) {2,3,4,5,6,7,8,9) {99,3,4,5,6,7,8,2} {100,3,4,5,6,7,8,1} END TESTSET BEGIN TESTSORT {8,7,6,5,4,3,2,1) {1,2,3,4,5,6,7,8} {100,2,3,4,5,6,7,8) {2,3,4,5,6,7,8,100) END TESTSORT BEGIN TESTREVERSE {50,51,52,53,54,55,56,57} {57,56,55,54,53,52,51,50) {50,51,52,53,54,55,56,57} END TESTREVERSE BEGIN TESTROTATE {1,2,3,4,5,6,7,8} {2,3,4,5,6,7,8,1} {1,2,3,4,5,6,7,8) {8,1,2,3,4,5,6,7) {7,8,1,2,3,4,5,6} {6,7,8,1,2,3,4,5) {5,6,7,8,1,2,3,4} {4,5,6,7,8,1,2,3) 13,4,5,6,7,8,1,2} 12,3,4,5,6,7,8,1) {1,2,3,4,5,6,7,8) {8,1,2,3,4,5,6,7} {7,8,1,2,3,4,5,6) {6,7,8,1,2,3,4,5) 15,6,7,8,1,2,3,4) (4,5,6,7,8,1,2,3) Show transcribed image text BEGIN TESTSET {1,1,1,1,1,1,1,1) {2,3,4,5,6,7,8,9) {2,3,4,5,6,7,8,9) {99,3,4,5,6,7,8,2} {100,3,4,5,6,7,8,1} END TESTSET BEGIN TESTSORT {8,7,6,5,4,3,2,1) {1,2,3,4,5,6,7,8} {100,2,3,4,5,6,7,8) {2,3,4,5,6,7,8,100) END TESTSORT BEGIN TESTREVERSE {50,51,52,53,54,55,56,57} {57,56,55,54,53,52,51,50) {50,51,52,53,54,55,56,57} END TESTREVERSE BEGIN TESTROTATE {1,2,3,4,5,6,7,8} {2,3,4,5,6,7,8,1} {1,2,3,4,5,6,7,8) {8,1,2,3,4,5,6,7) {7,8,1,2,3,4,5,6} {6,7,8,1,2,3,4,5) {5,6,7,8,1,2,3,4} {4,5,6,7,8,1,2,3) 13,4,5,6,7,8,1,2} 12,3,4,5,6,7,8,1) {1,2,3,4,5,6,7,8) {8,1,2,3,4,5,6,7} {7,8,1,2,3,4,5,6) {6,7,8,1,2,3,4,5) 15,6,7,8,1,2,3,4) (4,5,6,7,8,1,2,3)

Expert Answer


Answer to Tuple.h// #ifndef TUPLE_H #define TUPLE_H // A Tuple represents a sequence of items of type int in the range MINVALUE to…

Turn C Code Mips Using Mars Mips Simulator C Code Include Using Namespace Std Bool Isauto Q43892951

Turn this C++ code in MIPS using MARS MIPS simulator C++ Code: #include <iostream> using namespace std; bool isAuto Morbic in

if(flag==1) return false; else return true; int main() { int n; cio>>n; for(int i=1;i<=n;i++X if(isAuto Morphic) cout<<]<<,

Turn this C++ code in MIPS using MARS MIPS simulator C++ Code: #include <iostream> using namespace std; bool isAuto Morbic int nX int flag=0; int square=nen; int s=n; while(n>0) if(n% 10!=square%10) flag=1; break; n=n/10; square=square/10; if(flag==1) return false; else return true; int main() { int n; cio>>n; for(int i=1;i<=n;i++X if(isAuto Morphic) cout<<]<<“”, Show transcribed image text Turn this C++ code in MIPS using MARS MIPS simulator C++ Code: #include using namespace std; bool isAuto Morbic int nX int flag=0; int square=nen; int s=n; while(n>0) if(n% 10!=square%10) flag=1; break; n=n/10; square=square/10;
if(flag==1) return false; else return true; int main() { int n; cio>>n; for(int i=1;i

Expert Answer


Answer to Turn this C++ code in MIPS using MARS MIPS simulator C++ Code: #include using namespace std; bool isAuto Morbic int nX i…

Tutorial 2 Developing Web Site Html Css Html 125 Ce Skills Wamed Torial Using Case Rio W R Q43821309

Please i need the solution for this tutorial

Tutorial 2 Developing a Web Site HTML and CSS HTML 125 ce the skills wamed in torial using me case rio. w Review AssignmentsHTML and CSS Tutorial 2 Developing a Web Site t to the contest.htm filen Apply your knowledge of hypertext links to create aTutorial 2 Developing a Web Site HTML and CSS HTML 127 16. Go to the child.htm file in your web browser. Verify that you can

Tutorial 2 Developing a Web Site HTML and CSS HTML 125 ce the skills wamed in torial using me case rio. w Review Assignments Data Files needed for the Review Assignments camhome.htm, child1.jpg child3.jpg, childtxt.htm, conlogo.jpg, constyles.css, contest1.png-contest3. png contesttxt.htm, flower1.jpg-flower3.jpg, flowertxt.htm, modernizr-1.5.js, photogloss.htm, scenic1.jpg-scenic3.jpg, scenictxt.htm, thirdstip.jpg thumb1.jpg- thumb9.jpg, tipweek.htm Gerry has been working on the CAMshots Web site for a while. During that time, the site has grown in popularity with amateur photographers. Now he wants to host a monthly photo contest to highlight the work of his colleagues. Each month Gerry will pick the three best photos from different photo categories. He’s asked for your help in creating the collection of Web pages highlighting the winning entries, Gerry has already created four pages. The first page contains information about the photo contest; the remaining three pages contain the winning entries for child photos, scenic photos, and flower photos. Although Gerry has already entered much of the page content, he needs you to work on creating the links between and within each page. Figure 2-49 shows a preview of the photo contest’s home page. Figure 2-49 CAMshots Contest Winners page / camshot News from the Word of Digthegraphy TIPS CONTEST GLOSSARY Contest Winners Next Month’s Contest Categories Here are the results for this month’s contest in the categories of Child Photos, Flower Photos, and Scenic Photos. I received hundreds of entries and it was difficult to narrow the entries down to three in each category. Thanks to everyone who participated this month Below are thumbnail images of the winning photos. You can click the photos to view larger images of each. These photos are distributed for non-commercial use. If you wish to obtain copies for commercial use, please contact the photographer. Child Photos Please submit your entries to Gerry Hayward Include your name, the photo category, and the photo settings. JPEG photos only Attention: Our friends BetterPhoto.com are having their annual photo contest. Please take this opportunity to submit your work to HTML and CSS Tutorial 2 Developing a Web Site t to the contest.htm filen Apply your knowledge of hypertext links to create a directory of universities and colleges APPLY Figure 2.50 Complete the following: 1. Use your text editor to open the contesttxt.htm, childtxt.htm, scenictxt.htm, and flowertxt.htm files from the tutorial.02review folder included with your Data Files Enter your name and the date within each file, and then save them as contest.htm child.htm, scenic.htm, and flower.htm, respectively, in the same folder. 2. Go to the child.htm file in your text editor. Directly below the header element, create a navigation list containing an unordered list with the following list items as hyperlinks: o me home linked to the camhome h ret 1932 b. Tips linked to the tipweek.htm fie c. Contest linked to the contest.htm file che d. Glossary linked to the photogloss.htm file 3. Go to the section element and locate the contest.png inline image. Directly below the inline image, insert an image map with the following properties: d. Set the name of the image map as contestmap b. Add a polygonal hotspot pointing to the child.htm file containing the points (427, 5. (535, 201, (530, 591, and (421, 43). Enter Child Photos as the alternate text for the hotspotree shape “plyCardi. 5,535,20,530,57, 4143” het dit c. Add a polygonal hotspot pointing to the flower.htm file containing the points (539, 57), (641, 841, (651, 46), and (547, 26). Enter Flower Photos as the alternate text for the hotspot d. Add a polygonal hotspot pointing to the scenic.htm file containing the points 1650, 86), (753, 125), (766, 78), and (662, 49). Enter Scenic Photos as the alter- mate text for the hotspot sederetu l t. lo con 4. Apply the contestmap image map to the contest1 inline image. Co n 5. Locate the three h elements naming the three child photo winners. Assign the h2 elements the ids photo, photo2, and photo3, respectively. 6. Save your changes to the file. 7. Go to the flower.htm file in your text editor. Repeat Steps 2 through 6, applying the image map to the contest2.png image at the top of the section element 8. Go to the scenic.htm file in your text editor. Repeat Steps 2 through 6 applying the image map to the contest3.png image at the top of the section element. 9. Go to the contest.htm file in your text editor. Repeat Step 2 to insert a navigation list at the top of the page. 10. Scroll down to the second article. Link the text Child Photos to the child.htm file. Link Flower Photos to the flower.htm file. Link Scenic Photos to the scenic.htm file. 11. Scroll down to the nine thumbnail images (named thumb1.jpg through thumb9.jpg) Link each inline image to the corresponding he heading in the child.htm, flower. him, or scenic.htm file you identified in Step 5. 12. Scroll down to the aside element. Mark the text Gerry Hayward as a hypertext link to an e-mail address with ghaywarde camshots.com as the e-mail address and Photo Contest as the subject line. 13. Mark the text BetterPhoto.com as a hypertext link pointing to the URL http://www. betterphoto.com. Set the attribute of the link so that it opens in a new browser win: dow or tab. 14. Save your changes to the file. 15. Open contest.htm in your web browser. Verify that the e- mail link opens a new mail message window with the subject line Photo Contest Verify that the link to BetterPhoto com opens that Web site in a new browser window or tab. Verify that you can navigate through the Web site using the hypertext links in the navigation list. Finally, click each of the nine thumbnail images at the bottom of the page and verify that each connects to the larger image of the photo on the appropriate photo contest page. Tutorial 2 Developing a Web Site HTML and CSS HTML 127 16. Go to the child.htm file in your web browser. Verify that you can navigate forward and backward through the three photo contest pages by clicking the hotspots in the image map. 17. Submit your completed files to your instructor, in either printed or electronic form, as requested. Show transcribed image text Tutorial 2 Developing a Web Site HTML and CSS HTML 125 ce the skills wamed in torial using me case rio. w Review Assignments Data Files needed for the Review Assignments camhome.htm, child1.jpg child3.jpg, childtxt.htm, conlogo.jpg, constyles.css, contest1.png-contest3. png contesttxt.htm, flower1.jpg-flower3.jpg, flowertxt.htm, modernizr-1.5.js, photogloss.htm, scenic1.jpg-scenic3.jpg, scenictxt.htm, thirdstip.jpg thumb1.jpg- thumb9.jpg, tipweek.htm Gerry has been working on the CAMshots Web site for a while. During that time, the site has grown in popularity with amateur photographers. Now he wants to host a monthly photo contest to highlight the work of his colleagues. Each month Gerry will pick the three best photos from different photo categories. He’s asked for your help in creating the collection of Web pages highlighting the winning entries, Gerry has already created four pages. The first page contains information about the photo contest; the remaining three pages contain the winning entries for child photos, scenic photos, and flower photos. Although Gerry has already entered much of the page content, he needs you to work on creating the links between and within each page. Figure 2-49 shows a preview of the photo contest’s home page. Figure 2-49 CAMshots Contest Winners page / camshot News from the Word of Digthegraphy TIPS CONTEST GLOSSARY Contest Winners Next Month’s Contest Categories Here are the results for this month’s contest in the categories of Child Photos, Flower Photos, and Scenic Photos. I received hundreds of entries and it was difficult to narrow the entries down to three in each category. Thanks to everyone who participated this month Below are thumbnail images of the winning photos. You can click the photos to view larger images of each. These photos are distributed for non-commercial use. If you wish to obtain copies for commercial use, please contact the photographer. Child Photos Please submit your entries to Gerry Hayward Include your name, the photo category, and the photo settings. JPEG photos only Attention: Our friends BetterPhoto.com are having their annual photo contest. Please take this opportunity to submit your work to
HTML and CSS Tutorial 2 Developing a Web Site t to the contest.htm filen Apply your knowledge of hypertext links to create a directory of universities and colleges APPLY Figure 2.50 Complete the following: 1. Use your text editor to open the contesttxt.htm, childtxt.htm, scenictxt.htm, and flowertxt.htm files from the tutorial.02review folder included with your Data Files Enter your name and the date within each file, and then save them as contest.htm child.htm, scenic.htm, and flower.htm, respectively, in the same folder. 2. Go to the child.htm file in your text editor. Directly below the header element, create a navigation list containing an unordered list with the following list items as hyperlinks: o me home linked to the camhome h ret 1932 b. Tips linked to the tipweek.htm fie c. Contest linked to the contest.htm file che d. Glossary linked to the photogloss.htm file 3. Go to the section element and locate the contest.png inline image. Directly below the inline image, insert an image map with the following properties: d. Set the name of the image map as contestmap b. Add a polygonal hotspot pointing to the child.htm file containing the points (427, 5. (535, 201, (530, 591, and (421, 43). Enter Child Photos as the alternate text for the hotspotree shape “plyCardi. 5,535,20,530,57, 4143” het dit c. Add a polygonal hotspot pointing to the flower.htm file containing the points (539, 57), (641, 841, (651, 46), and (547, 26). Enter Flower Photos as the alternate text for the hotspot d. Add a polygonal hotspot pointing to the scenic.htm file containing the points 1650, 86), (753, 125), (766, 78), and (662, 49). Enter Scenic Photos as the alter- mate text for the hotspot sederetu l t. lo con 4. Apply the contestmap image map to the contest1 inline image. Co n 5. Locate the three h elements naming the three child photo winners. Assign the h2 elements the ids photo, photo2, and photo3, respectively. 6. Save your changes to the file. 7. Go to the flower.htm file in your text editor. Repeat Steps 2 through 6, applying the image map to the contest2.png image at the top of the section element 8. Go to the scenic.htm file in your text editor. Repeat Steps 2 through 6 applying the image map to the contest3.png image at the top of the section element. 9. Go to the contest.htm file in your text editor. Repeat Step 2 to insert a navigation list at the top of the page. 10. Scroll down to the second article. Link the text Child Photos to the child.htm file. Link Flower Photos to the flower.htm file. Link Scenic Photos to the scenic.htm file. 11. Scroll down to the nine thumbnail images (named thumb1.jpg through thumb9.jpg) Link each inline image to the corresponding he heading in the child.htm, flower. him, or scenic.htm file you identified in Step 5. 12. Scroll down to the aside element. Mark the text Gerry Hayward as a hypertext link to an e-mail address with ghaywarde camshots.com as the e-mail address and Photo Contest as the subject line. 13. Mark the text BetterPhoto.com as a hypertext link pointing to the URL http://www. betterphoto.com. Set the attribute of the link so that it opens in a new browser win: dow or tab. 14. Save your changes to the file. 15. Open contest.htm in your web browser. Verify that the e- mail link opens a new mail message window with the subject line Photo Contest Verify that the link to BetterPhoto com opens that Web site in a new browser window or tab. Verify that you can navigate through the Web site using the hypertext links in the navigation list. Finally, click each of the nine thumbnail images at the bottom of the page and verify that each connects to the larger image of the photo on the appropriate photo contest page.
Tutorial 2 Developing a Web Site HTML and CSS HTML 127 16. Go to the child.htm file in your web browser. Verify that you can navigate forward and backward through the three photo contest pages by clicking the hotspots in the image map. 17. Submit your completed files to your instructor, in either printed or electronic form, as requested.

Expert Answer


Answer to Tutorial 2 Developing a Web Site HTML and CSS HTML 125 ce the skills wamed in torial using me case rio. w Review Assignm…

Tutorial 7 Create Bankaccount Class Methods Constructor Receives Account Holder Name Init Q43779304

Solve Using Python
Tutorial 7 Create a BankAccount class, which has below methods a. Constructor that receives the account holder name and the iTutorial 7 Create a BankAccount class, which has below methods a. Constructor that receives the account holder name and the initial balance in the account. b. A static method displayTotalAccount that displays the total number of accounts that have been created. C. Aset Balance method that sets the account with a new balance. d. A getBalance method that returns the current account balance. e. Awithdraw method that withdraws certain amount from the account. f. A deposit method that deposits certain amount into the account. 8. A_str__method to display the account holder name and current balance. Example of how above methods are used is illustrated below: al = BankAccount (“Abu”, 100) bi = BankAccount (“Ali”, 200) BankAccount.displayTotalAccount() # “Total number of account created is 2” will be displayed. print (al) “Abu has 100 in the account will be displayed. al.withdraw (200) # “Balance is sufficient” will be displayed. al.withdraw (50) print (al.getBalance()) # “50” will be displayed. al.deposit (100) print (al.getBalance()) # “150” will be displayed. al.setBalance (50) print (al.getBalance()) “50” will be displayed. Show transcribed image text Tutorial 7 Create a BankAccount class, which has below methods a. Constructor that receives the account holder name and the initial balance in the account. b. A static method displayTotalAccount that displays the total number of accounts that have been created. C. Aset Balance method that sets the account with a new balance. d. A getBalance method that returns the current account balance. e. Awithdraw method that withdraws certain amount from the account. f. A deposit method that deposits certain amount into the account. 8. A_str__method to display the account holder name and current balance. Example of how above methods are used is illustrated below: al = BankAccount (“Abu”, 100) bi = BankAccount (“Ali”, 200) BankAccount.displayTotalAccount() # “Total number of account created is 2” will be displayed. print (al) “Abu has 100 in the account will be displayed. al.withdraw (200) # “Balance is sufficient” will be displayed. al.withdraw (50) print (al.getBalance()) # “50” will be displayed. al.deposit (100) print (al.getBalance()) # “150” will be displayed. al.setBalance (50) print (al.getBalance()) “50” will be displayed.

Expert Answer


Answer to Tutorial 7 Create a BankAccount class, which has below methods a. Constructor that receives the account holder name and …

Tutors


Expert Answer


Get immediate homework help or set up affordable online tutoring with a tutor from a top college. Try it for free!

Tvui Misi Hame S Must Clearly Uisplayed Iii Wie Viueo 4 8 Relation Msp432e401y Board Core Q43796025

TVUI MISI Hame(s) must be clearly uisplayed III WIE VIUEO . [4] 8. In relation to the MSP432E401Y board, what core processorPLEASE help and explain those questions tome 🙂

TVUI MISI Hame(s) must be clearly uisplayed III WIE VIUEO . [4] 8. In relation to the MSP432E401Y board, what core processor is used and define its registers (purpose and number of bits). [2] 9. Is the core processor an 8-, 16-, 32-, or 64-bit architecture, and what does that mean? [1] 10. Record the exact name of the reference documentation on the core processing unit and its operation codes/language for the MSP432E401Y. [1] 11. Record the exact name of the reference documentation on the microprocessor logic systems and peripherals for the MSP432E401 Y. [1] Show transcribed image text TVUI MISI Hame(s) must be clearly uisplayed III WIE VIUEO . [4] 8. In relation to the MSP432E401Y board, what core processor is used and define its registers (purpose and number of bits). [2] 9. Is the core processor an 8-, 16-, 32-, or 64-bit architecture, and what does that mean? [1] 10. Record the exact name of the reference documentation on the core processing unit and its operation codes/language for the MSP432E401Y. [1] 11. Record the exact name of the reference documentation on the microprocessor logic systems and peripherals for the MSP432E401 Y. [1]

Expert Answer


Answer to TVUI MISI Hame(s) must be clearly uisplayed III WIE VIUEO . [4] 8. In relation to the MSP432E401Y board, what core proce…

Two Applications Client Server Communicating Host Machine Netstar Command Executed Twice T Q43830343

Two applications, a client and server, are communicating with each other on the same host machine. The netstar command is exe

Two applications, a client and server, are communicating with each other on the same host machine. The netstar command is executed twice on two separate occasions and produces the following outputs (labelled Figure 2 (i) and Figure 2 (ii)): 1. Proto Recv-Q Send-Q Local Address Foreign Address State 3. tcp 4. tcp 5. tep 0 0 26 0 0 0 147.252.234.34:12345 0.0.0.0:* LISTEN 147.252.234.34:12345 147.252.234.34:44901 ESTABLISHED 147.252.234.34:44901 147.252.234.34:12345 ESTABLISHED Figure 2(1) 1. Proto Recv-Q Send-Q Local Address Foreign Address State 3. top 4. tcp 0 0 0 0 147.252.234.34:12345 0.0.0.0:* LISTEN 147.252.234.34:12345 147.252.234.34:44901 TIME WAIT Figure 2(11) (1) In relation to Figure 2 (i), line 5. You are required to: (a) Identify which application this line refers to, client or server. Justify your answer with reference to the data displayed in the figure. (3 marks) (b) Explain what the number in the Recy-Q column refers to and identify what Primitive must be invoked in the associated application for this number to reduce to zero. (3 marks) In relation to Figure 2 (ii), line 4. You are required to: (ii) (a) Explain the current status of the connection (with reference to the State column) describing the purpose of this state. (4 marks) (b) Identify which of the three Phases of Communications this State relates to. (2 marks) (c) Identify which application (client or server) intiated the sequence of events that caused the connection to arrive at this state and what primitive was invoked. (3 marks) Show transcribed image text Two applications, a client and server, are communicating with each other on the same host machine. The netstar command is executed twice on two separate occasions and produces the following outputs (labelled Figure 2 (i) and Figure 2 (ii)): 1. Proto Recv-Q Send-Q Local Address Foreign Address State 3. tcp 4. tcp 5. tep 0 0 26 0 0 0 147.252.234.34:12345 0.0.0.0:* LISTEN 147.252.234.34:12345 147.252.234.34:44901 ESTABLISHED 147.252.234.34:44901 147.252.234.34:12345 ESTABLISHED Figure 2(1) 1. Proto Recv-Q Send-Q Local Address Foreign Address State 3. top 4. tcp 0 0 0 0 147.252.234.34:12345 0.0.0.0:* LISTEN 147.252.234.34:12345 147.252.234.34:44901 TIME WAIT Figure 2(11) (1) In relation to Figure 2 (i), line 5. You are required to: (a) Identify which application this line refers to, client or server. Justify your answer with reference to the data displayed in the figure. (3 marks) (b) Explain what the number in the Recy-Q column refers to and identify what Primitive must be invoked in the associated application for this number to reduce to zero. (3 marks) In relation to Figure 2 (ii), line 4. You are required to: (ii) (a) Explain the current status of the connection (with reference to the State column) describing the purpose of this state. (4 marks) (b) Identify which of the three Phases of Communications this State relates to. (2 marks) (c) Identify which application (client or server) intiated the sequence of events that caused the connection to arrive at this state and what primitive was invoked. (3 marks)

Expert Answer


Answer to Two applications, a client and server, are communicating with each other on the same host machine. The netstar command i…

Two Ascii Strings Trying Convert Bit String Mips Qtspim Converting Ascii Strings Bit Strin Q43783675

I have two ASCII strings and I am trying to convert them into abit string in MIPS QtSpim. Converting the ASCII strings into bitstring are already done in one of the subprograms called Binary.However, I need help with printing the bit strings that aregenerated in the Binary subprogram. Here are the ASCII strings:

HELLO WORLD#!3 (str1 in the code)

CRLEO93 (str2 in the code)

.data

wrd1: .word 0

wrd2: word 0

main:

        la $a0, str1 # Loadand print string asking for string
       li $v0, 4
       syscall

       li $v0, 8 # take in input

       la $a0, str2
       jal Binary
       sw $v0, wrd1

la $a0, str4

jal Binary

   sw $v0, wrd2

Binary:

           # $a0 parameter contains string

           # $v0 used for the BinarySet

           # $t0 used to hold nextChar in the string

           # $t3 used to hold the mask for the str[j] character

                       li $v0, 0   # BinarySet is set as empty set

outer: lb $t0, 0($a0)

                       beq $t0, 0, end_outer #end of string

inner: blt $t0, 97, end_inner # ‘a’ value is 97

                       bgt $t0, 122, end_inner # ‘z’ is 122

                       addi $t0, $t0, -32    # capitalize ASCIIcharacter

end_inner:

inner2: blt $t0, 65, end_if_2   # ‘A’ is 65

                       bgt $t0, 90, end_if_2 # ‘Z’ is 90

                       addi $t8, $t0, -65 # determine bit position

                       li $t3, 1 # Build mask

                       sllv $t3, $t3, $t8 # Continue to build mask

                       or $v0, $v0, $t3 # update BinarySet by bitwise OR

end_inner2:

                       addi $a0, $a0,1           #walk-pointer to str[index+1]

                       j outer

end_outer:

                       jr $ra

Expert Answer


Answer to I have two ASCII strings and I am trying to convert them into a bit string in MIPS QtSpim. Converting the ASCII strings …