756 Answered Questions for the topic Python

How to assign seats to the passengers maintaining social distancing?

Imagine there are 30 people in line to board a train that seats 100. However, per currentregulations there must be at least two empty seats between each pair of passengers. Theregulations are not... more

Create Gradebook Simulator in Python

I need help writing a program that allows a user to do one of five things at a time: 1. Add students to database. • There should be no duplicate students. If student already exists, do not add the... more
Python Math

10/27/20

Moving a point on a grid

If I had a point of a graph (x,y) and it was being pulled in several directions, but some of the directions had a stronger pull, how would I know where the point would end up. For example a point... more
Python

10/27/20

Python Programming

7.24 (AI PROJECT: INTRODUCING HEURISTIC PROGRAMMING WITH THE KNIGHT’S TOUR) An interesting puzzler for chess buffs is the Knight’s Tour problem, originally proposed by the mathematician... more

10/26/20

Recursive Programming Basics

What is a recursive function and how is it implemented in Python?
Python

10/26/20

python for everyone.

i did this sum = 0for i in range(0, 101):   if i%2 == 0:       sum = sum + ibut when i am trying to run it, it dont give me any answers. please help
Python Science

10/23/20

Neural network on categorization of animals using python

I want to know how young children categorize animals. What features (colour, amount of legs, etc) are they using to identify what the animal is. For example, if they were exposed to a white dog... more

Creating a Song Search Program with Python

Could someone help? I need to Create an empty dictionary a variable named song search Repeatedly prompt the user to enter either the title of a song or enter nothing if they have no more songs to... more

Write a python program

Write a python script to take two values as string (using raw_input) and convert it into a multiple lists which appears like matrix. Sample string input: 3 5 Sample O/P:       [0, 0, 0, 0, 0] [0,... more
Python

10/15/20

Python question concerning computational complexity

Determine the tightest simple bound of the worst-case computational complexity of the following function in terms of the size of the input list (n=len(lst)) and justify your answer. For that,... more
Python

10/15/20

Python question

To show that an assertion A is a loop invariant, is it enough to argue that the execution of the loop body preserves A? Justify your answer.

Creating a Name-Sorting Program in Python

Hi I really need help in my programming class with this assignment!!!Write a function named split_name which takes one parameter called name. If the name parameter value is a name in the form... more

10/12/20

Write a function in python-

To print this square of 6x6+ - - - - +| || || || |+- - - - +I'm not able to do it, it seems a little difficult
Python

10/03/20

Looking for assistance with obtaining data from nested JSON data

Hello,I am hoping someone can provide some advice on how to extract data from the following dataset - https://ped.uspto.gov/peds/ If you click on the JSON tab for the entire dataset, I am trying to... more

How can I print these elements of the list in python?

The list is given [ 1, 2, [3, 4, 5], [6, 7]]. How can show the output as 1, 2, 3, 4, 5, 6, 7.
Python

09/15/20

what is the result of >>>print(3+11)

09/08/20

Insert/Display an image from a list on Python. NEED HELP ASAP!!!

I am currently writing a program that requires these 5 criteria:1. Display all U.S. States in Alphabetical order along with the Capital, State Population, and Flower 2. Search for a specific state... more

Write a program in python using tuple if possible.

Pure Gems Store sells different varieties of gems to its customers. Emerald, Ivory, Jasper, Ruby, Garnet and their prices are 1760, 2119, 1599, 3920, 3999 respectively. Write a Python program to... more

09/02/20

Python code using an array at GCSE level

Hello, I'm having trouble converting this algorithm into a python code using an array. The algorithm is that: the code asks the user for input (of a integer) for the value of a,b,c,d,m and n. It... more
Python Java C++ Usaco

08/09/20

What do you know about USACO?

I have no coding background. I don't know where to start studying for USACO?Which programming language is the best for USACO?
Python

07/26/20

Complete the function to remove a dictionary item if it exists

#Task 11# Complete the function to remove a dictionary item if it existsdef removeDictItem(mydict, key): # expected output: {'tomato': 'red', 'lime': 'green'}print(removeDictItem({'tomato': 'red',... more
Python

07/26/20

Complete the function to remove a dictionary item if it exists

#Task 11# Complete the function to remove a dictionary item if it existsdef removeDictItem(mydict, key): # expected output: {'tomato': 'red', 'lime': 'green'}print(removeDictItem({'tomato': 'red',... more
Python

07/26/20

Complete the function to print the full name of the month using the calendar library

import calendar# Complete the function to print the full name of the month using the calendar library def printMonthName(monthNum): # expected output: MarchprintMonthName(3) # expected output:... more
Python

07/26/20

Complete the function to print the full name of the day of the week

import calendar, datetime# Complete the function to print the full name of the day of the weekdef printWeekdayName(year, month, day): # expected output: Friday printWeekdayName(2001, 8, 31) #... more

computer sciiii

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.