Answer:
Explanation:
The following code is a Python program that allows you to input 100 marks. You can input the value -1 to exit the loop early. Once all the marks are entered the program prints out the highest mark among all of them. The output can be seen in the attached picture below with a test of a couple of marks.
marks = []
for x in range(100):
mark = int(input("Enter a mark: "))
if mark == -1:
break
else:
marks.append(mark)
print("Max value: " + str(max(marks)))
Scenario: A robot is sitting in a chair with its arms facing down. Write an algorithm, using pseudocode, to make the robot:
1. stand up2. walk forward until it senses a wall3. turn around4. walk back to the chair5. sit down in its original starting positionFinally, output the total number of steps taken.Commands--------In addition to our standard pseudocode commands, you must also use the following robot control commands:sitstandstep (one step forward)raise arms (parallel to floor)lower arms (pointing to floor)sense (only if arms are raised)turn (90 degrees right)Immediately after issuing a sense command, you can check whether the robot is at the wall as follows:if at wallor alternativelyif not at wallAssumptions-----------You must assume the following facts:The robot's initial sitting position is directly facing the target wall.There are no obstacles between the robot and the wall.The wall is 1 or more exact steps from the chair.The wall is sensed when it is less than 1 step from the robot's arms.The length of the robot's arms are slightly less than the length of 1 step.Your solution-------------Your solution must include all of the following:Adequate commentsInitialization and use of at least one variableSequential flow of controlConditional flow of controlIterative flow of controlHandling of any special casesOutput of the total number of steps takenYour solution-------------Your solution must include all of the following:Adequate commentsInitialization and use of at least one variableSequential flow of controlConditional flow of controlIterative flow of controlHandling of any special casesOutput of the total number of steps taken
Solution :
[tex]\text{Algorithm to}[/tex] stand [tex]$\etxt{up:}$[/tex]
step [tex]1[/tex]: [tex]$\text{stand}$[/tex]
step 2: [tex]\text{raise arms}[/tex]
[tex]\text{Algorithm to}[/tex] walk [tex]$\text{until it senses}$[/tex] a wall:
step [tex]1[/tex]: [tex]$\text{stand}$[/tex]
step 2: [tex]\text{raise arms}[/tex]
step 3: [tex]$\text{wallSensed}$[/tex]=false
step 4: [tex]$\text{numberOfSteps}$[/tex] = 0
step 5: if([tex]$\text{wallSensed}$[/tex]==true) then
[tex]\text{lower arms}[/tex]
step
else
if(sense)
[tex]$\text{wallSensed}$[/tex]=true;
else
step
[tex]$\text{numberOfSteps}$[/tex]++;
step 6: display [tex]$\text{numberOfSteps}$[/tex] to reach the wall
[tex]\text{Algorithm to}[/tex] turn around:
Step [tex]1[/tex]: if([tex]$\text{wallSensed}$[/tex]==true) then
turn
[tex]\text{raise arms}[/tex]
turn
[tex]\text{Algorithm to}[/tex] walk back[tex]$\text{ to the chair}$[/tex]:
Step [tex]1[/tex]: [tex]$\text{turn around}$[/tex]
Step 2: for i=[tex]1[/tex] to [tex]$\text{numberOfSteps}$[/tex] do
step
[tex]\text{Algorithm to}[/tex] sit back down:
Step [tex]1[/tex]: sit
Step 2: Lower arms
what would be the result of running these two lines of code
Ski
Surf
Jog
Hike
Answer:
Jog
Explanation:
The variable options is a list containing 5 string values
options = ["ski", "surf", "jog", "bike", "hike"]
Indexing in python starts from 0 ; hence the index values of the list values are :
0 - ski
1 - surf
2 - jog
3 - bike
4 - hike
The statement ;
print(options[2]) means print the string at index 2 in the list named options
The string at index 2 is jog ;
Hence, the string jog is printed.
LaToya is creating a program that will teach young children to type. What keyword should be used to create a loop that will print “try again” until the correct letter is typed
a. print
b. random
c. else
d. while
LaToya is creating a program that will teach young children to type. What keyword should be used to create a loop that will print “try again” until the correct letter is typed
Answer:d. while ✓
Explanation:
The while loop is used to repeat a section of code an unknown number of times until a specific condition is met.
[tex] \\ \\ [/tex]
Hope it helps
-------☆゚.・。゚ᵴɒƙυᴚᴀ_ƨȶäᴎ❀
% Write a procedure that calculates the sum of the numbers in % a given range. The parameters to this procedure should be % as follows: % % 1. The low end of the range % 2. The high end of the range % 3. The sum of the values in the range % % If the low end equals the high end, then the sum should be % whatever value is equal to the low/high end (the range is % inclusive). If the low end is greater than the high end, % then failure should occur.
Answer:
The procedure in python 3 is as follows:
def add_range(low,high):
if low<= high:
total = 0
for i in range(low,high+1):
total+=i
return total
else:
return "Failure"
Explanation:
This defines the function/procedure
def add_range(low,high):
If low is less or equal to high
if low<= high:
Initialize total to 0
total = 0
Add up numbers in the range
for i in range(low,high+1):
total+=i
Return the total
return total
If low is greater, then return failure
else:
return "Failure"
Describe Technology class using at least 3 adjectives
Answer:
clearly alien
typically inept
deadly modern
Explanation:
advantages of torsion in engineering
Answer:
Ascertain product failure
how do computers help us with our homework
xD I don't know if you said this as a joke, or if you're serious, but here:
A computer can be a helpful tool to complete your homework by giving you access to countless sources of information, it can also provide you with educational games which can enhance a child's learning ability by presenting learning as something fun and interactive as opposed to boring loads of repeated work which barely stimulate learning at all. But keep in mind that a computer can also take the opposite effect on a child's brain, and can gradually turn into addiction.
I hope this helps! :D
(FYI, I spent an unreasonable amount of time typing this all in, so I hope it makes any difference at all :P)
what is mobile computing
Explanation:
Mobile computing is human–computer interaction in which a computer is expected to be transported during normal usage, which allows for the transmission of data, voice, and video. Mobile computing involves mobile communication, mobile hardware, and mobile software. ... Hardware includes mobile devices or device components.
Question: what is mobile computing
Answer:
Mobile computing is human–computer interaction in which a computer is expected to be transported during normal usage, which allows for the transmission of data, voice, and video. Mobile computing involves mobile communication, mobile hardware, and mobile software. Communication issues include ad hoc networks and infrastructure networks as well as communication properties, protocols, data formats, and concrete technologies. Hardware includes mobile devices or device components. Mobile software deals with the characteristics and requirements of mobile applications.Explanation:
Hope it helps
#CarryOnLearning
____________ RAM resides on the processor
Answer:
Brain of the computer i.e Random Access memory RAM resides on the processor
Explanation:
Brain of the computer i.e Random Access memory RAM resides on the processor. RAM is located in the central processing unit (CPU) also called processor which is located within the motherboard of the computer. It carry out the commands.
which data type uses %i as a format specifier
Answer:
A decimal integer
Explanation:
Hope this helps!
What can be viewed in the Tasks folder? Check all that apply
Answer: task details; appointments; to do list
Explanation:
Task folders, simply allows an individual organize their tasks in a logical manner. It performs an identical function just like a file directory.
Folders can be created in the root folder. Once can also create them as subfolder in the other files. The task details, appointments and the to do list can be viewed in the task folder.
Blank Are input instructions you give to a computer
Explanation:
A computer is a machine that can be programmed to accept data (input), process it into useful information (output), and store it away (in a secondary storage device) for safekeeping or later reuse. The processing of input to output is directed by the software but performed by the hardware.
The network performance is said to be biased when _________.
a) It performs well on train set but poorly on dev set
b) it performs poorly on train set
c) Both the options
d) None of the options
Answer:
the answer for the question is B
The network performance is said to be biased when it performs poorly on train set.
What is network performance?A measurement regarding service or the state of quality of network received by the consumer is known as network performance. Operators can control the upper limit of a network performance.
When network operators or service providers put a cap and lower the speed of a network on a train set, it is said to be a biased network performance.
Hence, option B holds true regarding network performance.
Learn more about network performance here:
https://brainly.com/question/12968359
#SPJ2
Write code to take a String input from the user, then print the first and last letters of the string on one line. Sample run: Enter a string: surcharge se Hint - we saw in the lesson how to get the first letter of a string using the substring method. Think how you could use the .length() String method to find the index of the last character, and how you could use this index in the substring method to get the last character.
//import the Scanner class to allow for user input
import java.util.Scanner;
//Begin class definition
public class FirstAndLast{
//Begin the main method
public static void main(String []args){
//****create an object of the Scanner class.
//Call the object 'input' to receive user's input
//from the console.
Scanner input = new Scanner(System.in);
//****create a prompt to tell the user what to do.
System.out.println("Enter the string");
//****receive the user's input
//And store it in a String variable called 'str'
String str = input.next();
//****get and print the first character.
//substring(0, 1) - means get all the characters starting
//from the lower bound (index 0) up to, but not including the upper
//bound(index 1).
//That technically means the first character.
System.out.print(str.substring(0,1));
//****get and print the last character
//1. str.length() will return the number of character in the string 'str'.
//This is also the length of the string
//2. substring(str.length() - 1) - means get all the characters starting
// from index that is one less than the length of the string to the last
// index (since an upper bound is not specified).
// This technically means the last character.
System.out.print(str.substring(str.length()-1));
} // end of main method
} //end of class definition
Explanation:The code has been written in Java and it contains comments explaining important parts of the code. Kindly go through the comments.
The source code and a sample output have also been attached to this response.
To run this program, copy the code in the source code inside a Java IDE or editor and save it as FirstAndLast.java
write down the multiples of three from 474 to 483
Answer:
474, 477, 480, 483
hope this helps
have a good day :)
Explanation:
What is a
a program
Answer:
-a collection of related measures or activities aimed at achieving a specific long-term goal.
-a set of pre-programmed software instructions for controlling the operation of a computer or other machine
-provide (a computer or other machine) with pre-programmed instructions for completing a task automatically
-Organize according to a schedule or plan.
Explanation:
Answer:
A program is an set of instructions given by a computer to perform particular task
what is software? what are two types of software?
Answer:
Software is the collection of programs which makes computer work. The two types of software are 1)Application software
2)System software
A compound Boolean expression created with the _________ operator is true if either of its subexpressions is true.
Select the tasks that would be performed by an information systems graduate.
data mining
forest management
n software design
automotive design
construction planning
mainframe operations
NEXT QUESTION
ASK FOR HELP
I think data mining and software design.
Answer:
mainframe operations, data mining, software design
Explanation:
Define a method calcPyramidVolume with double data type parameters baseLength, baseWidth, and pyramidHeight, that returns as a double the volume of a pyramid with a rectangular base. calcPyramidVolume() calls the given calcBaseArea() method in the calculation.
Answer:
The method in C++ is as follows:
double calcPyramidVolume(double baseLength, double baseWidth, double pyramidHeight){
double baseArea = calcBaseArea(baseLength, baseWidth);
double volume = baseArea * pyramidHeight;
return volume;
}
Explanation:
This defines the calcPyramidVolume method
double calcPyramidVolume(double baseLength, double baseWidth, double pyramidHeight){
This calls the calcBaseArea method to calculate the base area of the pyramid
double baseArea = calcBaseArea(baseLength, baseWidth);
This calculates the volume
double volume = baseArea * pyramidHeight;
This returns the volume
return volume;
}
See attachment for complete program that include all methods that is required for the program to function.
three basic components to cloud computing are client, internet
Answer:
the basic components of cloud comuting in a simple topology
Question # 4
Fill in the Blank
Complete the following sentence.
The first email was sent in
.
Answer:
1971
Explanation:
If there is more detail needed i'm sorry
Answer:
1971
Explanation:
#Nova
Have a great day!
:)
Which of the following passes an int argument into a method named print? Chose one option and explain why.
o print();
o print()+5;
o print("5");
o print(5);
Answer:
print(5)
Explanation:
Passing an int argument into the method named print ;
print() ; Here, the print method has no argument as it is empty
print()+5; Here also, the print method has no argument and adding +5 is an invalid syntax.
print("5") ; Here, print takes in an argument, however, the argument is a string due to the fact that 5 is enclosed by quotation marks.
print(5) ; Here, the integer is 5 is passed to the print method.
Which programming paradigm does the programming language JavaScript follow?
A. procedural programming
B. object-oriented programming
C. functional programming
D. Imperative programming
Its not functional programming (sorry)
Answer:
Object-oriented programming
Explanation:
Just took the test and got it right
Happy to help !!
Let L be the set of exactly those strings over the alphabet \Sigma = {a, b, c, g}, that satisfy all of the following properties: the length of the string is equal to 5n+3, for some natural number n greater or equal than 0; all of the first (leftmost) 2n symbols are elements of the set {b, c, g}; all of the last (rightmost) 3n symbols are elements of the set {a, b}; the symbols at position 2n+1, 2n+2, and 2n+3 (from the left, i.e., after the first 2n symbols but before the last 3n symbols) are elements of the set {c, g}; Write a complete formal definition of a context free grammar that generates L. If such a context free grammar does not exist, state that the context free grammar does not exist, and prove it.
Answer:
S -> LSR
S -> M
M -> YYY
Y -> c | g
L -> XX
X -> b | c | g
R -> ZZZ
Z -> a | b
Explanation:
This is a long time ago, but I think this does what you want.
Start symbol S expands to LSR and allows you to grow L and R on either side as much as you want. Ultimately S must be replaced by M. Then you have a pattern like LLLLLMRRRRR.
We can then further break down L into 2 times b, c or g, and similar for M and R.
Which of the following describes an iteration in a computer program?
Answer:
a set of instructions that can be run multiple times throughout a program
Explanation:
Write a function that accepts a positive random number as a parameter and returns the sum of the random number's digits. Write a program that generates random numbers until the sum of the random number's digits divides the random number without remainder. assembly language
Answer:
Explanation:
The following Python program has a function called addDigits which takes a number as a parameter and returns the sum of the digits. Then the program creates a loop that keeps creating random numbers between 222 and 1000 and divides it by the value returned from the function addDigits. If the remainder is 0 is prints out a statement and breaks the loop, ending the program. The picture below shows the output of the program.
import random
def addDigits(num):
sum = 0
for x in str(num):
sum += int(x)
return sum
sum = addDigits(random.randint(222, 1000))
while True:
myRandomNum = random.randint(2, 99)
if (sum % myRandomNum) == 0:
print("No remainder between: " + str(sum) + " and " + str(myRandomNum))
break
Advancements in technology often make computer
hardware and software more convenient to use as
well as able to fit a variety of budgets. As
technology advances, it usually gets
smaller and less expensive.
larger and more expensive.
Answer: smaller and less expensive.
Explanation:
As technology advances, the architects of the devices that we use are getting more efficient in the production of said devices such that they are using better materials and techniques in production.
This has led to a situation where devices are increasingly getting smaller in size and cheaper to afford as well. For instance, compare the computers of today to those of the 90's. We have laptops now which are really slim and cost a fraction of what the bulky computers of those days cost.
Amy’s new summer job at the pool will put $9 per hour. Which term describes this type of hourly income?
A. Salary
B. Take-home pay
C. Wage
D. All of the above
Answer:
d
Explanation:
17. Which of the following keyboard shortcut is used to copy the selected text?
a. Ctrl+c
b. Ctrl+V
c. Ctrl+X
d. Ctrl+Z
Answer:
ctrl+c is used to copy the selected text
Answer:
A. Ctrl+c
Explanation:
I took the test, also you can use Command c and Command v to copy and paste.