Programming Homework Help

CS 3723 The University of Texas at San Antonio LISP Programming

 

Code the macro, iterate, which is based on the following:

(iterate controlVariable beginValueExpr endValueExpr incrExpr bodyexpr1 bodyexpr2 … bodyexprN)

  • iterate is passed a controlVariable which is used to count from beginValueExpr to endValueExpr (inclusive) by the specified increment.
  • For each iteration, it evaluates each of the one or more body expressions.
  • Since beginValueExpr,endValueExpr, and incrExpr are expressions, they must be evaluated.
  • The endValueExpr and incrExpr are evaluated before processing the rest of the macro.This means the code within the user’s use of the macro cannot alter the termination condition nor the increment; however, it can change the value of the controlVariable.
  • The functional return value of iterate macro doesn’t matter, and will probably be T.
  • You can create an intermediate variable named endValue for the endValueExpr. You can create an intermediate variable named incValue for the incrExpr. For 5 bonus points, use gensym to generate the name of those two variables.

Programming Homework Help

CSIS 296 SDSU Array of Pointers in C Plus Plus Project

 

Description of the Program:

Write a C++ program to include an array that allocates space dynamically for entering integer values. You will create and use 2 functions.

1st function:

After you enter all the array values, you can pass the array to a function that sorts them in descending order.

2nd function:

You can use a function to find the lowest value in the array.

What to display:

Your program has to display the following:

  1. The descending order sorted list of the array values
  2. The lowest value in the array by using the correct headings

Pointers should be used as much as possible as you can for this program.

requirements creating the project

  1. Name the project as <Your Name><Assignment8>
  2. Name your “.cpp” source file as <Your Name><Assignment8> (same with the project)
  3. Enter valid data that is easy to follow and calculate for testing when you create the screen shot running the project
  4. The screen shot should show the whole run of the project with actual meaningful data (do not show the code only)
  5. Allow the user of the program to enter any data for testing the program
  6. Take a screen shot when you run the project
  7. Zip the project using the zipping instructions. This will create the file with the zip extension you will submit for this Assignment.

What you will submit for this Assignment

  1. The project zip file (follow the exact instructions how to zip the project)
  2. A screen shot(required) that shows the whole run of the project with actual meaningful data
  3. The source file you named as “<Your Name><Assignment8>.cpp” separately from the project zip file

You will upload the 3 files using “submit Assignments“:

  1. Project zip file (<Your Name><Assignment8>zip)
  2. Screen shot
  3. Source file of your program (<Your Name><Assignment8>.cpp”)

Programming Homework Help

Drexel University Two Player Game Programming Practice

 

a game

To pass the time during long winters, the ancient Nordic people would play the two-player game of Björksnäs. In this assignment, you’ll implement the game, but play will be against the computer.

During each round, players choose a move, which may be either Gödishus, Derflürg, Kullen, Koppang, or Songesand. The rules are:

  • Songesand beats Kullen, Gödishus
  • Kullen beats Derflürg, Koppang
  • Derflürg beats Songesand, Gödishus
  • Gödishus beats Koppang, Kullen
  • Koppang beats Songesand, Derflürg

Your program should behave as follows:

  • The rules should be printed to the screen
  • The user is asked if they’d like to play a round
    • if they choose ‘y’, a round is played
    • if they choose ‘n’, the program ends
  • Until the user has chosen to quit, another round is played.
  • In a round of play:
    • The user is asked to enter a move, which may be either Gödishus, Derflürg, Kullen, Koppang, or Songesand. The program should continue to prompt the user until a valid move is entered.
    • The computer makes a move at random. (Hint: remember how we generated random numbers in class.)
    • The program prints the computer’s move, the user’s move, and who is the winner of this round.
    • The user is asked if they’d like to continue.
  • When the user has decided to quit the game, the program prints the number of:
    • rounds played
    • times the user won
    • times the computer won

suggestions

An important skill in programming is learning how to break up a big job into smaller tasks.

  • Make an outline. Make sure that your outline makes sense. Test it out with real input using pencil and paper. Do this before you start writing code.
  • Turn some of the individual steps of your outline into functions. Some obvious choices might be a function which generates the computer’s move at random. Another would be a function which is passed two moves and returns the winner. The goal should be that the functions make your code as readable as your English-language outline. You don’t need to implement all of the functions at first. Just write placeholders (we call these stubs) first and fill them in later.
  • Implement and test your stub functions.

Also remember to test things as you go. It’s easier to find a mistake in 5 lines of code than it is to find a mistake in 500 lines of code.

Programming Homework Help

CISS 105 BCCC Cat N Won2 Programming Script Writing Programming Exercise

 

CREATE A SCRIPT FOR THE FOLLOWING:

$ cat -n won2

1 #

2 # won2

3 # won version 2

4 # Displays the current date and time, # of users currently

5 # logged in, and your current working directory

6 #

7 date # displays current date

8 who | wc -l # displays # of users logged in

9 pwd # diplays current working directory

$_

WRITE A SCRIPT FOR THE FOLLOWING

$cat -n won3

1 #

2 # won3

3 # won version 3 – The user-friendly version

4 # Displays the current date and time, # of users currently

5 # logged in, and your current working directory

6 #

7 echo # skip a line

8 echo “Date and Time:c”

9 date # displays current date

10 echo “Number of users on the system:c”

11 who | wc -l # displays # of users logged in

12 echo “Your current directory:c”

13 pwd # displays your current directory

14 echo # skip a line

$_

CREATE A SCRIPT FOR THE FOLLOWING:

$ cat -n BOX

1 #

2 # BOX

3 # A sample program to show the shell variables

4 #

