Posted on

Write a C program that uses scanf to read in rows and columns and declares a 2D array using those

Write a C program that uses scanf to read in rows and columns and declares a 2D array using those values. The main program also uses scanf to read in the values to store in the 2D array. Then, create a function Transpose to print both the original matrix and the transpose of the matrix. NOTE: The transpose of a matrix is an operator which flips a matrix over its diagonal, i.e., it switches the row and column indices of the matrix. This matrix: 492 715 382 After being transposed, becomes this matrix: 473 918 252 Output example:

Write a C program that uses scanf to read in rows and columns and declares a 2D array using those values. The main program also uses scanf to read in the values to store in the 2D array. Then, create a function Transpose to print both the original matrix and the transpose of the matrix. NOTE: The transpose of a matrix is an operator which flips a matrix over its diagonal, i.e., it switches the row and column indices of the matrix. This matrix: 492 715 382 After being transposed, becomes this mat

Read More

Posted on

1 The Collatz sequence is generated with the following algorithm Start with an integer n If n is

The Collatz sequence is generated with the following algorithm. 1. Start with an integer n. 2. If n is even, divide by 2. 3. If n is odd, multiply by 3 and add 1. 4. Repeat this process with the new value of n, terminating when n = 1. For example, starting with n = 11, the following sequence of numbers will be generated: 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1. Write a MIPS program that prompts the user to enter the starting value n and prints the Collatz sequence. An example run is shown below: Enter starting n = 22 Bonus: Implement a recursive version of the Collatz program without using any loops.

The Collatz sequence is generated with the following algorithm. 1. Start with an integer n. 2. If n is even, divide by 2. 3. If n is odd, multiply by 3 and add 1. 4. Repeat this process with the new value of n, terminating when n = 1. For example, starting with n = 11, the following sequence of numbers will be generated: 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1. Write a MIPS program that prompts the user to enter the starting value n and prints the Collatz sequence. An example run i

Read More

Posted on

Write a Python program to print the sum addition multiply subtract and division of two numbers

Write a Python program to print the sum (addition), multiply, subtract, and division of two numbers of your choice.Start your assignment by creating your program/code in a text editor of your choice. Notepad is an example of a text editor.Download Python from the following website: Download PythonLinks to an external site.Run/execute the Python program you created in a Python window (downloaded in step 2).Add the Python program you created in Step 1 to your Word document. Take screenshots of eac

Read More

Posted on

Using C implement the PersonStudentEmployeeInstructorAdministrator hierarchy of classes that

Using C++, implement the Person/Student/Employee/Instructor/Administrator hierarchy of classes that we used for an example of inheritance at the beginning of the course. There will also be a new class Course that describes a course that a student can take or an instructor can teach. All of these classes will descend from the abstract class A2ListItem, which has the following abstract behaviours:virtual int get_id() returns an integer that is used to search or order a sorted list of objectsvirtua

Read More

Posted on

Write this in Python The goal of this project is to practice your Application and Transport Layer

Write this in Python: The goal of this project is to practice your Application and Transport Layer skills by implementing (i) a cache service for file exchange, and (ii) two reliable data transport protocols. The project will be completed in two phases. In the first phase, all students will implement two versions of the program: one that uses stock TCP1 for reliable data transfer; and one that implements stop-and-wait (SNW) reliability at the application layer and uses UDP for transport. In the

Read More

Posted on

The department of Computer Science has requested from you to design a degree audit application for

The department of Computer Science has requested from you to design a degree audit application for ComputerScience students so that they can follow they degree programs. The application has two input file (a) the Studyplan for the BSc program “Degreeplan.csv” and (b) student transcripts “Transcript_Sid.CSV” as shown in thesample data in page 3. For more information about the degree plan, you can download the degree plan for yourcohort in the department website. For simplicity, the code for elective courses are specified as two letters followedby and a number (for example UE1, SE2, AE2 for the first university elective, second specialization elective andthe second major elective courses, respectively)You need to general a transcript as specified in the A&R including the list of semesters, the courses for eachsemester, their grades, grade points and the semester GPA and total credits. Also, you need to display thecumulative GPA, grade points and credits for all semesters. The program needs to check if the student underprobation (if cumulative GPA is below 2.0 or the GPAs for the last two semesters are below 2.0). In addition,your application advice the student to enroll in the next courses in the degree plan (find the next five courses tobe enrolled in the next semester).You need to write a Python program to analyze the provided information and generate various reports as follows:1. The program should be well-designed using separate functions and the programmer should not use thesame function to perform multiple tasks. In addition, the programmer needs to use functions to reducethe repetition of the same code in different functions.2. Appropriately use various data structures including Lists, Sets, Tuples, Dictionary, and Arrays.3. Use function to read the study plan information to an appropriate data structure as specified in the samplerun.4. Use a function to read the student transcript in an appropriate data structure as specified in the samplerun.5. Use a function that returns the course information for a given course using its course code. For examplethe information for course COMP3203 as follows{“Code” : ”COMP3203”,”Title” : ”Introduction to Data Structures & Algorithms”,"credit" : 3, "category" : ”DR”},6. Use a function to return the GPA point that corresponds to a given grade (for example the GPA for B- is2.7).7. Use a function that returns the GPA and the total credits for a given semester.8. Use a function to display the student transcript for each semester including the course code, title, credits,Grade, Grade Points for each course. In addition to the cumulative GPA and credits for each semesterand for all semesters. You need to write the information to an output CSV file.9. Use a function that checks if the student is under probation and returns either true or false. A student isunder probation if the CGP is below 2.o or the GPA scores for the last two semesters is below 2.0.10. Use a function that recommends returns the next FIVE courses to be enrolled in the next semester. Thisfunction needs to use the student registration information and the Study plan to find the first five coursesthat are not registered by the student yet. For example, in the sample, the student did not takeSOCY1005, ECCE3206, COMP3501, COMP3205 and COMP3401.Page 211. Use an appropriate menu to enable users to repeatedly generate reports using the above functions toperform one of the following tasks.○ Display the semester results is specific course using the course code.○ Display the semester results for a specific semester.○ Display the complete student transcript○ Check if the student is under probation.○ Recommend the next courses to be enrolled in the next semester.12. You may specify additional assumptions if needed.

The department of Computer Science has requested from you to design a degree audit application for ComputerScience students so that they can follow they degree programs. The application has two input file (a) the Studyplan for the BSc program “Degreeplan.csv” and (b) student transcripts “Transcript_Sid.CSV” as shown in thesample data in page 3. For more information about the degree plan, you can download the degree plan for yourcohort in the department website. For simplicity, the code for elect

Read More

Posted on

Create a in c program that does the followingAsks the user for the card that has been played on

Create a in c++ program that does the following:Asks the user for the card that has been played (on the table). Hint: pick one card and get it working, then add a second, then a third. You can also give the user one of several choices to pickAsk the player if they have whatever card (or cards) you think is appropriate.Use a boolean variable to hold the value of whether or not they have a cardMakes a statement that confirms what the user enteredIncludes at least 3 if/else statements to branch

Read More