omputer Science Code need to be python. Please comment all lines of code. Thank you (: 1. Create a dictionary of 7 countries and their capitals, then turn it into a list of sub list, each sub list contains two elements, a country and its capital. Ask the user to enter a country, the program should return its capital.
Q: What was the driving force behind the computer's creation?
A: Introduction: A computer can store and process data, typically through a binary system comprised of ...
Q: When was the first tablet computer created, and by whom?
A: When was the first tablet computer created Ans:- 1989
Q: When you issue the ping command, what protocol are you employing to communicate with your computer?
A: The answer is given below:-
Q: What is the correct order for converting the source code into an executable file? Answer Choices: a....
A: The correct order is
Q: Using python Write a program to compute and print the month‑end balance. Input Last...
A: LastName = []PreviousBalance = []Payments = []Charges = [] print("LastName PreviousBalance Payment...
Q: - Convert each of the following decimal numbers to excess-5code: a- (76)10 (67)1o then add the two n...
A: In Excess 5 code each decimal digit is added by 5 (0101) and their equivalent excess 5 code is calcu...
Q: 1. This type of topology is highly reliable. A failure to one or a few nodes does not usually cause ...
A: Correct Option Mesh topology Explanation:- Mesh topology is highly reliable as in this topology thei...
Q: Distinguish between dialogue and user interface design.
A: Introduction: The sequence of interaction between a user and a system is reflected in a dialogue. An...
Q: What would you write to make a subnet exception?
A: Introduction: A subnetwork is like a logical subdivision of an IP network. As a result, an IP addres...
Q: JAVA LAB PROGRAMMING Write a Java program to find and display all substrings of a user entered strin...
A: Code: import java.util.Scanner; public class Main{ public static void main(String args[]) { ...
Q: Which of the ff. input string/s send the ff. finite-state automaton to an accepting state? S2 Start ...
A: We are given a finite automation and we have to see which of the given string can lead to accepting ...
Q: Write a program that prompts the user for five integers from the keyboard and stores them in a list....
A: Start Take user input values Find the values lessthan last value Print values Stop
Q: Create the ER Diagram for each problem; use the space provided to draw your answer. Many PASSENGERs...
A: In many to many relationship, many record in one table is associated with many records in another ta...
Q: 3.11 Add shear to the instance transformation. Show how to use this expanded instance transformation...
A: A unit cube, also known as a cube of side 1, is a cube with sides that are each one unit long. A 3-d...
Q: 5- What is the ROM size requird to implment a circuit that calculates B A2 if A is 4 bits fflin.flon...
A: Question: What is the ROM size required to implement a circuit that calculates B=A2 if A is 4 bits A...
Q: Android Studio Java Create a detailed plan to implement the app and submit this file The plan shou...
A: Answer: Our instruction is answer the first three part from the first part and I have given answer i...
Q: Using pointer arithmetic, update nthCharPtr to point to the 4th character in oddOrEven.
A: Arithmetic operation on pointers is like normal arithmetic operations only but the difference is tha...
Q: The ff. two graphs are isomorphic: A J E K False O True F.
A: Due to company policies I am compelled to solve only 1 question and that is the first question. Plea...
Q: Based on the fleet management process and workflow described in the case study develop a comprehensi...
A: The leadership of the Fleet: Franchise management is an approach that focuses on maximizing the busi...
Q: our organization is in the process of migrating to a newer enterprise resource planning application....
A: Windows Server 2016 is the successor to the Windows Server 2012 R2.
Q: Discuss the revocation problem with respect to access control lists and capabilities. How might one ...
A: Answer: I have given answered in the brief explanation
Q: Write a Java program JoiningNames that uses the Scanner class to read 3 strings from the user: their...
A: Algorithm: Start Read first name i.e fname, middle name i.e mname and last name i.e lname from the ...
Q: What does it mean to have a future embedded computer?
A: An embedded system is a group of devices which do a specific task. It consists of both hardware and ...
Q: Given the problem of basic multiplication: Input: Two n-digit nonnegative integers, x and y. Output:...
A: Lets see the solution.
Q: At various points throughout the other functions, we’re going to want to see the state of the board ...
A: Algorithm: Start Implement a method named print_board() which takes a list as an argument Inside th...
Q: Suppose you have a RISC machine with a 2.7 GHz clock (i.e., the clock ticks 2.7 billion times per se...
A: The answer is
Q: What error might we get when running the following code? Assume obj is an instance of some class. ob...
A: b. TypeError: robo() takes 3 positional arguments but 2 were given.
Q: How features provide in android supported by core libraries?
A: The solution for the above given question is given below:
Q: How to import the CSV file then display the state with the highest and lowest number of cities from ...
A: Loading csv file in python You can load a csv file in python into pandas data frame by importing pan...
Q: A. If a minor offense is committed by a driver, a fine of GHs 50 should be charged and the driver ca...
A: Program Explanation: Declare the header files Declare and define the main function Declare a variab...
Q: What is the time complexity of deleting an element from a sorted array? Does it have better time com...
A: What is the time complexity of deleting an element from a sorted array? Does it have better time com...
Q: B- Answer the following questions? 1. Multiply (10010), (11110), using binary multiplication method?...
A: Binary numbers are those numbers that are converted from decimal to binary by dividing by 2 and taki...
Q: After discovering that one of her students tweeted foul language about her, a school teacher confro...
A: Bullying on the Internet: Twitter and Facebook have benefited our society by increasing and varying ...
Q: 10.2.2.3 Identification Identification-based loT protocols are an interface to identify the tag/devi...
A: The question is identification-based IoT protocols are an interface to identify the /device using a ...
Q: Explain What Is Difference Between Baseband And Broadband Transmission?
A: Baseband and Broadband are both networking techniques. Both have their own specific advantages as ...
Q: Why and how are local minima a problem for k-means clustering? How can we address these?
A: Given: Why are local minima an issue for k-means clustering and how can they be avoided? What can we...
Q: inversion in an array is a pair of elements that are "out of order," meaning th hat is the largest-p...
A: Lets see the solution.
Q: Alice and Bob use the ElGamal scheme with a common prime q = 131 and a primitive root a = 6. Let Bob...
A: The answer is
Q: give 1 sample process that can be executed in kernel components.
A: Under Linux kernel: During Microkernel, a function can program I/O Controller buttons, operate OS sy...
Q: a) The grammar G is described by its vocabulary V = {a, b, c, A}, Production P = {A - ab, A - abc, A...
A: ANS:
Q: How does Health Insurance Portability and Accountability Act (HIPPA)it affect the Financial and IT p...
A: iNTRODUCTION: A Health Insurance Portability and Accountability Act of 1996 (HIPAA) is a federal law...
Q: Discuss the characteristics of the DIFFERENT TYPES OF ARGUMENT & TYPES OF VARIABLE in Python Program...
A: As we know in python programming there are five Types of Arguments in Python Function Definition:...
Q: 18 IBM Spectrum Virtualize on Public Cloud initially launched with support for IBM Cloud and Amazon ...
A: Given statement: IBM Spectrum Virtualize on Public Cloud initially launched with support for IBM Clo...
Q: Activity 1: Describe how communication is influenced by Use a separate sheet for your answers.
A: NOTE: ACCORDING TO COMPANY POLICY WE CAN SOLVE ONLY 1 QUESTION. YOU CAN RESUBMIT THE QUESTION AGAIN ...
Q: Write a program in C# Sharp to create a user define function with parameters. Test Data : Please in...
A: Please find the answer below :
Q: List the following functions by increasing order of growth. Here are the functions: f:(n) = n" f2(n)...
A: The functions listed by increasing order of growth f5(n) f3(n) f4(n) f1(n)
Q: -In CMOS gates, what occurs when the frequency of the input signal increas A) The power dissipation ...
A: Question: In CMOS gates, what occurs when the frequency of the input signal increases: A) The power ...
Q: Write a C++ program to find the sum of first and last digit of a user entered number.
A: Required:- Write a C++ program to find the sum of the first and last digit of a user-entered number....
Q: How can you build a network of precedence?
A: Introduction: The precedence diagram method (PDM) is a technique for planning tasks within a project...
Q: ~p →r^~. b. а. t - S и u →~p d. e. u V w
A: Lets see the solution.
Computer Science
Code need to be python. Please comment all lines of code. Thank you (:
1. Create a dictionary of 7 countries and their capitals, then turn it into a list of sub list, each sub list contains two elements, a country and its capital. Ask the user to enter a country, the
Step by step
Solved in 4 steps with 2 images
- python exercise: Write a Python function called get_top_students that takes the list of dictionaries as input and returns a dictionary containing the name and GPA of the top two students in the list. Each dictionary has the following keys: "name", "age", "major", and "gpa".Capital QuizWrite a program that creates a dictionary containing the U.S. states as keys, and their capitals as values. (Use the Internet to get a list of the states and their capitals.) The programshould then randomly quiz the user by displaying the name of a state and asking the userto enter that state’s capital. The program should keep a count of the number of correct andincorrect responses. (As an alternative to the U.S. states, the program can use the names ofcountries and their capitals.) in phytonDate: 26th April 2021 Course: BIT1054 Fundamental of Computational Thinking: Python d) Write a Python program that stores information below in a dictionary. Then, update the age to 19 years old and add another entry named 'College' with value 'City University'. Print out the age and college. Name: Lee Chong Wei Age: 20 Course: Computer Science [5 marks] Answer:
- Complete the following statements about a Python dictionary. Strings be used as keys of a Python dictionary. Floats be used as keys of a Python dictionary. be used as keys of a Python dictionary. Lists Dictionaries can cannot be used as keys of a Python dictionary.Question 1 Write a Python program which will take N names from the user. Create a dictionary from the N names that will hold First_name, Middle_name and Last_name in separate keys. The inputs will take N at first and then take N names. You can assume that the names will contain less than or equal 3 words and there will be single space between each part of the name. Sample Input: 4. Zubayer Ahmed Sadia Nur Amin Mehedi Hasan Shawon Nafis Sample Output: { "Fname" : ["Zubayer", "Sadia", “Mehedi", “Nafis"], "Mname" : ["Nur", "Hasan"], "Lname" : ["Ahmed", “Amin", “Shawon"] }Overview This program will have you cut and past a dictionary called food_dict from the specifications, the programmatically go through the list to find people who have not yet listed their favorite foods. It will then ask for their foods, update the dictionary, and finally print it at the end. Note: I will change the dictionary during grading Expected Output Example 1 What is Janelle's favorite food? Steak What is Thomas's favorite food? What is Yolanda's favorite food? Soup Here are the favorite foods: Jim's favorite food is Tacos Bob's favorite food is Burgers Janelle's favorite food is Steak Lisa's favorite food is Pizza Thomas's favorite food is Pho Yolanda's favorite food is Soup Finn's favorite food is Bread Specifications • You should submit a single file called M4A5.py • It should follow the submission standards outlined here: Submission Standards • Your program must loop through the dictionary to find empty values. • You must copy this dictionary definition to the top of your…
- Please code in python there's a dictionary original_dict = {'jack': 9, 'michael': 48, 'guido': 57, 'john': 33} . Using the generator of dictionaries create a new dictionary, all the entries need to be less than 40 and divide by 3 without the remainder.) (need to use if, multiple conditions)# Using the routes dictionary defining places your airline can go with #with mileage to each, create a function that determines the total #distance travelled by going to the airports in sequence defined by this # list itinerary and the routes dictionary. (No published answer... def summary (routesMap) : # Please do not change any code below... airports = list (routesMap.keys ()) for airport in airports: destinations = routesMap [airport] for n in range (0,len (destinations)): destinationInfo = destinations [n] destination = destinationInfo [0] mileage = destinationInfo [1] print (f"Leaving {airport} to {destination} for (mileage} miles.") def distanceUsing (routesMap, itinerary): milesTravelled = 0 ### Your code goes here. return milesTravelled def main (): # Please do not change this dictionary... routes = { main () "Austin": "Chicago": "Dallas": "Denver": "El Paso": "Houston": "Nashville": summary (routes) [["Chicago", 500], ["Houston", 180], ["Nashville", 86011, [["Austin", 500],…given dictionaries, d1 and d2, create a new dictionary with the following property: for each entry(a,b) in d1, if there is an entry(b,c) in d2, then the entry(a,c) should be added to the new dictionary. assign the new dictionary to the variable d3. using python
- please help me using python solving questions from 2-7. please using python This program will store roster and rating information for a soccer team. Coaches rate players during tryouts to ensure a balanced team. (1) Prompt the user to input five pairs of numbers: A player's jersey number (0 - 99) and the player's rating (1 - 9). Store the jersey numbers and the ratings in a dictionary. Output the dictionary's elements with the jersey numbers in ascending order (i.e., output the roster from smallest to largest jersey number). Hint: Dictionary keys can be stored in a sorted list.Ex: Enter player 1's jersey number: 84 Enter player 1's rating: 7 Enter player 2's jersey number: 23 Enter player 2's rating: 4 Enter player 3's jersey number: 4 Enter player 3's rating: 5 Enter player 4's jersey number: 30 Enter player 4's rating: 2 Enter player 5's jersey number: 66 Enter player 5's rating: 9 ROSTER Jersey number: 4, Rating: 5 J ersey number: 23, Rating: 4 Jersey number 30, Rating: 2 ... (2)…python help, please show all steps and include comments Write a function largerLst() that takes a list of numbers (i.e., int or float values) as a parameter and returns a new list constructed out of it. The list returned has all the values in the parameter list that are larger than the element immediately to their right, that is, larger than their right neighbor. If the parameter list is empty or there are no values larger than their right neighbor, then the function returns an empty list. Note that the last element in the list will never be included in the list returned since it does not have a right neighbor. The function should not change the parameter list in any way. Note that a correct solution to this problem must use an indexed loop That is, one that makes a call to the range() function to generate indices into the list which are used to solve the problem (Review lecture notes 8-1). A solution that does not use an indexed loop will not be accepted. Note in particular that you…Python coding language 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