Python
Need Help in Python Assignment?
We can help you if you are having difficulty with your Python Assignment. Just email your Java Assignment at admin@assignmentcache.com.
We provide help for students all over the world in Python Assignment.
-
Python 11.24 LAB: Output values in a list below a user defined amount - functions
Regular Price: $10.00
Special Price $8.00
Python 11.24 LAB: Output values in a list below a user defined amount - functions
Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, and output all integers less than or equal to that value.
Ex: If the input is:
5
50
60
140
200
75
100the output is:
50
60
75
The 5 indicates that there are five integers in the list, namely 50, 60, 140, 200, and 75. The 100 indicates that the program should output all integers less than or equal to 100, so the program outputs 50, 60, and 75.Such functionality is common on sites like Amazon, where a user can filter results.
Your code must define and call the following two functions:
def get_user_values()
def output_ints_less_than_or_equal_to_threshold(user_values, upper_threshold)Utilizing functions will help to make your main very clean and intuitive.
Note: This is a lab from a previous chapter that now requires the use of functions.
Learn More -
CYB/130 Week 2 Python LAB 3.26: Seasons
Regular Price: $8.00
Special Price $3.00
CYB/130 Week 2 Python LAB 3.26: Seasons
Write a program that takes a date as input and outputs the date's season. The input is a string to represent the month and an int to represent the day.Ex: If the input is:
April
11
the output is:
SpringIn addition, check if the string and int are valid (an actual month and day).
Ex: If the input is:
Blue
65
the output is:
InvalidThe dates for each season are:
Learn More
Spring: March 20 - June 20
Summer: June 21 - September 21
Autumn: September 22 - December 20
Winter: December 21 - March 19 -
CYB/130 Week 2 Python LAB 3.25: Smallest number
Regular Price: $8.00
Special Price $3.00
CYB/130 Week 2 Python LAB 3.25: Smallest number
Write a program whose inputs are three integers, and whose output is the smallest of the three values.Ex: If the input is:
Learn More
7
15
3
the output is:
3 -
CYB/130 Week 2 Python LAB 3.14: Simple statistics
Regular Price: $8.00
Special Price $3.00
CYB/130 Week 2 Python LAB 3.14: Simple statistics
Given 4 floating-point numbers. Use a string formatting expression with conversion specifiers to output their product and their average as integers (rounded), then as floating-point numbers.Output each rounded integer using the following:
print('{:.0f}'.format(your_value))Output each floating-point value with three digits after the decimal point, which can be achieved as follows:
print('{:.3f}'.format(your_value))Ex: If the input is:
Learn More
8.3
10.4
5.0
4.8
the output is:
2072 7
2071.680 7.125 -
CYB/130 Week 2 Python LAB 3.13: Input and formatted output: House real estate summary
Regular Price: $8.00
Special Price $3.00
CYB/130 Week 2 Python LAB 3.13: Input and formatted output: House real estate summary
Sites like Zillow get input about house prices from a database and provide nice summaries for readers. Write a program with two inputs, current price and last month's price (both integers). Then, output a summary listing the price, the change since last month, and the estimated monthly mortgage computed as (current_price * 0.051) / 12.Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
print('{:.2f}'.format(your_value))Ex: If the input is:
200000
210000
the output is:
This house is $200000. The change is $-10000 since last month.
The estimated monthly mortgage is $850.00.Note: Getting the precise spacing, punctuation, and newlines exactly right is a key point of this assignment. Such precision is an important part of programming.
Learn More -
CYB/130 Week 2 Python LAB 3.12: Phone number breakdown
Regular Price: $8.00
Special Price $3.00
CYB/130 Week 2 Python LAB 3.12: Phone number breakdown
Given an integer representing a 10-digit phone number, output the area code, prefix, and line number using the format (800) 555-1212.Ex: If the input is:
8005551212
the output is:
(800) 555-1212Hint: Use % to get the desired rightmost digits. Ex: The rightmost 2 digits of 572 is gotten by 572 % 100, which is 72.
Hint: Use // to shift right by the desired amount. Ex: Shifting 572 right by 2 digits is done by 572 // 100, which yields 5. (Recall integer division discards the fraction).For simplicity, assume any part starts with a non-zero digit. So 0119998888 is not allowed.
Learn More -
CYB/130 Week 2 Python LAB 3.11: Input and formatted output: Right-facing arrow
Regular Price: $8.00
Special Price $3.00
CYB/130 Week 2 Python LAB 3.11: Input and formatted output: Right-facing arrow
Given input characters for an arrowhead and arrow body, print a right-facing arrow.Ex: If the input is:
Learn More
*
#
Then the output is:
#
******##
******###
******##
# -
CYB/130 Week 5 Python LAB 6.28: Replacement words
Regular Price: $8.00
Special Price $5.00
CYB/130 Week 5 Python LAB 6.28: Replacement words
Write a program that replaces words in a sentence. The input begins with word replacement pairs (original and replacement). The next line of input is the sentence where any word on the original list is replaced.Ex: If the input is:
Learn More
automobile car manufacturer maker children kids
The automobile manufacturer recommends car seats for children if the automobile doesn't already have one.
the output is:
The car maker recommends car seats for kids if the car doesn't already have one.
You can assume the original words are unique. -
CYB/130 Week 5 Python LAB 6.27: Word frequencies
Regular Price: $8.00
Special Price $5.00
CYB/130 Week 5 Python LAB 6.27: Word frequencies
Write a program that reads a list of words. Then, the program outputs those words and their frequencies.Ex: If the input is:
Learn More
hey hi Mark hi mark
the output is:
hey 1
hi 2
Mark 1
hi 2
mark 1 -
CYB/130 Week 5 Python LAB 6.26: Elements in a range
Regular Price: $8.00
Special Price $5.00
CYB/130 Week 5 Python LAB 6.26: Elements in a range
Write a program that first gets a list of integers from input. That list is followed by two more integers representing lower and upper bounds of a range. Your program should output all integers from the list that are within that range (inclusive of the bounds).Ex: If the input is:
25 51 0 200 33
0 50
the output is:
25 0 33
The bounds are 0-50, so 51 and 200 are out of range and thus not output.For coding simplicity, follow each output integer by a space, even the last one. Do not end with newline.
Learn More