1,518 Answered Questions for the topic computer science
02/05/23
multiple choice for python
What is the main difference between a dictionary and a list?A list can contain a dictionary however a dictionary cannot contain a list.There is no difference.The items stored in a dictionary are...
more
02/04/23
how to use set to return Mississippi in python
Write an expression that would turn the string "Mississippi" into a set of unique letters.For example:set("Parallel") would return set {"P", "a", "e", "l", "r"}You should only write one line of...
more
02/03/23
how to code this in python?
in python: Using keys and indexing, grab the "hello" from the following dictionaries:6a.d = {'simple_key':"hello"}6b.d = {"k1":{"k2":"hello"}}
02/03/23
how to code this in python
In python: Reassign "hello" in this nested list to say "goodbye" instead:list1 = [1, 2, [3, 4, "hello"]]
02/02/23
how to code this in python
Create a dictionary of technical terms and allow the user to lookup the definitions of these terms from the dictionary. Use the following list for your dictionary:'dict', 'list', 'map', or...
more
02/02/23
how to use comma code in python
Comma CodeSay you have a list value like this:characters = ["Thor", "Thanos", "Black Panther", "Iron Man", "Hulk", "Batman", "Captain America"]Write Python code that coverts the list into a string...
more
02/02/23
how to code this in python
you are creating a fantasy video game. The data structure to model the player’s inventory will be a dictionary where the keys are string values describing the item in the inventory and the value is...
more
02/02/23
how to merge dictionaries in python
in python: Create the same dictionary as in exercise 3 but also create a second dictionary with only the season of Winter. Use the dictionary.update method to merge the winter dictionary into the...
more
02/02/23
How to use dictionary in python
in python: Create a dictionary of the seasons Fall, Spring and Summer where the name of the season is the key and the value is a list of the months in that season. Print the value of "Fall".
02/02/23
how to do dictionaries in python
In python: Use any names and birthdays you want to create a birthday dictionary that has four entries. The name is the key and the value is the birth date. Print each birth date by using the key...
more
Computer Science
02/02/23
Convert the following into Binary with Floating-Point representation. (If the conversion is infinite, please stop according to floating point convention of half word) The bias for 16 bits is 15
8
-9.25
02/01/23
How to slice the following code
In python:Use the slicing syntax of lists to get every other entry in the following list starting at the beginning and print the results.['a','b','c','d','e','f','g']Sample output:['a', 'c', 'e', 'g']
more
02/01/23
how to slice in python
In python: Use the slicing syntax of lists to get the first 4 numbers in the following list and print out the results.[1,2,3,4,5,6,7,8,9]
02/01/23
How to get a list of str and turn them to ints to add
Use the string.split method create a list of numbers from the following string and then sum up the numbers. Print the sum to the screen.'90,67,87,102,77,80'
Computer Science
02/01/23
Convert the following to Binary using 16 bits. Please note that negative numbers are represented with 2's complement
1) 65535 (unsigned)2) -725 (signed)
Computer Science
02/01/23
What is the importance of big O notation in algorithm analysis?
Computer Science
01/30/23
Using 2's compliment form, what is 42-18? Please show all the steps.
Computer Science
01/28/23
Given four values representing counts of quarters, dimes, nickels and pennies, output the total amount as dollars and cents.
Code must be done in C.Output each floating-point value with two digits after the decimal point, which can be achieved as follows:printf("Amount: $%0.2lf ", dollars);Ex: If the input is: 4 3 2...
more
Computer Science
01/25/23
Cos Finder C++ (Simpler the better!)
Read in an angle in degrees and the length of the adjacent side to that angle in a right triangle (both as doubles). Print the length of the hypotenuse of the triangle.Use the formula hypotenuse =...
more
Computer Science Data Science
01/25/23
how to create a lucid ER diagram of a movie scenario
NetFlicks (NF) (not to be confused with Netflix) needs to create a database to manage the operations of their online movie streaming service.NF has the following genres of Films for streaming:...
more
01/24/23
How would I start this program
I have def ted_fruit(fruit,fruit_quantity,fruit_cost). Ted, the TA, wants to buy fruit from the grocery. Define a function named ted_fruit(fruit, fruit_quantity, fruit_cost) that takes in the name...
more
01/23/23
Code troubleshooting
Fruit_List = ["apple", "pear", "peach", "banana"]
Fruit_Name = input("Enter Fruit of Choice Here: ")
Fruit_Count = 0
for Fr in Fruit_List:
if Fr.lower() == Fruit_Name.lower():
...
more
Computer Science Python
01/23/23
To add a curve to the amount of grades being printed.
Code in python. Given the following list of student test scores, apply a class "curve" to each score. The class curve is as follows: 90 or above: no curve80 to 90: +2 points70 to 80: +5 pointsLower...
more
Computer Science Python
01/23/23
indentation error
sentence = input("Enter a word:")
vowel_count = 0
for i in sentence:
if(i == "a" or i == "e" or i == "i" or i == "o" or i == "u"):
vowel_count = vowel_count + 1
print("Total vowel count :",...
more
Computer Science Python
01/23/23
How to do a for loop to do this
#3.2 Find the vowels – for loop (4.5 points)Using the 'if' statement and the 'or' operator, write a program that uses the input() function and asks the user for a word or sentence.Print the number...
more
Still looking for help? Get the right answer, fast.
Ask a question for free
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Find an Online Tutor Now
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.