Python code completion Assignment

# 1. if-elif-else

# Fill missing pieces (____) of the following code

# such that the "print" statements make sense.

name = 'John Doe'

if ____:

print('Name "{}" is more than 20 chars long'.format(name))

length_description = 'long'

elif ____:

print('Name "{}" is more than 15 chars long'.format(name))

length_de

...

C# Programming Assignment

Section A:

In your program, write a method that accepts a positive integer and returns true if the number is a prime number and false otherwise. Note that 2 is the only even prime number. An odd integer is prime if it not divisible by any odd integer less than or equal to the square root of the number.

Section B:

A prime number whose reversal is also a prime number is called emir

...

Python Payroll Program

A local small business has hired you to write a payroll calculation program. The program only needs to calculate gross pay for an employee and display the results. Your program will accept the employee’s name, hours worked, and the employee’s pay rate. The program will need to calculate overtime as well. Overtime is defined as anything over 40 hours is paid at 1.5 times the regular pay. The program should print the employee’s name, the g

...

Python Homework 2

# Put your name in the my_name variable.

my_name = 'My Name'

# Tuples

# 1. a. Create a tuple consisting of an int, a float, and a string

int_float_string = ___

# 1. b. Create a tuple with a single item

atomic_tuple = ___

# 2. Write a function that takes a pair and returns that pair

# as a tuple, reversed.

# I.e., if you pass in (1, b) the return should be (b,

...

Python Open Street Map Assignment using Overpass

1. Use a PyPI module – successfully load and execute a query on OSM

2. Create at least 3 custom functions

getWaterFeatures(feats)

getBuildingFeatures(feats)

getPlacesOfLeiesure(feats)

3. For each of the above functions:

Iterate through features to count the features of each type:

[’Water’,’Building’,’Lei

...

Python Homework 3

# I'm hoping this will be pretty straightforward.

# First, this little bit of code will make sure you have

# Project Gutenberg's "Adventures of Sherlock Holmes" text

# file in the same directory (folder) as this quiz file.

# of how many times you run this file.

...

Python Programming Assignment

1. For these problems, a Boolean expression: means an expression like “2 < x <= 4” or “5<x and y>2”

a. If r and s are both numbers: write the Boolean expression that will make the statemen

...

Java Assignment

Question One

Giving the following code snippet. What kind of errors you will get and how can you correct it.

A. public class HelloJava

{

public static void main(String args[])

{

int x=10;

int y=2;

System.out.print(x*y=");

System.out.printl(x*y);

}

}

...

Java Unit Conversion Assignment

Write a program that will read in a measurement in meters from the user then ask the user if they would like it

converted to feet,yards or miles. The user enters the word for this units they would like the measurement

converted to. The program will convert the measurement to the units specified and display the original measurement

and the equivalent computed value with units for bothe the values rounded

...

Python Pylab Assignment

Sally averages 5 strokes a hole when she plays golf. One day, she took 40 strokes to complete the first nine holes. Her partner conjectured that she would probably regress to the mean and take 50 strokes to complete the next nine holes. Do you agree with her partner? Needs to be shown in Python code...

(1) Make sure to import random and pylab;

(2) Consider defining strokes to return a random choice among the values: 3,

...

Python Homework 4

# Put your name in this modeul-level variable

# Create a class that has two attributes:

# a "name" variable that contains a (str)

# a "scores" variable that will be a list of numbers

class Student:

# I should be able to instantiate a class by saying

# student = quiz4.Student('Mark', [94, 98, 23])

...

Object Oriented Systems Development

Description

Further enhance the health insurance management program for Continental Community Health Insurance (CCHI).

• Add more attributes about a patient, including gender and whether the patient is married.

• Allow the user to repeatedly enter patient information until the user wants to quit.

• When the user enters an invalid value, ask the user to repeatedly enter the value until a valid value has been

...

Image Manipulation Assignment

Create a function that pulls a picture from a URL and creates a thumbnail saved on your local machine.

...

Java Bank Account Application

Bank Account Application

You are an IT Support Administrator Specialist at BOA and are

charged with the task of creating new bank accounts for new bank

customers. Saving Account and Checking Account. Please complete

the following instructions:

Base class: public abstract class Account

List common properties for Saving and Checking accounts

privat

...

Java Programming Assignment

Write a program that calculates and prints the take-home pay for a commissioned sales employee. Perform a compile-time initialization and store the name of Jessica Oakley in a variable called employeeName. Jessica received 7% of her total sales. Her federal tax rate is 18%. She contributes 10% to a retirement program and 6% to Social Security. Her sales this week were \$28,000. Produce a formatted report showing the amount for each of the compu

...