Homework-3 Course Grade Application • Create 5 students. Ask these students from the user. • Each of these students should have a midterm grade, project grade, and final grade. • Each student will have a course passing grade. • passingGrade = midterm * (0.3) + project * (0.3) + final * (0.4) passing grade should be determined like this. • Create a dictionary that keeps these students' information. Calculate the students' grades and transfer them to the list with the help of indexing. Finally, set the student with the highest grade to be in the first index and the student with the lowest grade to be in the last index of the list.
Q: please solve these 1. Create three dictionaries: dic1 = {1:10, 2:20} dic2 = {3:30, 4:40} dic3 =…
A: **Kindly Note: As per our company guidelines we are supposed to answer only first 3 sub-parts.…
Q: T F: The Karate School Manager application requires you to write special event handling code that…
A: The Karate School Manager application do not require special event handling code .
Q: Course information Write a program that creates a dictionary containing course numbers and the room…
A: Required: 1. Course information Write a program that creates a dictionary containing course numbers…
Q: # Create Student class with attributes name,department,year and GPA # Student class has also static…
A: In Python, The __str__ method in Python represents the class objects as a string it can be used for…
Q: Assume the variable dct references a dictionary. Write an if statement that determines whetherthe…
A: Note: Below is the required program in the python language. Program Approach: Defining the…
Q: What will be displayed after the following code executes? (Note: the order of the display of entries…
A: The following code is written in python programming language and is solved below:
Q: A ValueError exception is raised if you try to retrieve a value from a dictionary using a…
A: Given: A ValueError exception is raised if you try to retrieve a value from a dictionary usinga…
Q: Detailed answer please. Thank you! Following is part of member function insertSorted() in class…
A: Following are the code to the given code: Node* current = head;//use pointer to hold head value…
Q: Create a program, luke.py, using the following dictionary: relations = {'Darth Vader':'father',…
A: NOTE : Since language is not mentioned. Therefore answering in Python language. First create a…
Q: Javascript createSelectOptions function The function createSelectOptions should exist. The…
A: Answer: our instruction is answer the first three function from the first question.
Q: Create a new dictionary called prices_stocks using {} format like the example below.…
A: Python code for above : price_stocks = {}price_stocks['banana'] = [4,5]price_stocks['apple'] =…
Q: Create an application to keep track of a list of students and their grades in a data structures…
A: PROGRAM: Student.h: #pragma once #include <iostream> using namespace std; class Student {…
Q: create a program called automobile loan
A: a) The following is the required Pseudo code to create the class AutomobileLoan. class…
Q: Please solve this using JavaScript. Build a key-value data structure that allows the user to take a…
A: main.js class DataStructure { takeSnapshot() { // creating the snapshot this._snapshot =…
Q: True or FalseAn application works directly with a database, modifying rows, deleting rows, adding…
A: An application needs a DataSet object for the database. The data can be modified after the DataSet…
Q: Assume the variable de finitions references a dictionary. Write an if statement that determines…
A: A dictionary is a Python container that maintains mappings of unique keys to values in an unordered…
Q: Create Teacher class with attributes (name,department,year) and GPA. Teacher class has also static…
A: 1. static members created outside __new__() and __init__() methods 2. initializtion done inside…
Q: Grade Roster Sort (file I/O) My Solutions The file RosterScores.txt contains student test scores…
A: Here is your solution: fileName = "RosterScores.txt"; % here we are reading the file data details…
Q: In the starting code, there is a dictionary variable dictMenu. This dictionary has keys that are…
A: the code along with the screenshot of the output is given below
Q: interface IDictionary{ public String getValue(String key); //Returms the value to which the key is…
A: Java supports object oriented programming. A class can implement the method of an interface using…
Q: 7. Employee Management System This exercise assumes you have created the Employee class for…
A: The following information has been provided for the question above: "Screen shot of python code"…
Q: Javascript createSelectOptions function The function createSelectOptions should exist. The…
A: I wish undefined was a function in JavaScript.” There are four ways a function can be created in…
Q: Mainjava - Notepad Mainjava - Notepad Order, Item, Customer File Edit Format View Help Edit Format…
A: SELECT a.ord_no,a.purch_amt, b.cust_name,b.city FROM orders a,customer b WHERE…
Q: OOP Create a struct Rectangle where a rectangle is defined by Length & Width. Each Rectangle has an…
A: as per Bartleby guidelines we are supposed to answer?️ only one question. Kindly repost other…
Q: Create a Windows Form application to accept Index Number, Name, and Marks in 5 subjects of a student…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: Create an application to keep track of a list of students and their grades in a data structures…
A: The, given options are: o Add a student -- add the student if he/she is not already in the classo…
Q: The function below, get_value_if_key, takes two arguments: the dictionary data_dict and a key of any…
A: In Python, to access all the available keys in the dictionary, keys() method is used. It returns a…
Q: Here the data dictionary of this application: An editor includes the following attributes:…
A: Starting with knowing some information about Data Dictionary, Entity Relationship Diagram and…
Q: Description In this series of exercises, you will create functions to create, modify and examine…
A: Answer:- The dictionary representation and function may vary from what is shown in the question****…
Q: You cannot create a shared pointer that does not reference an object. O True False
A: According to the information given:- We have to choose the correct option to satisfy the statement.
Q: Create a function that restores the frequency of distribution of the same members. This function…
A: created the constant the frequency created the variable to store the frequency Iterate over the…
Q: Java Project: Overview: Next year, God willing, Arab Open University will organize an international…
A: Answer:
Q: Create a program, luke.py, **** By using "sys.argv" **** using the following…
A: Solution :
Q: #include using namespace std; struct Node { int data; struct Node *next; }; struct Node* head…
A: In doubly linked list is one in which all nodes are linked together by multiple no.of links. A…
Q: 3. form_letter This function takes a list of dictionaries, where each dictionary has an entry of…
A:
Q: A Dictionary object’s Remove method returns an integer indicating the number of elements that were…
A: Remove method used for :
Q: Statements Yes No Usert can delete Case4. User3 can add members to Case2. User4 can close Case3.
A: Please refer to the following step for the complete solution of the problem above.
Q: Fill the write here portion please // write here //write here
A: There is a Bootstrap Code snippet given. Code: <!-- Testimonials --> <section…
Q: Sample Menu: Main Menu --------------- Press 1 to add a Course Press 2 to update a Course Press 3 to…
A: Given, Create a menu in main function to enable user to select and perform the operations we created…
Q: create a python functions outlined below reverse_number_in_list(number_list:list)-> list This…
A: Python used to answer this question
Q: Course information Write a program that creates a dictionary containing course numbers and the room…
A: Program # Define the dictionary dict ={} # Insert data into dicitonary dict1 = {1: ["CS101",…
Q: statement do
A: Assuming food is a Dictionary, the given statement do
Q: python: In this assignment, you will use a dictionary called balances to track money balances for…
A: balances = {"account1":4352.34,"account2":6557.12}def depositMoney(name,amount): if name in…
Q: Input 23 166 Output My age is 23 and my height is 166. I work 20 hours per week in Human…
A: I have provided PYTHON CODE along with CODE SCREENSHOT and also provided OUTPUT…
Q: 4. In main(), create a dictionary linking rooms to one another and linking items to their…
A: Given: create a dictionary linking rooms to one another and linking items to their corresponding…
Q: Add a command to this chapter's case study program that allows the user to view the contents of a…
A: • filesys is the program that obtains information about the filesystem present in the PC. • When…
Q: Create a structure course with some attributes i.e course_ID, course_title, credit_hrs etc.. Then…
A: #include<iostream>#include<stdlib.h>using namespace std;struct COURSE{ int course_ID;…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- get_total_cases() takes the a 2D-list (similar to database) and an integer x from this set {0, 1, 2} as input parameters. Here, 0 represents Case_Reported_Date, 1 represents Age_Group and 2 represents Client_Gender (these are the fields on the header row, the integer value represents the index of each of these fields on that row). This function computes the total number of reported cases for each instance of x in the text file, and it stores this information in a dictionary in this form {an_instance_of_x : total_case}. Finally, it returns the dictionary and the total number of all reported cases saved in this dictionary.Code in pyhton. 2.Assume the following list exists: numbers = [1, 2, 3, 4, 5] Write a statement that uses a dictionary comprehension to create a dictionary in which each element contains a number from the numbers list as its key, and the product of that number times 10 as its value. In other words, the dictionary should contain the following elements: {1: 10, 2: 20, 3: 30, 4: 40, 5: 50}1. Course informationWrite a program that creates a dictionary containing course numbers and the room numbers ofthe rooms where the courses meet. The dictionary should have the following key-value pairs:Course Number (key) Room Number (value)CS101 3004CS102 4501CS103 6755NT110 1244CM241 1411The program should also create a dictionary containing course numbers and the names of theinstructors that teach each course. The dictionary should have the following key-value pairs:Course Number (key) Instructor (value)CS101 HaynesCS102 AlvaradoCS103 RichNT110 BurkeCM241 LeeThe program should also create a dictionary containing course numbers and the meeting timesof each course. The dictionary should have the following key-value pairs:Course Number (key) Meeting Time (value)CS101 8:00 a.m.CS102 9:00 a.m.CS103 10:00 a.m.NT110 11:00 a.m.CM241 1:00 p.m.The program should let the user enter a course number, then it should display the course’s roomnumber, instructor, and meeting time.
- def sw_vehicle_search(cargo_capacity: int, max_speed: int, cost: int) -> list: This function will use the https://swapi.dev/ API to collect its information. This function is meant to be used to search for vehicles in Star Wars that meet the specified criteria. The function should return a list of names of the vehicles that have cargo capacities and a max speed greater than or equal to the value specified but also cost less than or equal to the cost given. Vehicles with "unknown" or "none" for any of the mentioned categories should not be regarded. Keep in mind that not all of the vehicles in star wars are returned in one request to https://swapi.dev/api/vehicles/. The JSON object returned by this request has a next attribute that represents the next page of information. You must make multiple requests for each page to collect all vehicle information. You might find it helpful to use the following API handle(s): https://swapi.dev/api/vehicles/ - to retrieve all vehicles in Star Wars…def sw_vehicle_search(cargo_capacity: int, max_speed: int, cost: int) -> list: This function will use the https://swapi.dev/ API to collect its information. This function is meant to be used to search for vehicles in Star Wars that meet the specified criteria. The function should return a list of names of the vehicles that have cargo capacities and a max speed greater than or equal to the value specified but also cost less than or equal to the cost given. Vehicles with "unknown" or "none" for any of the mentioned categories should not be regarded. Keep in mind that not all of the vehicles in star wars are returned in one request to https://swapi.dev/api/vehicles/. The JSON object returned by this request has a next attribute that represents the next page of information. You must make multiple requests for each page to collect all vehicle information. You might find it helpful to use the following API handle(s): https://swapi.dev/api/vehicles/ - to retrieve all vehicles in Star Wars…Create a static dictionary with a number of users and with the following values: First name Last name Email address Password Ask the user for: 5. Email address 6. Password Loop (for()) through the dictionary and if (if()) the user is found print the following: 7. Hello, first name last name you have successfully logged in 8. Notify the user if the password and email address are wrong 9. Additional challenge: if you want the program to keep asking for a username and password when the combination is wrong, you will need a while() loop. 10. Save the file as assignment03yourlastname.py
- Answer the given question with a proper explanation and step-by-step solution. For this question use the file data1.csv The file contains information on various customers. Each customer has a unique customer id. The data also has information on age income and Gender of the customers. Space can be used as a delimiter for this file. Find the following: A) The total number of the rows in the file. B) The number of unique customer ids in the datafile. For this question create a set object which will only allow you to add unique customer ids. C) The program asks user to provide an id and prints information about that customer. Make sure to take care for the errors due to invalid id (i.e., id does not present in data). Print “id not found” when id is not found. Save the file as Solution1.java. You can use either File Reader or Scanner classes to read the data in the csv file. Your program should print the following after filling the blanks with the appropriate values Outcome: The total…Create a dictionary (order_dict) that the key is the burger number, and the value is a list of the quantities. For example: order_dict which is {'1': [10, 3, 78], '2': [35, 0, 65], '3': [9, 23, 0], '4': [0, 19, 43], '5': [43, 0, 21]} Create a dictionary (total_order_dict) that the key is the burger number, and the value is the total of the quantities for that burger. For example: total_order_dict which is {'1': 91, '2': 100, '3': 32, '4': 62, '5': 64} Use "assert to test the values of the total_order_dict For example: expected_result_ototal_order_dict = {'1': 91, '2': 100, '3': 32, '4': 62, '5': 64} assert actual_result_ototal_order_dict['1'] == expected_result_ototal_order_dict['1'] , "The actual result is not the \same as expected result for the order number 1!" (and test the other elements) The function can be like: def test_sum(): #Testing assert actual_result_ototal_order_dict['1'] == 91, "The actual result is not the \ same as expected result for the…Exercise: Check Monster Character Exists Description In this series of exercises, you will create functions to create, modify and examine dictionaries that represent characters in an animated film, and the cast members who voice the characters. The keys of the dictionary will be character names. The values in the dictionary will be voice actor names. For this exercise, you will create a function that checks if a character is already in the dictionary. Files monsterfunctions.py : set of functions to work with monster cast dictionaries. Function Name has_character Parameters monsters: a dictionary character: a string, the name of a character Action Checks if character is a key in monsters. Return Value True if character is a key in monsters, otherwise False. Examples monsters = create_monster_cast() monsters = add_cast_member(monsters, "Mike", "William Crystal") has_character(monsters, "Mike") -> True has_character(monsters, "Sully") -> False
- //inserts e at index ind publicvoidadd(intind,Te){ //if index is invalid display a message and return //valid index are 0 to size //push all elements up by one all the down to index ind (stop at index ind) //insert e at index ind //increase the size }C++main.cc file #include <iostream>#include <map>#include <vector> #include "bank.h" int main() { // =================== YOUR CODE HERE =================== // 1. Create a Bank object, name it anything you'd like :) // ======================================================= // =================== YOUR CODE HERE =================== // 2. Create 3 new accounts in your bank. // * The 1st account should belong to "Tuffy", with // a balance of $121.00 // * The 2nd account should belong to "Frank", with // a balance of $1234.56 // * The 3nd account should belong to "Oreo", with // a balance of $140.12 // ======================================================= // =================== YOUR CODE HERE =================== // 3. Deactivate Tuffy's account. // ======================================================= // =================== YOUR CODE HERE =================== // 4. Call DisplayBalances to print out all *active* // account…void dict_clear (dict_t* dict); This function clears the dictionary dict, destroying each pair key/value, but does not destroy dict itself (remember that dict was allocated using dict_create, so it will need to be freed at some point, but this is not this function’s job.) This is now the function that frees (destroys) a dictionary: void dict_destroy (dict_t* dict); This operates just as dict_clear, but in addition should free the memory that was allocated during dict_create. After a call to this function, if any other library function receives the pointer dict, the behavior is undefined (most likely, it will crash). This simple function returns the current size of the dictionary: size_t dict_size (const dict_t* dict);