756 Answered Questions for the topic Python
02/25/23
how to code this and import it?
Create 2 functions; one to convert a value from Fahrenheit to celsius and the second function to convert from celsius to Fahrenheit, remember to return the values in the function statement.Create...
more
Python Computer Programming
02/20/23
Python 3 homework string help
This si what I'm supposed to do.Define a function named encrypt(msg) that takes a string message as the argument, and returns the message in an "encrypted" form using the encryption rules described...
more
Python Computer Programming
02/20/23
Python string help(python 3)
I need help doing this for a function Define a function named encrypt(msg) that takes a string message as the argument, and returns the message in an "encrypted" form using the encryption rules...
more
02/19/23
how to do this?
in python: Using a string function, print your first and last name with the * symbol on both sides of your name with a max of 25 characters.
02/19/23
how to code this?
In python: Write a small program using a ‘while’ loop (while True).
Prompt the user to enter their age.
Using a string function, check if the input is a decimal value, if true then break from the...
more
02/19/23
how to code in python?
Initialize a string variable to “hello python” and print it out in all uppercase using a string function.
02/17/23
in python how do i write this code?
Write a program that opens a file that will be overwritten each time. Write out a few lines of text and then close the file.
02/17/23
how to code this in python?
Using escape characters, print out the phrase “Welcome to O’Neil’s Boat Rentals!”
Initialize one string variable to the following sentence:
“Hello there! How are you? I'm doing fine."Using the...
more
02/15/23
how to use try and except?
Create a function that will divide 2 numbers and return the result. The function will accept 2 arguments. Use a try statement and the ZeroDivisionError exception type to catch divide by zero...
more
02/15/23
How to use escape keys?
Using escape characters, print out the phrase “Welcome to O’Neil’s Boat Rentals!”
Initialize one string variable to the following sentence:
“Hello there! How are you? I'm doing fine."Using the...
more
02/15/23
how to use .format?
Write a function that takes 3 strings - first name, last name and middle initial. Return one string that has the person’s full name. Make sure that the first letter of each name is capitalized...
more
Python Math
02/14/23
You must decide which of the two wind turbines to purchase for a new wind farm your company is planning to build.
Turbine A will initially cost $1,500,000 to install and is estimated to generate $290,000 per year of revenue. Turbine B will cost $1,800,000 initially but will generate $350,000 per year of...
more
Python Computer Programming
02/13/23
python program problem
my program imports another program I wrote. the part of the imported program I'm having a problem with is .def get_float(prompt): variable = float(input(prompt)) variable =...
more
02/09/23
how to use debugger to fix code in this example?
Using a breakpoint and the debugger, find the problem and fix the following code:
patients = [[70, 1.8], [80, 1.9], [150, 1.7]]
def calculate_bmi(weight, height):
return weight / (height **...
more
02/09/23
how to write an exponent function in python?
Write a function that takes two integers and raises the first number to the power of the second number and returns the result.
02/09/23
how to write an average function in python?
Write a function that takes three arguments (numerical) and returns the average of the numbers entered.
02/09/23
How to write a tax function in python?
Write a function that takes the price of the item as an argument and return the price calculated with a tax value of .07. The goal here is to convert the tax calculation into a reusable function.
Python Computer Programming
02/07/23
How do i make a menu in python
HI how do I make am menu in python? I need a menu that has too options and both options lead to a different menu.
02/07/23
how to go about coding this in python?
Write a function that asks for the user to enter a number of items they wish to purchase.
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 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"}}
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.