Answer:
success = -10 <= number <= 10
Explanation:
I check that -10 is less than or equal to number, and number is less than or equal to 10.
sum_even Write a program that reads an integer 0 < n < 2^32, returns the sum of all digits in n that are divisible by 2. For example, if n = 341238 the output would be 14, because it is the sum of 4 + 2 + 8. Hint: a signed int may not be enough.
Answer:
Written in Python
n = int(input("Num: "))
sum_even = 0
if n > 0 and n < 2**32:
strn = str(n)
for i in range(0,len(strn)):
if int(strn[i])%2 == 0:
sum_even = sum_even+ int(strn[i])
print(sum_even)
Explanation:
This line prompt user for input
n = int(input("Num: "))
This line initializes sum_even to 0
sum_even = 0
This line checks for valid input
if n > 0 and n < 2**32:
This line converts input to string
strn = str(n)
This line iterates through each digit of the input
for i in range(0,len(strn)):
This if condition checks for even number
if int(strn[i])%2 == 0:
This adds the even numbers
sum_even = sum_even+ int(strn[i])
This prints the sum of all even number in the user input
print(sum_even)
Why the shape of a cell is hexagonal
Answer:
Hexagonal cell shape is perfect over square or triangular cell shapes in cellular architecture because it cover an entire area without overlapping i.e. they can cover the entire geographical region without any gaps.
I hope this helps
Pls mark as brainliest
Which of the following is a feature of high-level code?
Language makes it easier to detect problems
Requires a lot of experience
Easy for a computer to understand
Runs quicker
Using the Multiple-Alternative IFTHENELSE Control structure write the pseudocode to solve the following problem to prepare a contract labor report for heavy equipment operators: The input will contain the employee name, job performed, hours worked per day, and a code. Journeyman employees have a code of J, apprentices a code of A, and casual labor a code of C. The output consists of the employee name, job performed, hours worked, and calculated pay. Journeyman employees receive $20.00 per hour. Apprentices receive $15.00 per hour. Casual Labor receives $10.00 per hour.
Answer:
The pseudo-code to this question can be defined as follows:
Explanation:
START //start process
//set all the given value
SET Pay to 0 //use pay variable that sets a value 0
SET Journeyman_Pay_Rate to 20//use Journeyman_Pay_Rate variable to sets the value 20
SET Apprentices_Pay_Rate to 15//use Apprentices_Pay_Rate variable to sets the value 15
SET Casual_Pay_Rate to 10//use Casual_Pay_Rate variable to set the value 10
READ name//input value
READ job//input value
READ hours//input value
READ code//input value
IF code is 'J' THEN//use if to check code is 'j'
COMPUTE pay AS hours * JOURNEYMAN_PAY_RATE//calculate the value
IF code is 'A' THEN//use if to check code is 'A'
COMPUTE pay AS hours * APPRENTICES_PAY_RATE//calculate the value
IF code is 'C' THEN//use if to check code is 'C'
COMPUTE pay AS hours * CASUAL_PAY_RATE//calculate the value
END//end conditions
PRINT name//print value
PRINT job//print value
PRINT code//print value
PRINT Pay//print value
END//end process
(1) Prompt the user to enter a string of their choosing. Output the string.
Ex: Enter a sentence or phrase: The only thing we have to fear is fear itself. You entered: The only thing we have to fear is fear itself.
(2) Complete the GetNumOfCharacters() function, which returns the number of characters in the user's string. Use a for loop in this function for practice. (2 pts)
(3) In main(), call the GetNumOfCharacters() function and then output the returned result. (1 pt) (4) Implement the OutputWithoutWhitespace() function. OutputWithoutWhitespace() outputs the string's characters except for whitespace (spaces, tabs). Note: A tab is '\t'. Call the OutputWithoutWhitespace() function in main(). (2 pts)
Ex: Enter a sentence or phrase: The only thing we have to fear is fear itself. You entered: The only thing we have to fear is fear itself. Number of characters: 46 String with no whitespace: The only thing we have to fear is fear itself.
Answer:
The solution is given in the explanation section
See comments for detailed explanation of each step
Explanation:
import java.util.Scanner;
class Main {
public static void main(String[] args) {
//Prompting the User to enter a String
System.out.println("Enter a sentence or phrase: ");
//Receiving the string entered with the Scanner Object
Scanner in = new Scanner (System.in);
String user_word = in.nextLine();
//OutPuting User entered string
System.out.println("You entered: "+user_word);
//Calling the GetNumOfCharacters Method
System.out.println("Number of characters: "+ GetNumOfCharacters(user_word));
//Calling the OutputWithoutWhitespace Mehtod
System.out.println("String with no whitespace: "+OutputWithoutWhitespace(user_word));
}
//Creating the function GetNumOfCharacters()
//This function will return the number of characters
// in the string entered by the user_word
public static int GetNumOfCharacters (String word) {
int noOfCharacters = 0;
for(int i = 0; i< word.length(); i++){
noOfCharacters++;
}
return noOfCharacters;
}
//Creating the OutputWithoutWhitespace() method
//This method will remove all tabs and spaces from the original string
public static String OutputWithoutWhitespace(String word){
//Use the replaceAll all method of strings to replace all whitespaces with no space.
String new_string = word.replaceAll(" ","");
return new_string;
}
}
Given four values representing counts of quarters, dimes, nickels and pennies, output the total amount as dollars and cents. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: System.out.printf("Amount: $%.2f\n", dollars); Ex: If the input is: 4 3 2 1 where 4 is the number of quarters, 3 is the number of dimes, 2 is the number of nickels, and 1 is the number of pennies, the output is: Amount: $1.41 For simplicity, assume input is non-negative.
LAB ACTIVITY 2.32.1: LAB: Convert to dollars 0/10 LabProgram.java Load default template. 1 import java.util.Scanner; 2 3 public class LabProgram 4 public static void main(String[] args) { 5 Scanner scnr = new Scanner(System.in); 6 7 /* Type your code here. */|| 8 9) Develop mode Submit mode Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box Enter program input (optional) If your code requires input values, provide them here. Run program Input (from above) 1 LabProgram.java (Your program) Output (shown below) Program output displayed here
Answer:
The corrected program is:
import java.util.Scanner;
public class LabProgram{
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
int qtr, dime, nickel, penny;
double dollars;
System.out.print("Quarters: ");
qtr =scnr.nextInt();
System.out.print("Dimes: ");
dime = scnr.nextInt();
System.out.print("Nickel: ");
nickel = scnr.nextInt();
System.out.print("Penny: ");
penny = scnr.nextInt();
dollars = qtr * 0.25 + dime * 0.1 + nickel * 0.05 + penny * 0.01;
System.out.printf("Amount: $%.2f\n", dollars);
System.out.print((dollars * 100)+" cents");
}
}
Explanation:
I've added the full program as an attachment where I used comments as explanation
In __________ write, the data are stored in the cache, and control returns to the caller. Select one: a. a synchronous b. a buffered c. an asynchronous d. a non-buffered
Answer:
The correct answer to the question is option C (an asynchronous)
Explanation:
Computer store files in its temporary data storage space so as to facilitate easy retrievals when needed. Cache memory is in the temporary data storage space of the computer, faster than any other system memory so that when the processor requests information from the computer memory after a user place a command, the cache memory makes the information available in a short time when the data are required eliminating delay when ram will have to take time to fetch the data to provide to the processor.
In an asynchronous write, the data are stored in the cache to enable easy retrieval by the computer processor just as the cache is explained above, it allows writing data to the cluster. Asynchronous write also allows control returns to the caller.
My Mac is stuck on this screen? How to fix?
Answer:
Press and hold the power button for up to 10 seconds, until your Mac turns off. If that doesn't work, try using a cellular device to contact Apple Support.
Explanation:
If that also doesn't work try click the following keys altogether:
(press Command-Control-Eject on your keyboard)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This makes the laptop (macOS) instruct to restart immediately.
Hopefully this helps! If you need any additional help, feel free and don't hesitate to comment here or private message me!. Have a nice day/night! :))))
Another Tip:
(Press the shift, control, and option keys at the same time. While you are pressing those keys, also hold the power button along with that.)
(For at least 10 seconds)
1. When you write HTML code, you use ______ to describe the structure of information on a webpage. a. a web address b. tags c. styles d. links
Answer:
b. tags
Explanation:
When you write HTML code, you use tags to describe the structure of information on a webpage. These tags are represented by the following symbols <>. All of HTML is written using different types of tags such as <body>, <main>, <div>, <nav>, etc. Each of these serves a different purpose but are all used for structuring the specific information on a website so that the information is well organized and is not all on top of each other. This also allows for specific sections to be easily targeted and styles separately from the other sections.
Which categories format cells? Check all that apply. currency percentage data month date text
Answer:
currency
percentage
date
text
Explanation:
The category of format cells are currency, percentage, data, month, date, and text. The all options are correct.
What is Format Cells dialog box?In the Format Cells dialog box, you can configure the formatting options for your report objects.
For a row or column header and the values, you can format the number, font, alignment, border, and pattern.
The format cells command in Excel is used to change the formatting of cell numbers without changing the actual number.
We can change the number, alignment, font style, border style, fill options, and protection using the format cells. We can get to this option by right-clicking the mouse.
Currency, percentage, data, month, date, and text are examples of format cells.
Thus, all options are correct.
For more details regarding format cell, visit:
https://brainly.com/question/24139670
#SPJ2
Which is an example of an operating system
a
Adobe Photoshop
b
Internet Explorer
c
Windows
d
Microsoft Word
Answer:
windows
Explanation:
Examples of Operating Systems
Some examples include versions of Microsoft Windows (like Windows 10, Windows 8, Windows 7, Windows Vista, and Windows XP), Apple's macOS (formerly OS X), Chrome OS, BlackBerry Tablet OS, and flavors of Linux, an open-source operating system.
A pedometer treats walking 2,000 steps as walking 1 mile. Write a program whose input is the number of steps, and whose output is the miles walked. If the input is 5345, the output is 2.6725.
In python:
print(steps_walked / 2000)
This is Java! Help is appreciated :)
public class TvShow {
int x;
public TvShow(String showName, int numMinutes){
}
public int getNumActors(String actors){
//method code goes here but since it's just a signature we don't put anything here.
return 0;
}
TvShow show22 = new TvShow("Leave it to Beaver", x);
public double cost(int i){
return 0;
}
public static void main(String[] args) {
}
}
class Tester {
public static void main(String[] args) {
TvShow tv = new TvShow("", 0);
tv.show22.cost(0);
}
}
I hope this helps in some way!
What is his resolution amount
Write a program which simulate rolling dice. When the program runs, it will prompt the user to choose a number ranging from 1 to 6. It will then randomly choose a number between 1 and 6. The program will print the message "Your guess is correct!" if the guess number equals to the dice number, otherwise it will print "Wow! The dice number is --.". It should then ask the user if you’d like to roll again. Enter "1" to roll again and enter "0" to end the game. Concepts to keep in mind:
Concepts to keep in mind:
• Random
• Integer
• Print
• While Loops
Output:
Enter your guess number between 1 and 6: 5
Wow! The dice number is 1
Do you want to dice it up again:Enter 1 and if not enter 01
Enter your guess number between 1 and 6: 4
Wow! The dice number is 1
Do you want to dice it up again:Enter 1 and if not enter 01
Answer:
Written in Python
import random
tryagain = 1
while tryagain == 1:
guess = int(input("Enter your guess number between 1 and 6: "))
num = random.randint(1,7)
if guess == num:
print("Your guess is correct")
else:
print("Wow, the dice number is "+str(num))
tryagain = int(input("Do you want to dice it up again:Enter 1 and if not enter 0: "))
Explanation:
I've added the full source code as an image attachment where I used comments to explain difficult lines
Read the following code:
n = 3
while(n <= 5):
print(n)
n = n + 1
What output would be produced for the given values of n?
A. 0 1 2 3 4
B. 1 2 3 4 5
C. 2 3 4
D. 3 4 5
The code will print out 3 4 5
Answer choice D is correct.
The output that would be produced for the given values of n is 3 4 5. The correct option is D.
What are codes?Codes Program is a free developer platform where programmers can learn and share their knowledge. It is regarded as the simplest application development method, and it is frequently used as the standard (method).
Fixing code well into the software program because they discovered an error while composing the program, then he will modify the program, and then they will fix it again.
Less formally, code refers to text written for markup or styling languages such as HTML and CSS (Cascading Style Sheets). Good code is written in such a way that it is readable, understandable, covered by automated tests, not overly complicated, and does the job well."
Therefore, the correct option is D. 3 4 5.
To learn more about codes, refer to the below link:
https://brainly.com/question/14461424
#SPJ2
explain how to use the information in an outline to start writing a business document
Answer: document
Explanation:
802.11ac provides an advantage over 802.11n by incorporating increased channel bonding capabilities. What size bonded channels does 802.11ac support?
Answer:
The 802.11ac wireless standard takes channel bonding to a higher level because it can support 20MHz, 40MHz, and 80MHz channels, with an optional use of 160MHz channels.
Explanation:
The 802.11ac is a standardized wireless protocol established and accepted by the institute of electrical and electronics engineers (IEEE). 802.11ac as a wireless local area network (WLAN) protocol, has multiple amplitude and bandwidth, thus making it to be the first standard wireless protocol to have the ability to operate on a Gigabit (Gb) network.
Generally, the 802.11ac wireless standard provides an advantage over 802.11n by incorporating increased channel bonding capabilities. The 802.11ac wireless standard takes channel bonding to a higher level because it can support 20MHz, 40MHz, and 80MHz channels, with an optional use of 160MHz channels.
On the other hand, 802.11n is a standardized wireless protocol that can support either a 20MHz or 40MHz channel.
The author Darnell Littal belleves that "Beyond bad markets and economic news, the number one reason that mergers
fall is the absence of a well-understood
Answer:
human performance plan
Explanation:
(for odyssey users)
Which of the following is NOT an example of input?
a
voice command
b
mouse clicks
c
keyboard strokes
d
a pop-up box
Answer:
a pop-up box
Explanation:
A voice command, mouse clicks, or keyboard strokes is the user doing something. But a pop-up box is not. I realize that a popup box could contain a user input, but the box itself is not any sort of user input. It's the opposite.
A _____ is a smaller image of a slide.
template
toolbar
thumbnail
pane
The __________ list is intended to facilitate the development of the leading free network exploration tool.
Answer:
Nmap development list
Explanation:
The list being mentioned in this question is known as the Nmap development list. This list basically acts as an information gathering and analytical tool. It allows the user to easily roll out and integrate Nmap tools on a network in order to easily detect all of the IP addresses that are connected as well as analyze all of the details regarding each connected individual system. All of this information is highly valuable to a developer and facilitates the development process.
Main topics: Basic Java program
Programmatic output
Arithmetic Expressions
User input
Program Specification:
Write a Java program that calculates and outputs a baseball pitcher’s ERA in a reasonable report format. "ERA" is an acronym for "earned run average" and is computed using the following equation: number of earned runs multiplied by 9 and divided by number of innings pitched Your program must do the following: • Prompt the user for the first and last name of the pitcher and store them in two variables of type String • Prompt the user for the pitcher’s number of earned runs and store it in a variable of type int • Prompt the user for the pitcher’s number of innings pitched and store it in a variable of type int • Compute and output the pitcher’s ERA, which should be a (double) floating point number Sample run(s): Pitcher’s first name: Josh Pitcher’s last name: Hader Number of earned runs: 22 Number of innings pitched: 81 Josh Hader has an ERA of 2.4444444444444446
Answer:
Explanation:
import java.util.Scanner;
public class pitcherValues {
public static void main(String[] args) {
String firstName, lastName;
int earnedRuns, inningsPitched;
double ERA;
Scanner in = new Scanner(System.in);
System.out.println("Pitchers First Name is?");
firstName = in.nextLine();
System.out.println("Pitchers Last Name is?");
lastName = in.nextLine();
System.out.println("How many runs did the Pitcher earn?");
earnedRuns = in.nextInt();
System.out.println("How many innings did the Pitcher Pitch?");
inningsPitched = in.nextInt();
ERA = (earnedRuns * 9) / inningsPitched;
System.out.println(firstName + " " + lastName + " has an ERA of " + ERA);
}
}
1 megabyte is equal to 1024 gigabyte. True/False
Answer:
false
Explanation:
1 MB = 0.001 GB
Which orientation is wider than it is tall?
Portrait
Macro
Shutter
Landscape
Answer:
Landscape
Explanation:
Landscape orientation is wider than it is tall.
Answer:
Landscape
Explanation:
Find the maximum value and minimum value in milesTracker. Assign the maximum value to maxMiles, and the minimum value to minMiles. Sample output for the given program:
Min miles: -10
Max miles: 40
Here's what I have so far:
import java.util.Scanner;
public class ArraysKeyValue {
public static void main (String [] args) {
final int NUM_ROWS = 2;
final int NUM_COLS = 2;
int [][] milesTracker = new int[NUM_ROWS][NUM_COLS];
int i = 0;
int j = 0;
int maxMiles = 0; // Assign with first element in milesTracker before loop
int minMiles = 0; // Assign with first element in milesTracker before loop
milesTracker[0][0] = -10;
milesTracker[0][1] = 20;
milesTracker[1][0] = 30;
milesTracker[1][1] = 40;
//edit from here
for(i = 0; i < NUM_ROWS; ++i){
for(j = 0; j < NUM_COLS; ++j){
if(milesTracker[i][j] > maxMiles){
maxMiles = milesTracker[i][j];
}
}
}
for(i = 0; i < NUM_ROWS; ++i){
for(j = 0; j < NUM_COLS; ++j){
if(milesTracker[i][j] < minMiles){
minMiles = milesTracker[i][j];
}
}
}
//edit to here
System.out.println("Min miles: " + minMiles);
System.out.println("Max miles: " + maxMiles);
}
Answer: 40, 4
Explanation:
What is the proper syntax for writing a while loop in Python?
A. Begin the statement with the keyword repeat
B. End the statement with a colon
C. Place the test condition outside of parentheses
D. Use quotation marks around the relational operators
The proper syntax for while loops in Python are:
while (condition):
#the code does something
Answer choice B is the only correct option because all while loops end with a colon.
Answer:
End the statement with a colon
Explanation:
I took the test and got it right.
21. Duplicating a layer merges all of the layers and discards anything that is
not visible. True or False
True
False
Is the flow of power reversible in a cam and follower
Answer:
No
Explanation:
The Cam and Follower's input movement is rotary, and it's output movement is reciprocating. ... The Cam and Follower's flow of power is not reversible, but it's direction of travel is reversible. Cam and Followers can be found in cam shafts.
thank you very much for your email. ...... was very interesting
Answer:
WHAT DO YOU MEAN
Explanation:
THIS IS FOR QUESTIONS ONLY !!!!