Month: March 2015

python Three-card Poker

4.1 Overview

Gambling has a long (and sordid) history on the internet. The history of computer games, however, is

quite a bit older than the internet. For this program, you will develop and code a game ofthree-card

poker. The computer (the Dealer) will play against a single human player (the Player). Your program

should present the game as described below.

4.2 Rules of Three-card Poker

The Player starts with a stake: some pre-determined amount of money ($100 in your program). A

game of Poker consists of a set of sub-games. Before beginning a sub-game, the Player must be able

to bet the ante, a pre-determined amount of money ($10 in your program). In each sub-games, both

the Player and Dealer is dealt a hand of three cards. Each can see their own cards, but not the others.

After seeing the hand, the Player must determine whether he will play or fold. If the Player folds, he

forfeits the ante: his stake is reduced by the ante amount. If the Player elects to play, then the Dealer

must either play or 

Several Java Probelm 代写

Several Java Probelm 代写

Problem 1. (Dragon Curves) Write a program Dragon that takes an int value N as

command-line argument and prints the instructions for drawing the dragon curve of

order N. The instructions are strings of F, L, and R characters, where F means “draw

line while moving 1 unit forward,” L means “turn left,” and R means “turn right.” A

dragon curve of order 0 is just the character F, and a curve of order N is a curve of order

N −1 followed by an L followed by a curve of order N −1 traversed in reverse order with

R replaced by L and L replaced by R.

$ java Dragon 0

F

$ java Dragon 1

FLF

$ java Dragon 2

FLFLFRF

$ java Dragon 3

FLFLFRFLFLFRFRF

Dragon curves of orders 0, 1, 2, and 3 and the corresponding instructions are shown

below.

Problem 2. (Visualizing Dragon Curves) Write a program DragonPlot that reads from

standard input the instructions produced by Dragon (from Problem 1) for drawing a

dragon curve, generates a drawing of the curve (shown below), and saves it in a file

CS2110 Assignment 5

Java 程序代写

The Problem

The design team at AppsUnlimited has come up with the concept for a new app to help users find restaurants when they

traveling.

The prototype UI is given shown above. Basically the user enters two pieces of data, namely

1. How far they are willing to travel (e.g. 1.5 km), and

2. How much they are willing to spend, (e.g. $20).

The user can then do three types of search, namely

 All: Display all restaurants that match the user’s criteria.

 Best: Display those restaurants that match the user’s criteria and for which there is no other restaurants that are

both cheaper and closer.

 Ranked – Displays the same restaurants as Best button but the restaurants are ordered by rank. The rank of a

restaurant is the count of number of restaurants that match the constraints and are both farther and more

expensive.

The Data

This application is to be based on a Restaurants file which contains the following information for each restaurant:

o Name,

o Street address

o Average meal price,

EE 201A Final Project verilog代写

verilog 代写 综合 Xilinx Matrix Multiplier Assignment

EE 201A Final Project

Winter 2015 DUE: Before March 22nd 23:59

Problem:

Given two 4×4 matrixes A and B, where matrix A can be any integer value

and matrix B is a constant matrix as Fig. 1 shows, design a matrix multiplier

module that performs matrix multiplication of A x B:

AAAA

14131211



AAAA

24232221

AAAA

34333231

AAAA

44434241

4/138/11





28/32/34/3

315/752/1

4/34/1123/1401

Figure 1. A x B

Fig. 2 shows the block diagram of the matrix multiplication, where both

Matrix A and B stored and implemented by BRAMs in the FPGA.

Matrix A

BRAM

Matrix

multiplier

Const.

Matrix B

BRAM

Figure 2.

The BRAM can be generated using Xilinx core generator. More details

about how to generate BRAM and initialize its content, please check

http://youtu.be/RwYjeT8Nf88 . For verification of the matrix multiplier,

following is an example of the BRAM initialization file for matrix A:

memory_initialization_radix = 10 ;

四道 C++ 程序代写

Problem #1 (25 points)

Note that no global variables and data are allowed. All methods (as if you need them) must be

written explicitly and no library/package methods are allowed.

1. Write a function named as extractMostSeenEvenDigitProblem1YourName(),

which will

i. Receive an integer as argument; and

ii. Search and display the digits as shown in the output below; and

iii. Return the digit that has the largest occurrence.

1. A sample a program with main() would produce the sample output below – Your code must

take care of other possible output scenarios as well.

*********************************************************

* MENU *

* 1. Calling extractMostSeenEvenDigitProblem1YourName() *