5 echo # skip a line

6 echo “The following is output of the $0 script: ”

7 echo “Total number of command line arguments: $#”

8 echo “The first parameter is: $1 ”

9 echo “The second parameter is: $2”

10 echo “This is the list of all is parameters: $* ”

11 echo # skip a line

$_

Programming Homework Help

ENTD 220 American Public University Python Project

 

# This is the flower box and it should at the beginning of each assignment
# You must add comments to your code
# Program name : Wk3_firstname_lastname.py
# Student Name : Ymmas Azaba
# Course : ENTD220
# Instructor : My Instructor
# Date : Any Day

# Description : This code will …..

# Copy Wrong : This is my work

You are going to enhance the prior assignment by doing the following:-

1) Create a function for each math operation (add, div, mult, sub)
2) The application will run forever, you will ask the user to continue or not.

3) create a function IsinRange() to test a value between two ranges like this;

Here is the spec in pseudo code

IsInRanhe(lr, hr, n) lr=low range

hr=high range

n=number

if n between ln and hn

return true

else

return false

Hints 1) For practice please see lab exercises in the lesson section
2) See Sample output for messages

Sample output

Enter your Lower range —> 10
Enter your Higher range —> 20
Enter your First number —> 15
Enter your Second number —> 17

The Result of 15.0+17.0=32.0
The Result of 15.0-17.0=-2.0
The Result of 15.0*17.0=255.0
The Result of 15.0/17.0=0.882352941176

Continue Looping Y/N Y

Enter your Lower range —> 20
Enter your Higher range —> 30
Enter your First number —> 25
Enter your Second number —> 50

  • The input values are out side the input ranges
  • Please check the numbers and try again
  • Thanks for using our calculator

Submission Instructions:

Make sure that you save your code in a text file in this format;

W3_firstname_lastname.py

Programming Homework Help

Ashworth College Decision Making and Process Flow Discussion

 

I’m working on a programming question and need an explanation and answer to help me learn.

Threaded Discussion Instructions

Review the threaded discussion question posted by the course faculty. You are required to submit at least two (2) responses to this question by 11:59pm EST on Sunday. The first response should be to the faculty; the second response can be directed either to the faculty or to other students in the class. Your responses should be substantive, and reflect analytical and critical thinking skills, as well as, a thorough understanding of your reading assignment. A typical response should consist of 100-150 words in a single-spaced format. Refer to the TDQ Rubric below for more guidance on how to respond.

Compare and contrast these three constructs: “if…” “if…else” “while”

Compare and contrast the “if” single statement, the “if…else” double or multiple selection statement, and the “while” statement. Give two examples of each and explain what criteria are used to decide which of the three is appropriate in a given situation.

Rubrics

Programming Homework Help

Hertzsprung Russell Diagram

 

1. Write a line (or lines) that could be added to the script to modify the axis so the horizontal axis is from −0.5 to 2.25 and the vertical axis is from −10 to 20.

Hint: help axis, help xlim, help ylim.

2. Write a line (or lines) that could be added to the script to add reasonable labels to the horizontal and vertical axes, and a titl.
Hint: help xlabel, help ylabel, help title.

3. Write a line (or lines) that could be added to the script to create an n × 3 matrix named COL of colors to try and match the colors of stars indicated by the below diagram

4. Write a line (or lines) that could be added to the script to deletes all rows from the matrix NUM that have a value in the third column less than 2.25. Does this produce a different figure than just changing the axis to exclude these points? Explain.

Programming Homework Help

CSUN Simple Python Input and Output Function Odds Program

 

I’m working on a python multi-part question and need a sample draft to help me learn.

1) Write a function write a function odds(l) that takes a list of ints and returns a list of the odd elements.

2) write a function double(l) that takes a list of ints and returns a new list with every number doubled. Your function should not modify l.

3) write a function max(l) that takes a list of ints and returns the largest value

4) Using list comprehension, write one line of Python code that takes a list of ints and creates a new list where every element is replaced by its string representation

You need upload your codes and at least 3 inputs and 3 outputs for testing all functions.

Your input must be more than 12 numbers or 12 letters.

Programming Homework Help

FSCJ C Program Running on Ocelot Source Code

 

I’m working on a programming exercise and need an explanation and answer to help me learn.

Lab 3 Directions

Write a C program to run on ocelot which will flip bits in a number entered by the user using the binary representation of the number. The user should input the original integer value between 1 and 10000 inclusive using a scanf. Use an unsigned integer type. Output is to the screen. You must use only bitwise operators for this program. You can shift bits and or use the logical bitwise operators.

For this assignment give the user directions asking them to enter the beginning integer. Then ask the user which bit to flip. That can be a number between 0 and 31 each referring to the values 20 to 231. Output the new decimal number. Then ask the user if they want to flip another bit. If they say yes, then ask them which bit to flip and output the result. Allow the user to keep choosing bits to flip until they enter a sentinel value to quit. Be sure to validate all user input so the program cannot be crashed.

You do not need to use getopt for this program since there are no command line arguments

Code should be nicely indented and commented.

Create a simple Makefile to compile your program into an executable called bitflip.

  • If the user enters a 1 as the initial value and a 0 for the bit to flip the result would be 0.
  • If the user enters a 2 for the bit to flip next the result would be 4.
  • If the user enters a 2 for the bit to flip next the result would be 0.
  • If the user enters a 0 for the bit to flip next the result would be 1.
  • If the user enters a 1 for the bit to flip next the result would be 3.
  • If the user enters a 2 for the bit to flip next the result would be 7.

Output should be easy to read.

Test the program using the previous commands.

Take a screenshot of the screen showing the output on ocelot.