Search results for 'Chapter'
-
ITS320 Module 3 Option 1 Creating a Program to Calculate the Value of a Ferrari
Regular Price: $10.00
Special Price $8.00
ITS320 Module 3 Option 1 Creating a Program to Calculate the Value of a Ferrari
Option #1: Creating a Program to Calculate the Value of a Ferrari
Assignment Instructions
Implement a program that reads in a year and outputs the approximate value of a Ferrari 250 GTO in that year. Use the following table that describes the estimated value of a GTO at different times since 1962.
Year Value
1962-1964 $18,500
1965-1968 $6,000
1969-1971 $12,000
1972-1975 $48,000
1976-1980 $200,000
1981-1985 $650,000
1986-2012 $35,000,000
2013-2014 $52,000,000
(Source: Programming in Python 3 with Zylabs, Chapter 4, Participation Activity 4.3.5)Assignment Submission Instructions
Learn More
Submit a text file containing your Python code into the Module 3 drop box. Name your file ITS320_CTA3_Option1.py. -
DAT 210 Week 2 Using Loops in Python
Regular Price: $12.00
Special Price $10.00
DAT 210 Week 2 Using Loops in Python
You recently graduated college and you are applying for a programming job that requires the understanding of loops in Python. The manager you are interviewing with has asked you to take an assessment to prove your programming knowledge. Below are the requirements for the programming skills test.
DAT 210 Week 2 Using Loops in Python
You recently graduated college and you are applying for a programming job that requires the understanding of loops in Python. The manager you are interviewing with has asked you to take an assessment to prove your programming knowledge. Below are the requirements for the programming skills test.
In Python, create a program that meets the following requirements:
• Take two integers from the user.
• Save the lower number as x.
• Save the largest integer as y.
• Write a loop that counts from x to y by twos.
• Print out the values of that loop using the Print function in Python.
• Write another loop that adds x and y, and saves the value as Z.
• Print out the values of Z using the Print function in Python.Provide the code and take a screenshot of the output, then paste the screenshot(s) into a Microsoft® Word document.
Review Chapters 6 and 11 of Python for Everyone if you have additional questions on creating a program in Python.
Submit your document.
In Python, create a program that meets the following requirements:
• Take two integers from the user.
• Save the lower number as x.
• Save the largest integer as y.
• Write a loop that counts from x to y by twos.
• Print out the values of that loop using the Print function in Python.
• Write another loop that adds x and y, and saves the value as Z.
• Print out the values of Z using the Print function in Python.
Provide the code and take a screenshot of the output, then paste the screenshot(s) into a Microsoft® Word document.
Review Chapters 6 and 11 of Python for Everyone if you have additional questions on creating a program in Python.
Submit your document.
Learn More -
CYB/130 Week 4 Python LAB 5.19: Driving costs - functions
Regular Price: $8.00
Special Price $3.00
CYB/130 Week 4 Python LAB 5.19: Driving costs - functions
Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the gas cost for 10 miles, 50 miles, and 400 miles.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:
20.0
3.1599
the output is:
1.58
7.90
63.20Your program must define and call the following driving_cost() function. Given input parameters driven_miles, miles_per_gallon, and dollars_per_gallon, the function returns the dollar cost to drive those miles.
Ex: If the function is called with:
50 20.0 3.1599
the function returns:
7.89975def driving_cost(driven_miles, miles_per_gallon, dollars_per_gallon)
Learn More
Your program should call the function three times to determine the gas cost for 10 miles, 50 miles, and 400 miles.
Note: This is a lab from a previous chapter that now requires the use of a function. -
CYB/130 Week 4 Python LAB 5.21: Leap year - functions
Regular Price: $8.00
Special Price $3.00
CYB/130 Week 4 Python LAB 5.21: Leap year - functions
A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To account for the difference in time, every 4 years, a leap year takes place. A leap year is when a year has 366 days: An extra day, February 29th. The requirements for a given year to be a leap year are:
1) The year must be divisible by 4
2) If the year is a century year (1700, 1800, etc.), the year must be evenly divisible by 400
Some example leap years are 1600, 1712, and 2016.
Write a program that takes in a year and determines whether that year is a leap year.Ex: If the input is:
1712
the output is:
1712 is a leap year.Ex: If the input is:
1913
the output is:
1913 is not a leap year.Your program must define and call the following function. The function should return true if the input year is a leap year and false otherwise.
def is_leap_year(user_year)Note: This is a lab from a previous chapter that now requires the use of a function.
Learn More -
CYB/130 Week 4 Python LAB 5.23: Exact change - functions
Regular Price: $8.00
Special Price $3.00
CYB/130 Week 4 Python LAB 5.23: Exact change - functions
Write a program with total change amount as an integer input that outputs the change using the fewest coins, one coin type per line. The coin types are dollars, quarters, dimes, nickels, and pennies. Use singular and plural coin names as appropriate, like 1 penny vs. 2 pennies.Ex: If the input is:
0
or less, the output is:
no changeEx: If the input is:
45
the output is:
1 quarter
2 dimesYour program must define and call the following function. The function exact_change() should return num_dollars, num_quarters, num_dimes, num_nickels, and num_pennies.
Learn More
def exact_change(user_total)
Note: This is a lab from a previous chapter that now requires the use of a function. -
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 -
DAT/210 Week 3 Java LAB 4.15: Word frequencies - methods
Regular Price: $7.00
Special Price $3.00
DAT/210 Week 3 Java LAB 4.15: Word frequencies - methods
Write a program that reads a list of words. Then, the program outputs those words and their frequencies. The input begins with an integer indicating the number of words that follow. Assume that the list will always contain less than 20 words.
Ex If the input is:
5 hey hi Mark hi mark
the output is:
hey 1
hi 2
Mark 1
hi 2
mark 1
Hint: Use two arrays, one for the strings, another for the frequencies.
Your program must define and call a method:
public static int getFrequencyOfWord(String[] wordsList, int listSize, String currWord)
Note: This is a lab from a previous chapter that now requires the use of a method.import java.util.Scanner;
public class LabProgram {
Learn More
/* Define your method here */
public static void main(String[] args) {
/* Type your code here. */
}
}