* 2. Quit *

*********************************************************

Select an option (1 or 2): 1

Enter an integer: 302480443

Calling displayDigitProblem1YourName() –

There is/are 9 digit(s) with 4 even digit(s).

With the 4 even digits,

4 occurs 3 time(s)

0 occurs 2 time(s)

2 occurs 1 time(s)

8 occurs 1 t

unmanned lawn mowers c程序代写

代写c程序 二维数组 指针 内存申请与释放

dfs recrusive 遍历所有路径

// ~ Overview ~ //

This exercise will familiarize you with 2-dimensional arrays and
some more file operations.

// ~ Learning Goals ~ //

(1) To learn to perform file operations
(2) To learn to create and manipulate 2-dimensional arrays using
malloc and free function.
(3) To apply recursion to solve a maze traversal problem
// ~ Submitting Your Assignment ~ //

You must submit one zip file to blackboard. This zip file must
contain:

(1) pa_answer02.c
(2) pa02.c

You create the zip file using the following command.

> zip pa02.zip pa_answer02.c pa02.c

// ~ Overview ~ //

This exercise will give you more practice with file operations,
memory allocation, and recursion.

You own a business that performs mowing using unmanned lawn mowers
(ULM). Suppose you have just agreed to a contract to provide mowing
service to a corn maze operator. Based on a pre-processed satellite
images of corn maze, where the walls of the corn maze are stored as ‘X’ and
the paths are store

c语言扫雷游戏 minesweeper实现

minesweeper C 程序代写

1. (Time: 2 – 3 hours) For your final project you will be implementing the computer

game minesweeper. The game of minesweeper works as follows:

1. There is a rectangular grid of tiles

2. Hidden under some of the tiles are mines

3. Your goal is to mark all the tiles that contain mines and uncover all the tiles

4. If you uncover a tile that contains a mine you lose the game

5. If you uncover a tile that doesn’t contain a mine, it tells you how many mines

that don’t contain mines

are hidden in the eight surrounding squares

Here are some example boards with all of their contents revealed so that you can get an

idea as to what they look like.

Example 1:

2 * * 2 0

1 5 * 3 0

0 * * 2 0

0 1 2 3

Example 2:

9 0 0 0 0 0 1 1 1 0 0

8 0 0 0 0 0 1 * 1 0 0

7 0 1 1 1 0 1 1 2 1 1

6 0 1 * 1 1 1 1 1 * 1

5 0 1 1 1 1 * 1 1 1 1

4 1 1 1 0 1 1 1 0 0 0

3 1 * 1 0 0 0 0 0 0 0

2 1 1 1 0 0 0 0 0 0 0

1 1 2 1 1 0 1 1 2 2 2

0 * 2 * 1 0 1 * 2 * *

0 1 2 3 4 5 6 7 8 9

Requirements

1. Name your exe

CSCI 1113 Homework 5 代写

C++程序代写,mergesort 对结构体排序,function pointer

Problem A) (20 Points) Program to compute the numeric grades for a course.

Assume the course records for a particular course are in a file named: “Grades.dat” that will

serve as the input file for your program. The input file is in exactly the following format. Each

line contains a student’s last name, then one space, then the student’s first name, then one

space, then five quiz scores. The quiz numbers are whole numbers and are separated by one

space.

For example, one entry in the file “Grades.dat” is as follows:

Svelt Sam 90 80 90 100 85

Your program will take its input from the file “Grades.dat” its output to a second file named:

“FinalGrades.dat”. The data in the output file will be the same as the data in the input file

except that you will add one additional number at the end of each line. The number will be the

average of the students quiz scores.

For example, the following two entries are in the output file “FinalGrades.dat”:

Svelt Sam 90 80 90 1

bin_str 递归调用

输出所有二进制组合,递归调用,c程序代写

  1.  bin_str.c

binary number is made up of 0’s and 1’s but the input strings you will receive can also contain ‘x”s. An x represents a digit that can be either a 0 or a 1. Your program should display all the possible binary digits that can be formed. For example the string x1x0 could represent either 0100, 0110, 1100, or 1110.

  1. Name your executable bin_str.out
  2. Your program should accept the binary string as a command line argument
  3. You MUST solve this program RECURISIVELY
  4. Examples

    1../bin_str.out 0110 0110

    2../bin_str.out 01×0 0100

    0110 3../bin_str.out xx

    00 01 10 11

minutes) Write a program called bin_str.c that completes a binary number. A