def area(side1, side2): return side1 * side2 s1 = 12 s2 = 6 Identify the statements that correctly call the area function. Select ALL that apply. Question options: area(s1,s2) answer = area(s1,s2) print(f'The area is {area(s1,s2)}') result = area(side1,side2)
Q: Java Script You go to a jewelry shop and try to find the most expensive piece of jewelry. You write…
A: Algorithm - Design a method with one argument as a string. Now use the below logic to solve the…
Q: public void setQuantity(int quantity}{ minimum quantity is 10 if invalid set it to 10 if(quantity <…
A: Given: Fill in the blanks.
Q: C++ Visual 2019 A particular talent competition has five judges, each of whom awards a score…
A: Note: As score can double data type ,so, return type of findLowest() and findHighest() function…
Q: Package Newton’s method for approximating square roots (Case Study: Approximating Square Roots) in a…
A: Given: Package Newton’s method for approximating square roots (Case Study: Approximating Square…
Q: (Prism Program) Write a program that can calculate the value of the surface area and volume of a…
A: As Programming language is not mentioned, taking C as reference. Inputs : Lenght, Width and Height…
Q: **3.19 (Geometry: point in a circle?) Write a program that prompts the user to enter a point (x, y)…
A: Step-1: StartStep-2: Declare variable x, y, distanceStep-3: Calculate distance by using square root…
Q: Write a Program to create 10 object of student which contains given information e.g. name, roll…
A: Required: Write a Program to create 10 object of student which contains given information e.g. name,…
Q: tunction name: is_long o parameters:a string word • returns: True if word has more than 12…
A: I have given an answer in step 2.
Q: Create a calculator.py and ask user for two numbers and an operator (+.-J. ) and output the result.…
A: According to the Question below the Solution: Program Output:
Q: Write a program to add members of two different classes using friend Function.
A: A friend function is a function that is specified outside a class but has the ability to access the…
Q: Evaluate every numbered line of statements. In the textbox provided, type VALID if the statement is…
A: 1. VALID Statement1 is defining an interface named Drawable with 2 methods Numside() and draw() 2.…
Q: Java Programming Travel Tickets Company sells tickets for airlines, tours, and other travel-related…
A: Prompt and read the ticket_number Convert the string ticket_number to the long integer and store it…
Q: C
A:
Q: A particular talent competition has 5 judges, each of whom awards a score between 0 and 10 to each…
A: Given: To write a program that uses these rules to calculate and display a contestant’s score. A…
Q: Enter the number of days: Day Cents $ 0.01 2 $ 0.02 3 $ 0.04 4 $ 0.08 $ 0.16 $ 0.32 $ 0.64 $ 1.28 $…
A: Find Your Code Below
Q: Java Script You go to a jewelry shop and try to find the most expensive piece of jewelry. You write…
A: The Javascript code is given below with output screenshots
Q: expression? word = 'object oriented' print word[0] print word[7] print word[5] print word[-1] o, 0,…
A: String: In python, strings are used to store the array of characters. There is no datatype named…
Q: In C++ class rectangleType { public: void setLengthWidth(double x, double y); //Sets the…
A: A C++ program to compute the area and perimeter of a rectangle using class structure.
Q: Java Script You go to a jewelry shop and try to find the most expensive piece of jewelry. You write…
A: Algorithm - Design a method with one argument as a string. Now use the below logic to solve the…
Q: 3. Write an application that reads the radius of a sphere then calculates and displays the…
A: Introduction
Q: symbol: variable circleArea location: class Geometry Geometry.java:114: error: cannot find symbol…
A: Below is the code :-
Q: Microsoft Visual C# debugging exercise 5-2 for chapter 5. This is my code but it gave me an error.…
A: // Hi Buddy, You have done a fabulous job but made a mistake at one point i.e. in while loop, you…
Q: Widgets and Gizmos An online retailer sells two products: widgets and gizmos. Each widget weighs 75…
A: code is given below:
Q: A code in c++ or python A program that asks you to enter the name of a movie or series, and then…
A: #using python#asking user to enter movie or series namename = input('Enter name of a…
Q: C# language A bank is offering Gold and Silver Credit Cards to its customers. Gold Card allows a…
A: using System; class InvalidCreditAmount : Exception{ public InvalidCreditAmount(String…
Q: This program assigns values to two variables // and performs mathematical operations with them
A: Errors 1. System.out.println("adding " + x + y); The above statement concatenates the value of x and…
Q: Transcribed Image Text JAVA Programming Problem: In the game of "Assassin's Creed", you control a…
A: As per the given problem statement we are required to develop a JAVA program to output the number of…
Q: .35 (Sides of a Triangle) Write an application that reads three nonzero values entered by the user…
A: #include <iostream>using namespace std; int main(){ double a, b, c;…
Q: 1- Three variables : side, volume, area 2- One constructor function to input data of side 3- One…
A: The solution involves usage of OOPS concepts. NOTE: The solution is written in C++ language.
Q: Instructions Define an enumeration type triangleType that has the values scalene, isosceles,…
A: 1) define enumeration 2)declare prototype for the function 3) write switch cases for knowing the…
Q: What is the benefit of being able to define an initial value when you can assign a value to a…
A: Introduction: Variables hold data like numbers and words, whereas operators are symbols that execute…
Q: Function Name: compliments Parameters: answer1 - a boolean (True or False) representing whether the…
A: Solution:The following function displays the outputs as string of compliments.
Q: Write method IsEven that uses the remainder operator (%) to determine whether an integer is even.…
A: Program : import java.util.Scanner; public class Main { public static boolean isEven(int z){…
Q: Java Script You go to a jewelry shop and try to find the most expensive piece of jewelry. You write…
A: In this problem, we need to design a javascript program. Input - one map with multiple arguments…
Q: PYTHON GUI - Tkinker) Write a Python program GUI that reads the following information from user,…
A: user = strend = "0"hours = round(40,2)print("One Stop Shop Payroll Calculator")while user != end:…
Q: Assume that the population of Mexico is 128 million and that the population increases 1.01 percent…
A: GIVEN: import java.util.*;public class Main { public static void main(String[] args) {…
Q: Java Class: Fundraiser You are a fundraising distributor who needs to to pre-sell a limited number…
A: A java program is defined as a class with a main function defined inside the class. The main program…
Q: ++ program int quadrant() This method will return at which quadrant does this point lie in our…
A: Required: C++ program int quadrant() This method will return at which quadrant does this point lie…
Q: Java Script You go to a jewelry shop and try to find the most expensive piece of jewelry. You write…
A: In this problem, we need to design a javascript program. Input - one map with multiple arguments…
Q: Note: The code is written you can just tell the explanation what is happening in the code Explain in…
A: The program is for getting next prime number. The explanation of the following code is given by:…
Q: Q1 Answer the following: 1- It is possible in visual basic 6.0 to detect the errors while the…
A: (1) In visual basic , there are three categories of errors : Syntax error , Run time error and logic…
Q: TOPICS: Using Classes and Objects MUST BE IN JAVA. PLEASE USE COMMENTS AND WRITE THE CODE IN…
A:
Q: Create a package folder named shapes. Inside this package, place two more package folders: 2d and…
A: Programming instructions: Create a folder named shapes. In this package, create two more folders…
Q: Java Program 01 - Theater Ticket System A small ten-seat theater has contracted you to build…
A: .
Q: Module main() // Local variables Declare Real width, length, area // Get the rectangle's…
A: A function is the set of operations performed as a group. A program should contain one main()…
Q: Program Unit Score Calculator Console App Write a Python Console Application program that allows…
A: First, we will input all the marks. Then we will find the total marks by doing the summation of all…
Q: Test Average and Grade rite a program that asks the user to enter five test scores. The program…
A: Define java.util.Scanner for taking inputs. Define main class. Define main function. Define int…
Q: class Calculator: # Type your code here. if __name__ == "__main__": calc = Calculator();…
A: Solution: Given, class Calculator: # Type your code here. if __name__ == "__main__":…
Q: Create a grade calculator that computes for the semestral grade of a course. Students could type…
A: Python Code: # Enter the name, course, Prelim, mid term and finalName = input("Enter Student Name:…
def area(side1, side2):
return side1 * side2
s1 = 12
s2 = 6
Identify the statements that correctly call the area function. Select ALL that apply.
Question options:
|
area(s1,s2) |
|
answer = area(s1,s2) |
|
print(f'The area is {area(s1,s2)}') |
|
result = area(side1,side2) |
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- Text-based adventure game: Pretend you are creating a text-based adventure game. At different points in the game, you want the user to select to fight, run, or hide from certain enemies. Modify the application below (week3.py) so that the selection variable is sent as an argument into the choice() function. The user should enter 1 to fight, 2 to run, or 3 to hide in the main(). The choice() function should print one of the three options. You will need to add an if statement in the choice() function to make the correct selection.def area(side1, side2): return side1 * side2s1 = 12s2 = 6 Identify the statements that correctly call the area function. Select ALL that apply. Question options: A print(f'The area is {area(s1,s2)}') B answer = area(s1,s2) C result = area(side1,side2) D area(s1,s2)def main(): monthlySales = getSales() printbonus=print_bonus(storeAmount,empAmount) #This function gets the monthly salesdef getSales(): monthlySales = float(input('Enter the monthly sales $')) monthlySales = getSales() #call to get sales salesIncrease = getIncrease(monthlySales) return monthlySales #This function gets the percent of increase in salesdef getIncrease(monthlySales): storeAmount = storeBonus(monthlySales) salesIncrease = float(input('Enter percent of sales increase: ')) salesIncrease = float(salesIncrease) salesIncrease = salesIncrease / 100 return salesIncrease #This function determines the storeAmount bonusdef storeBonus(monthlySales): if monthlySales >= 110000: storeAmount = 6000 elif monthlySales >= 100000: storeAmount = 5000 elif monthlySales >= 90000: storeAmount = 4000 elif monthlySales >=80000: storeAmount = 3000 else: storeAmount = 0 return storeAmount #This function…
- Assignment Description This program will simulate part of the game of Yahtzee! This is a dice game that involves rolling five dice and scoring points based on what show up on those five dice. The players would record their scores on a score card, and then total them up, and the player with the larger total wins the game. A Yahtzee score card has two portions: The upper portion has spaces for six scores, obtained by adding up all of the 1's, 2's, 3's, etc. The lower portion has special scores for various combinations: Three of a kind -- at least 3 dice are the same number;the score is the sum of all five dice Four of a kind -- at least 4 dice are the same number;the score is the sum of all five dice Small straight -- four consecutive numbers are represented, e.g. 2345;the score is 25 points Large straight -- five consecutive numbers are represented, e.g. 23456;the score is 30 points Full House -- three of one kind, two of another; the score is 30 points Yahtzee! -- five of a kind; the…MONTY HALL LAB write this code in python and use # to answers questions - You are only allowed to use the following functions/methods: print(), range(), len(), sum(), max(), min(), and .append(). It is not mandatory to useall of these functions/methods. In this lab, you will write a code that simulates the Monty Hall Game Show. Thegame host gives the participant the choice of selecting one of three doors. Twodoors has a goat behind them and one door has a prize. The set of choices arerandomized each round. The participant needs to select the door with the prizebehind it. When the participant selects a door, the game host reveals a door with agoat behind it. The game host opens a door (different from the one selected by theparticipant) that has a goat behind it. The participant is then given the option tochange their choice. When you run your code, the code would display a message prompting the user toinput their door choice, labelled as 1, 2, and 3. Then the code will display a…write the psuedocode and drow the flowchart Create a program to enter grades and calculate averages and letter grades. Need a class which will contain: Student Name Student Id Student Grades (an array of 3 grades) A constructor that clears the student data (use -1 for unset grades) Get functions for items a, b, and c, average, and letter grade Set functions for items a, n, and c Note that the get and set functions for Student grades need an argument for the grade index. Need another class which will contain: An Array of Students (1 above) A count of number of students in use You need to create a menu interface that allows you to: Add new students Enter test grades Display all the students with their names, ids, test grades, average, and letter grade Exit the program Add comments and use proper indentation.
- The data type bool: Group of answer choices Can only be used in a selection statement. Can take on any expression as a value. Can take on values -1, 0 or 1. Can take on values true and false.Java Program 01 - Theater Ticket System A small ten-seat theater has contracted you to build software which will reserve tickets. The theater has two rows of five seats each. Each row is referred to by number (1 or 2) and each seat in the row is referred to by letter (A, B, C, D, and E). When started, the program should ask the user for the row they prefer (row selection). If that row has no empty seats then the program should ask the user if they prefer the other row, if no then display a message stating the next show is tomorrow. Upon selecting a row, the program should present the user with a choice of available seats in the row. The user can then either choose a seat and print the ticket (in this case a simple message will suffice) or return to row selection. If a ticket is printed the program should return to row selection. The program terminates when all seats are reserved. Please enter a row: 1 Available seats: A B C D E Which seat, enter Q for none?: B You have…а. int GreaterThan(int no) { if (no > 10) printf("%d is greater than 10", no); else printf("%d is less than 10", no); }
- Theater Ticket System: A small ten-seat theater has contracted you to build software which will reserve tickets. The theater has two rows of five seats each. Each row is referred to by number (1 or 2) and each seat in the row is referred to by letter (A, B, C, D, and E). When started, the program should ask the user for the row they prefer (row selection). If that row has no empty seats then the program should ask the user if they prefer the other row, if no then display a message stating the next show is tomorrow. Upon selecting a row, the program should present the user with a choice of available seats in the row. The user can then either choose a seat and print the ticket (in this case a simple message will suffice) or return to row selection. If a ticket is printed the program should return to row selection. The program terminates when all seats are reserved. Please enter a row: 1 Available seats: A B C D E Which seat, enter Q for none?: B You have booked seat: 1B…Theater Ticket System: A small ten-seat theater has contracted you to build software which will reserve tickets. The theater has two rows of five seats each. Each row is referred to by number (1 or 2) and each seat in the row is referred to by letter (A, B, C, D, and E). When started, the program should ask the user for the row they prefer (row selection). If that row has no empty seats then the program should ask the user if they prefer the other row, if no then display a message stating the next show is tomorrow. Upon selecting a row, the program should present the user with a choice of available seats in the row. The user can then either choose a seat and print the ticket (in this case a simple message will suffice) or return to row selection. If a ticket is printed the program should return to row selection. The program terminates when all seats are reserved.Need help coding in Java Create an application that contains an enumeration that represents the days of the week. Display a list of the days, and then prompt the user for a day. Display business hours for the chosen day. Assume that the business is open from 11 - 5 on Sunday, 9 - 9 on weekdays, and 10 - 6 on Saturday.