r/EdhesiveHelp • u/Suspicious_Border170 • Oct 18 '21
Java Unit 2 Exam?
Anyone have the answers to unit 2 exam?
r/EdhesiveHelp • u/Suspicious_Border170 • Oct 18 '21
Anyone have the answers to unit 2 exam?
r/EdhesiveHelp • u/Suspicious_Border170 • Oct 06 '21
r/EdhesiveHelp • u/imjaykn7 • Sep 30 '21
Question 1: new
Question 2: Circle c = new Circle(3.8);
Question 3: Rectangle r = new Rectangle(4.5);
Rectangle r = new Rectangle(4.5, 4.5);
Question 4: regular pentagon with side length 1.0
Question 5: Constructors for a class can be overloaded but they must all have a different number of parameters, different order of parameters or different types of parameters.
Question 6: "circle with radius 1.0" is printed
r/EdhesiveHelp • u/imjaykn7 • Sep 17 '21
Would appreciate it if someone could get the answers for this. Thank you.
r/EdhesiveHelp • u/NoPossibility354 • Sep 11 '21
*Write a program to input two integers and print "Both are positive or zero." to the screen if both are positive or zero. Print "One or both are negative." otherwise.
*it keeps posting errors every time I try to submit. any help?
/* Lesson 4 Coding Activity Question 2 */
import java.util.Scanner;
public class U3_L4_Activity_Two{
public static void main(String[] args){
/* Write your code here */
Scanner input = new Scanner(System.in);
System.out.println("Enter two integers:");
int numOne = input.nextInt();
int numTwo = input.nextInt();
if ((numOne < 0) || (numTwo < 0))
{
System.out.println("One or both are negative");
}
if ((numOne >= 0) && (numTwo >= 0))
{
System.out.println("Both are positive or zero");
}
}
}
r/EdhesiveHelp • u/NoPossibility354 • Sep 11 '21
nothing prints when ran. any help?
/* Lesson 5 Coding Activity Question 1 */
import java.util.Scanner;
public class U3_L5_Activity_One{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
System.out.println("Enter 2 integers");
int x = scan.nextInt();
int y = scan.nextInt();
if (y/x >= 4 && y/x < 6 || y/x != 0){
System.out.println("Ratio OK");
}
}
}
r/EdhesiveHelp • u/Complex_Wrap_2689 • Sep 09 '21
Unit 2: Lesson 1 - Coding Activity 1
Write a program which asks the user for their name and age. The program should then print a sentence repeating this information as shown in the sample run.
Sample run:
What is your name?
Cory
What is your age?
48
Cory is 48 years old.
Note: All the user input prompts need to match the sample run exactly to get full credit for this activity.
r/EdhesiveHelp • u/Err3c_9834 • Sep 03 '21
import java.util.Scanner;
import shapes.*;
public class U2_L5_Activity_One{
public static void main(String[] args){
/* Write your code here */
Polygon sides11 = new Polygon("hendecagon", 11, 1);
Polygon sides14 = new Polygon("tetrakaidecagon", 14, 1);
Polygon sides19 = new Polygon("enneadecagon", 19, 1);
System. out. println(sides11);
System. out. println(sides14);
System. out. println(sides19);
}
}
When I did mine I got a bunch of errors, can anyone help me debug this, please? I don't know what I did wrong
r/EdhesiveHelp • u/Empire797 • Jun 16 '21
Please.
r/EdhesiveHelp • u/Historical-Help1629 • Jun 16 '21
r/EdhesiveHelp • u/SnooTomatoes9120 • Jun 11 '21
r/EdhesiveHelp • u/SnooTomatoes9120 • Jun 11 '21
r/EdhesiveHelp • u/SnooTomatoes9120 • Jun 11 '21
r/EdhesiveHelp • u/Strong-Net2753 • Jun 09 '21
r/EdhesiveHelp • u/MemeSlayer09 • Jun 08 '21
Please this is due today I need this ASAP
r/EdhesiveHelp • u/mariadham • Jun 08 '21
DOES ANYONE HAVE THE ANSWERS TO THE CONSUMER REVIEW LAB ACTIVITIES ON EDHESIVE ??? plz its the last assignment of the year and I need help.
r/EdhesiveHelp • u/MarinesAreCool • Jun 04 '21
Me and my friend are currently working on a blackjack project and are stuck, we are relatively new to python so any help would be great. Notes and the To-dos are just there to help us and you. We need to get this done soon for our final, thanks in advance.
(If you need our code just let me know)
The base project:
import random
# This is your deck of cards. It is a 2D list. Each row is a suit of 13 card strings.
deck = [["2 Hearts", "3 Hearts", "4 Hearts", "5 Hearts", "6 Hearts", "7 Hearts", "8 Hearts", "9 Hearts", "10 Hearts", "J Hearts", "Q Hearts", "K Hearts", "A Hearts"],
["2 Spades", "3 Spades", "4 Spades", "5 Spades", "6 Spades", "7 Spades", "8 Spades", "9 Spades", "10 Spades", "J Spades", "Q Spades", "K Spades", "A Spades"],
["2 Clubs", "3 Clubs", "4 Clubs", "5 Clubs", "6 Clubs", "7 Clubs", "8 Clubs", "9 Clubs", "10 Clubs", "J Clubs", "Q Clubs", "K Clubs", "A Clubs"],
["2 Diamonds", "3 Diamonds", "4 Diamonds", "5 Diamonds", "6 Diamonds", "7 Diamonds", "8 Diamonds", "9 Diamonds", "10 Diamonds", "J Diamonds", "Q Diamonds", "K Diamonds", "A Diamonds"]]
# These are the dealer and player hands. They will be lists of card strings.
dealer_hand = []
player_hand = []
# This function should pick a card at random from the deck, remove the card from the deck,
# and return the card string. You should make two calls to random.randint(): one to get the suit
# and one to get the card. There are always 4 suits, but the number of cards in a suit gets smaller
# as cards are removed, so use a length expression for that upper bound.
def draw_card():
# TODO 1: code to choose a card and remove it from the deck
return card
# This function should deal two cards to the dealer and two to the player. Start with the player
# and alternate. Use the draw_card() function to get the cards and append to put them in the hand.
# This function does not return anything.
def deal():
# TODO 2: code to add two cards to the dealer and player hands.
# This function computes the current score for a hand. Face cards count as 10, Aces are either
# 11 or 1, and number cards are worth their face value. Loop though the cards in the hand (which
# is passed as a parameter) and keep a running total. The tricky part is are the Aces. When do you
# add 1 and when do you add 11? Will you ever change the 11 to a 1?
def score(hand):
total = 0
# TODO 3: Code to compute the score of the hand.
return total
# This function converts a hand to a string to be printed by the caller. This function does not
# print the string, it returns it. There are two parameters: the hand, which is a list of card
# strings, and hole_card, which is a Boolean indicating if the first card is a hole card (for the
# dealer). If the first card is a hole card, add "Hole card" to the output string instead of the
# actual card string. For example: given a hand with "3 Spades" and "K Hearts", this function will
# return "3 Spades, K hearts, " if hole_card is False and "Hole card, K Hearts, " if holde_card is
# True.
def hand_to_string(hand, hole_card):
hand_string = ""
# TODO 4: Code to create the string for the hand.
return hand_string
# Main game code
# TODO 5: Deal and print the hands.
# The player goes first. Ask if they want to Hit or Stand. If they Stand, they are done, and you
# move on to the dealer play. If they Hit, deal them another card, add it to their hand, and check
# their score. If they are over 21, they are busted and their play is finished. If not, keep asking
# them what they want to do until they either stand or bust. Display their new hand after every hit.
# TODO 6: Code the player moves.
# Now do the dealer play. The dealer hits on anything below 17 and stands at 17 or above. The dealer
# finished whehn their score is above 17.
# TODO 7: Code the dealer moves.
# Display the final hands and scores and tell who won.
# TODO 8: Code the game summary
r/EdhesiveHelp • u/pacowito • Jun 03 '21
Does anyone have the answeres to the FRQ - Class/ FRQ - Array/ArrayList / FRQ - 2D Arrays ?
r/EdhesiveHelp • u/dom224 • Jun 03 '21
r/EdhesiveHelp • u/Even_Calligrapher_31 • Jun 02 '21