756 Answered Questions for the topic Python
Python
01/05/23
Can someone help explain this to me in a simple way? And provide a sample? Thanks!
Part 1First create a single .py file that contains both the Country class definition and then a main program that uses instances of that class, similar to the way classSample.py works. The Country...
more
Python
12/29/22
Help would appreciated. I didnt understand how to start.An outline would be great and an easy explanation.
Your task is to create a Python program that creates a list of 1,000 random integers and then provides the user with some descriptive statistical information about the list. This is an exercise in...
more
Python
12/26/22
Maximum You are given N number of inputs. Print the maximum of them after each input.
Maximum You are given N number of inputs. Print the maximum of them after each input.Explanation In the example, you are given 6 inputs 1, 0, 3, 2, 9, 81 is maximum in the input 1.1 is maximum in...
more
Python
12/26/22
Maximum You are given N number of inputs. Print the maximum of them after each input.
Maximum You are given N number of inputs. Print the maximum of them after each input.Explanation In the example, you are given 6 inputs 1, 0, 3, 2, 9, 81 is maximum in the input 1.1 is maximum in...
more
Python
12/26/22
labelling numbers
Write a function with the name show_numbers that takes a number N and print all the numbers from 0 to N with a label to identify the even and odd numbers as shown below 0 EVEN 1 ODD 2 EVEN 3 ODD...
more
Python
12/21/22
The Syracuse sequence for an integer is defined as follows: For any integer n less than 1, it is an empty sequence.
The Syracuse sequence for an integer is defined as follows: For any integer n less than 1, it is an empty sequence. For n = 1, the sequence is simply 1. For any integer n greater than 1, we use the...
more
12/21/22
Write an interactive program that repeatedly asks the user to input a number until "Enter" is hit.
Write an interactive program that repeatedly asks the user to input a number until "Enter" is hit. Your program should create a file named "numbers.txt" where all the numbers are written one below...
more
12/21/22
Write the definition of a class named "Card" which creates a card from a standard deck of cards.
Write the definition of a class named "Card" which creates a card from a standard deck of cards. This class should have the following methods: __init__(self, rank, suit), getRank(self),...
more
Python
12/21/22
What would be the output when the following code is executed:
# What would be the output when the following code is executed:
def sample(L, n):
for i in L:
for j in range(n):
print(i[0] * j)
A = ['How', 'are', 'you?']
t =...
more
Python
12/19/22
write a for loop that displays the following set of numbers: 0,10,20,30,40,50....1000
12/11/22
Solving questions related to Convulated neural network, constructing decision tree and naive bayers theorem
Here is one of the sample questions, but I will get 3 more tomorrow at 2pm est related to the topics above to solve in 2 hours, if you can help kindly let me know, pay will be good. I will upload...
more
Python
11/30/22
11.12 LAB: Dates
Complete the code to implement the following operations:
Complete read_date():
Read an input string representing a date in the format yyyy-mm-dd.
Create a date object from the input string.
Return...
more
Python
11/30/22
11.11 Lab: Unique random numbers (random module)
Given integer inputs seed, how_many, and max_num, generate a list of how_many unique random integers from 0 to max_num (inclusive).
Complete function unique_random_ints(how_many,...
more
Python
11/30/22
11.10 LAB: Quadratic formula
Implement the quadratic_formula() function. The function takes 3 arguments, a, b, and c, and computes the two results of the quadratic formulaThe quadratic_formula() function returns the tuple (x1,...
more
Python
11/30/22
11.9 LAB: Guess the random number
Given the code that reads a list of integers, complete the number_guess() function, which should choose a random number between 1 and 100 by calling random.randint() and then output if the guessed...
more
Python
11/30/22
11.8 LAB: Artwork label (modules)
Define the Artist class in Artist.py with a constructor to initialize an artist's information. The constructor should by default initialize the artist's name to "unknown" and the years of birth and...
more
Python
11/30/22
10.11 LAB: Step counter - exceptions
A pedometer treats walking 2,000 steps as walking 1 mile. Write a steps_to_miles() function that takes the number of steps as a parameter and returns the miles walked. The steps_to_miles() function...
more
Python
11/30/22
10.10 LAB: Simple integer division - multiple exception handlers
Write a program that reads integers user_num and div_num as input, and output the quotient (user_num divided by div_num). Use a try block to perform all the statements. Use an except block to catch...
more
Python
11/30/22
10.9 LAB: Exceptions with lists
Given a list of 10 names, complete the program that outputs the name specified by the list index entered by the user. Use a try block to output the name and an except block to catch any IndexError....
more
11/16/22
Application of Natural Language Processing (NLP) on Social Media
I have worked a lot of social media companies in gaining insight from their own data. Said data usually comes in the form of text and therefore requires application of Natural Language Processing...
more
Python
11/09/22
ANALYZING THE GAME OF CRAPS
Write a Script to play 1,000,000 games of craps. Use a wins dictionary to keep track of the number of games won for a particular number of rolls. Similarly, use a losses dictionary to keep track of...
more
11/07/22
Write a program that first invites the user to input a natural number n. Then compute the nth number in the sequence (x subscript n) and display it appropriately to the user.
The sequence xn is defined, for n > 2, by the recursive formulaxn = 2xn - 1 + xn - 2 where x1 = 2 and x2 = 3.Write a program that first invites the user to input a natural number n. Then compute...
more
Python
11/06/22
just needing help here
Write a program whose input is a string which contains a character and a phrase, and whose output indicates the number of times the character appears in the phrase.Ex: If the input is:n Mondaythe...
more
Python
11/06/22
just needing help
Write a program whose input is a string which contains a character and a phrase, and whose output indicates the number of times the character appears in the phrase.Ex: If the input is:n Mondaythe...
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.