1,474 Answered Questions for the topic computer programming

02/07/23

how would you write this in python?

Write a function that asks for the age of the user’s dog. Print a string that states the dog’s age in dog years with a conversion rate of 1 human year to 7 dog years.

02/07/23

how to code this in python

Write a function that asks for the user’s name and prints “Hello, “ followed by their name.

02/05/23

how to a join two tables in dbeaver?

I have two tables that I would like to take from. Department: Department_name Employee: first_name, Last_name how would i go about doing that

02/05/23

how to insert these records into a dbeaver app?

INFO:INSERT INTO department VALUES ('R and D', 1, 123456789, '2014-07-14'); INSERT INTO department VALUES ('Finance', 2, 123456783, '2016-02-07'); INSERT INTO department (department_id,... more

02/05/23

how to type a tuple

How do you type the tuple value that has just the integer value 42 in it?t = (42)t = (42,) (The trailing comma is mandatory.)t = (), .insert(42)t = [42,]

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

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 Programming

01/27/23

toss two coins let x be the resulting number of heads and y be the number of tails find the distribution in R

Having a hard time answering this question. Any help would be greatly appreciated.
Computer Programming Python

01/25/23

Python function help

I have to write this same basic function six different times, changing the formula in the function each time. I need help getting the first function right. we have a prompt like this for each of... more
Computer Programming Computer Science Python

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
Computer Programming Computer Science Python

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 Programming Computer Science Python

01/22/23

How to code in python something that will take your inputs of items bought and add them with tax

Calculates the total including sales tax (8.875%) of a shopping trip.Create a total variable and a tax variable. Total the items calculated with tax. Be sure to test if the price is above... more
Computer Programming

01/22/23

12 Recursion (Final)

Create a simple 5-question quiz with three (3) choices that will display the score of the user. The quiz should be about your favorite game/series. Make use of control structures, arrays, and... more
Computer Programming Python

01/21/23

python programming

temperature = int(input("What temperature is the weather today?")) if temperature < 40: print("Wear a warm coat") elif temperature < 70: print("Wear a light jacket") elif temperature... 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.