Your assignment is to write an assembly language program which read a string and print it in uppercase. This program asks the user to enter a string which is subsequently displayed in uppercase. It is important to first ensure that string to be converted is in the a-z range. The program does not recognize any space, symbols or any kind of punctuation marks. Any time the user enters any of this character the program is going to repeatedly ask for the valid string.

An example execution of your program could be:
Please enter your string: 1winter
Invalid Entry!
Please enter your string: summer
Your capitalized string:SUMMER

Answers

Answer 1

Answer:

try this

Explanation:

MSG1 DB 10,13,'enter any string:-$'

MSG2 DB 10,13,'converted string is:-$'

P1 LABEL BYTE

M1 DB 0FFH

L1 DB?

P11 DB 0FFH DUP<'$'>

DATA ENDS

DISPLAY MARCO MSG

MOV AH,9

LEA DX,MSG

INT 21H

ENDM

CODE SEGMENT

ASSUME CS: CODE,DS:DATA

START:

MOV AX,DATA

MOV DS,AX

DISPLAY MSG1

LEA DX,P1

MOV AH,0AH

INT 21H

DISPLAY MSG2

LEA SI,P1

MOV CL,L1

MOV CH,0

CHECK:

CMP[SI],61H

JB DONE

CMP[SI],5BH

UPR: SUB[SI],20H

DONE: INC SI

LOOP CHECK

DISPLAY P11

MOV AH,4CH

INT 21H

CODE ENDS

END START


Related Questions

Rideshare companies like Uber or Lyft track the x,y coordinates of drivers and customers on a map. If a customer requests a ride, the company's app estimates the minutes until the nearest driver can arrive. Write a method that, given the x and y coordinates of a customer and the three nearest drivers, returns the estimated pickup time. Assume drivers can only drive in the x or y directions (not diagonal), and each mile takes 3.5 minutes to drive. All values are doubles; the coordinates of the user and of the drivers are stored as arrays of length 2. 289222.1780078.qx3zqy7

Answers

Answer:

The program in Java is as follows:

import java.util.*;

public class Main{

 public static void main (String[]args){

   Scanner input = new Scanner(System.in);

   double user[] = new double[2];    double dr1[] = new double[2];

   double dr2[] = new double[2];    double dr3[] = new double[2];    

   System.out.print("Enter user coordinates: ");

   for(int i =0;i<2;i++){        user[i] = input.nextDouble();    }

   System.out.print("Enter driver 1 coordinates: ");

   for(int i =0;i<2;i++){        dr1[i] = input.nextDouble();    }

   System.out.print("Enter driver 2 coordinates: ");

   for(int i =0;i<2;i++){        dr2[i] = input.nextDouble();    }

   System.out.print("Enter driver 3 coordinates: ");

   for(int i =0;i<2;i++){        dr3[i] = input.nextDouble();    }

   double dr1dist = Math.abs(user[0] - dr1[0]) + Math.abs(user[1] - dr1[1]);

   double dr2dist = Math.abs(user[0] - dr2[0]) + Math.abs(user[1] - dr2[1]);

   double dr3dist = Math.abs(user[0] - dr3[0]) + Math.abs(user[1] - dr3[1]);

   System.out.println("Estimated pickup time of driver 1 "+(3.5 * dr1dist)+" minutes");

   System.out.println("Estimated pickup time of driver 2 "+(3.5 * dr2dist)+" minutes");

   System.out.println("Estimated pickup time of driver 3 "+(3.5 * dr3dist)+" minutes");

 }

}

Explanation:

The following array declarations are for the customer and the three drivers

   double user[] = new double[2];    double dr1[] = new double[2];

   double dr2[] = new double[2];    double dr3[] = new double[2];    

This prompts the user for the customer's coordinates

   System.out.print("Enter user coordinates: ");

This gets the customer's coordinate

   for(int i =0;i<2;i++){        user[i] = input.nextDouble();    }

This prompts the user for the driver 1 coordinates

   System.out.print("Enter driver 1 coordinates: ");

This gets the driver 1's coordinate

   for(int i =0;i<2;i++){        dr1[i] = input.nextDouble();    }

This prompts the user for the driver 2 coordinates

   System.out.print("Enter driver 2 coordinates: ");

This gets the driver 2's coordinate

   for(int i =0;i<2;i++){        dr2[i] = input.nextDouble();    }

This prompts the user for the driver 3 coordinates

   System.out.print("Enter driver 3 coordinates: ");

This gets the driver 3's coordinate

   for(int i =0;i<2;i++){        dr3[i] = input.nextDouble();    }

This calculates the distance between driver 1 and the customer

   double dr1dist = Math.abs(user[0] - dr1[0]) + Math.abs(user[1] - dr1[1]);

This calculates the distance between driver 2 and the customer

   double dr2dist = Math.abs(user[0] - dr2[0]) + Math.abs(user[1] - dr2[1]);

This calculates the distance between driver 3 and the customer

   double dr3dist = Math.abs(user[0] - dr3[0]) + Math.abs(user[1] - dr3[1]);

The following print statements print the estimated pickup time of each driver

  System.out.println("Estimated pickup time of driver 1 "+(3.5 * dr1dist)+" minutes");

   System.out.println("Estimated pickup time of driver 2 "+(3.5 * dr2dist)+" minutes");

   System.out.println("Estimated pickup time of driver 3 "+(3.5 * dr3dist)+" minutes");

What is Machine Learning (ML)?

Answers

Answer:

Explanation:

Machine learning is a branch of artificial intelligence (AI) and computer science which focuses on the use of data and algorithms to imitate the way that humans learn, gradually improving its accuracy.

Answer:

Machine learning is a type of learning that makes learning easy and faster with the help of electrical devices such as mobile phones,laptops etc

Explanation:

This enable the user to work faster and easily with no stress at all

name the reactants in the equation P+O​

Answers

Reactants are the factors that yield the subdivision of a molecule. Products are the result of this division. In other words, reactants are left of the equation and products are on the right. P+O are reactants, but the product is not shown.

Write the MIPS assembly code to find the area of a given shape. Your program must take a floating-point value and shape (Circle - 1, Triangle - 2, Square - 3) as input and return the circumference/perimeter and area of the shape. Assume the floating-point value units are meters and the triangle is an equilateral triangle. [Note: you can search for the expression to calculate the area and circumference/perimeter of these shapes]

Answers

Answer:

Explanation:

.data

msg1: .asciiz "Enter the floating point value = "

msg2: .asciiz "\nEnter the shape (Circle - 1, Triangle - 2, Square - 3) = "

msg3: .asciiz "\nThe perimeter of the triangle with side = "

msg4: .asciiz " meters is "

msg5: .asciiz " meters.\n"

msg6: .asciiz "\nThe area of the triangle with side = "

msg7: .asciiz " square meters.\n"

msg8: .asciiz "\nThe circumference of the circle with radius = "

msg9: .asciiz "\nThe area of the circle with radius = "

msg10: .asciiz "\nThe perimeter of the square with side = "

msg11: .asciiz "\nThe area of the square with side = "

pi: .float 3.1415816

eq_tr_area: .float 0.43305186

two: .float 2

three: .float 3

four: .float 4

.text

li $v0,4           # system call code for printing string = 4

la $a0,msg1       # load address of string to be printed into $a0

syscall           # call operating system to perform print operation

li $v0,6           # system call code for reading floating point number

syscall           # call operating system to perform read operation

li $v0,4           # system call code for printing string = 4

la $a0,msg2       # load address of string to be printed into $a0

syscall           # call operating system to perform print operation

li $v0,5           # system call code for reading integer

syscall           # call operating system to perform read operation

move $t0,$v0

IF:

bne $t0,1,ELSE_IF   #if not 1 then goto elseif

li $v0,4           # system call code for printing string = 4

la $a0,msg8       # load address of string to be printed into $a0

syscall           # call operating system to perform print operation

li $v0, 2       # system call code for printing float = 2

mov.s $f12,$f0       #move the single precision f2 in f12

syscall           # call operating system to perform print operation

li $v0,4           # system call code for printing string = 4

la $a0,msg4       # load address of string to be printed into $a0

syscall           # call operating system to perform print operation

l.s $f1,pi

l.s $f3,two

mul.s $f3,$f3,$f1   #calculate 2*pi*radius

mul.s $f3,$f3,$f0

li $v0, 2       # system call code for printing float = 2

mov.s $f12,$f3       #move the single precision f2 in f12

syscall           # call operating system to perform print operation

li $v0,4           # system call code for printing string = 4

la $a0,msg5       # load address of string to be printed into $a0

syscall           # call operating system to perform print operation

li $v0,4           # system call code for printing string = 4

la $a0,msg9       # load address of string to be printed into $a0

syscall           # call operating system to perform print operation

li $v0, 2       # system call code for printing float = 2

mov.s $f12,$f0       #move the single precision f2 in f12

syscall           # call operating system to perform print operation

li $v0,4           # system call code for printing string = 4

la $a0,msg4       # load address of string to be printed into $a0

syscall           # call operating system to perform print operation

mul.s $f2,$f0,$f0   #calculate radius *radius

mul.s $f2,$f2,$f1   #calculate pi *r^2

li $v0, 2       # system call code for printing float = 2

mov.s $f12,$f2       #move the single precision f2 in f12

syscall           # call operating system to perform print operation

li $v0,4           # system call code for printing string = 4

la $a0,msg7       # load address of string to be printed into $a0

syscall  

ELSE_IF:

bne $t0,2,ELSE       #if not 2 then check else

li $v0,4           # system call code for printing string = 4

la $a0,msg3       # load address of string to be printed into $a0

syscall           # call operating system to perform print operation

li $v0, 2       # system call code for printing float = 2

mov.s $f12,$f0       #move the single precision f2 in f12

syscall           # call operating system to perform print operation

li $v0,4           # system call code for printing string = 4

la $a0,msg4       # load address of string to be printed into $a0

syscall           # call operating system to perform print operation

l.s $f3,three

mul.s $f3,$f3,$f0   #calculate 3*side

li $v0, 2       # system call code for printing float = 2

mov.s $f12,$f3       #move the single precision f2 in f12

syscall           # call operating system to perform print operation

li $v0,4            

la $a0,msg5        

syscall            

li $v0,4            

la $a0,msg6        

syscall          

li $v0, 2        

mov.s $f12,$f0        

syscall            

li $v0,4            

la $a0,msg4      

syscall            

l.s $f3,eq_tr_area    

mul.s $f2,$f0,$f0    

mul.s $f2,$f2,$f3    

li $v0, 2      

mov.s $f12,$f2      

syscall            

li $v0,4            

la $a0,msg7        

syscall  

ELSE:

bne $t0,3,END        

li $v0,4            

la $a0,msg10        

syscall            

li $v0, 2        

mov.s $f12,$f0        

syscall            

li $v0,4            

la $a0,msg4        

syscall            

l.s $f3,four      

mul.s $f3,$f3,$f0    

li $v0, 2        

mov.s $f12,$f3      

syscall            

li $v0,4          

la $a0,msg5        

syscall            

li $v0,4          

la $a0,msg11      

syscall            

li $v0, 2        

mov.s $f12,$f0      

syscall            

li $v0,4          

la $a0,msg4        

syscall          

mul.s $f2,$f0,$f0    

li $v0, 2        

mov.s $f12,$f2      

syscall            

li $v0,4            

la $a0,msg7        

syscall  

END:

li $v0,10        

syscall          

Code is as follows:

.data

msg1: .asciiz "Enter the floating point value = "

msg2: .asciiz "\nEnter the shape (Circle - 1, Triangle - 2, Square - 3) = "

msg3: .asciiz "\nThe perimeter of the triangle with side = "

msg4: .asciiz " meters is "

msg5: .asciiz " meters.\n"

msg6: .asciiz "\nThe area of the triangle with side = "

msg7: .asciiz " square meters.\n"

msg8: .asciiz "\nThe circumference of the circle with radius = "

msg9: .asciiz "\nThe area of the circle with radius = "

msg10: .asciiz "\nThe perimeter of the square with side = "

msg11: .asciiz "\nThe area of the square with side = "

pi: .float 3.1415816

eq_tr_area: .float 0.43305186

two: .float 2

three: .float 3

four: .float 4

.text

li $v0,4           # system call code for printing string = 4

la $a0,msg1       # load address of string to be printed into $a0

syscall           # call operating system to perform print operation

li $v0,6           # system call code for reading floating point number syscall           # call operating system to perform read operation

li $v0,4           # system call code for printing string = 4 la $a0,msg2       # load address of string to be printed into $a0 syscall           # call operating system to perform print operation

li $v0,5           # system call code for reading integer syscall           # call operating system to perform read operation move $t0,$v0

IF:

bne $t0,1,ELSE_IF   #if not 1 then goto elseif

li $v0,4           # system call code for printing string = 4

la $a0,msg8       # load address of string to be printed into $a0

syscall           # call operating system to perform print operation

li $v0, 2       # system call code for printing float = 2 mov.s $f12,$f0       #move the single precision f2 in f12 syscall           # call operating system to perform print operation

li $v0,4           # system call code for printing string = 4 la $a0,msg4       # load address of string to be printed into $a0

syscall           # call operating system to perform print operation

l.s $f1,pi l.s $f3,two

mul.s $f3,$f3,$f1   #calculate 2*pi*radius

mul.s $f3,$f3,$f0

li $v0, 2       # system call code for printing float = 2

mov.s $f12,$f3       #move the single precision f2 in f12

syscall           # call operating system to perform print operation

li $v0,4           # system call code for printing string = 4

la $a0,msg5       # load address of string to be printed into $a0

syscall           # call operating system to perform print operation

li $v0,4           # system call code for printing string = 4

la $a0,msg9       # load address of string to be printed into $a0

syscall           # call operating system to perform print operation

li $v0, 2       # system call code for printing float = 2

mov.s $f12,$f0       #move the single precision f2 in f12

syscall           # call operating system to perform print operation

li $v0,4           # system call code for printing string = 4

la $a0,msg4       # load address of string to be printed into $a0

syscall           # call operating system to perform print operation

mul.s $f2,$f0,$f0   #calculate radius *radius

mul.s $f2,$f2,$f1   #calculate pi *r^2

li $v0, 2       # system call code for printing float = 2

mov.s $f12,$f2       #move the single precision f2 in f12

syscall           # call operating system to perform print operation

li $v0,4           # system call code for printing string = 4

la $a0,msg7       # load address of string to be printed into $a0

syscall  

ELSE_IF:

bne $t0,2,ELSE       #if not 2 then check else

li $v0,4           # system call code for printing string = 4 la $a0,msg3       # load address of string to be printed into $a0 syscall           # call operating system to perform print operation

li $v0, 2       # system call code for printing float = 2

mov.s $f12,$f0       #move the single precision f2 in f12

syscall           # call operating system to perform print operation

li $v0,4           # system call code for printing string = 4

la $a0,msg4       # load address of string to be printed into $a0

syscall           # call operating system to perform print operation

l.s $f3,three

mul.s $f3,$f3,$f0   #calculate 3*side

li $v0, 2       # system call code for printing float = 2

mov.s $f12,$f3       #move the single precision f2 in f12

syscall  

bne $t0,3,END       #if not 3 then end

li $v0,4           # system call code for printing string = 4

la $a0,msg10       # load address of string to be printed into $a0

syscall           # call operating system to perform print operation

li $v0, 2       # system call code for printing float = 2

mov.s $f12,$f0       #move the single precision f0 in f12

syscall           # call operating system to perform print operation

li $v0,4           # system call code for printing string = 4

la $a0,msg4       # load address of string to be printed into $a0

syscall           # call operating system to perform print operation

l.s $f3,four       # multilply by 4

mul.s $f3,$f3,$f0   #calculate 4*side

li $v0, 2       # system call code for printing float = 2

mov.s $f12,$f3       #move the single precision f3 in f12

syscall           # call operating system to perform print operation

END:  

li $v0,10       # system call code for printing exit (end of program)

syscall           # call operating system to perform print operation

Learn More:https://brainly.com/question/10169933

Order the steps needed to design a relational database.
Identify the fields holding
Break down the data into
List the fields needed to
Identify the common fields
Distribute the fields into
stored data
smaller parts
gain information
for linking tables
tables by subject
We

Answers

Answer:

1. List the fields needed to gain information

2. Break down the date into smaller parts

3. identify the fields holding stored data

4.distribute the fields into tables by subject

5. identify the common fields for linking tables

Explanation:

edge 2021

The correct matching of the steps for a relational database are:

1. List the fields needed to gain information2. Break down the date into smaller parts

What is a Database?

This refers to the collection of data that is stored in a central system that can be easily retrieved at any time.

The other answers are:

3. identify the fields holding stored data4. distribute the fields into tables by subject5. identify the common fields for linking tables

Read more about databases here:

https://brainly.com/question/6344749

#SPJ2

How I did it. Part 4

Answers

Answer:

What are you asking for in this problem?

Explanation:

New cars use embedded computers to make driving safer

Answers

Answer:

true.......................

New cars use embedded computers to make driving safer. The given statement is true.

What is RAM?

The word RAM stands for random-access memory and it is known as memory of short term where data is stored and as required by the processor. This is not there to deal with long term data and it is working after the computer turned off.

Generally, there are three types of RAM and these are SRAM, ECC, and DRAM. The SRAM stands for static random memory, and DRAM stands for dynamic access memory.

CPU stands for central processing unit and commonly it is known as brain of the computer, the main function of CPU is to control the function of the computer or system and it gives command to the parts of computer.

Therefore, New cars use embedded computers to make driving safer. The given statement is true.

Learn more about RAM and CPU here:

brainly.com/question/21252547

#SPJ2

Plz hurry it’s timed

Answers

A manufacturing company

Which of the following is MOST likely to be an outcome of the digital divide?

Answers

B, people from some racial of ethnic groups have unequal access to computing technology

Davos has been reading about encryption recently. He begins to wonder how anything can be secure if everyone is using the same set of algorithms. After all, anyone using the same algorithm would be able to decrypt anything that had been encrypted using that algorithm. Which of the following helps make the data unusable by anyone else using that same encryption scheme without having this information?
a. Algorithm
b. Cipher
c. Key
d. Block

Answers

Answer:

The correct answer is B. Cipher.

Explanation:

Cipher is a system of reversible transformations that depends on some secret parameter, called key, and is designed to ensure the secrecy of transmitted information.

The cipher can be a combination of conventional characters or an algorithm for converting ordinary numbers and letters. The process of making a message secret with a cipher is called encryption. An important parameter of any cipher is the key - a parameter of the cryptographic algorithm, which ensures the selection of one transformation from the set of transformations possible for this algorithm. In modern cryptography, it is assumed that all the secrecy of a cryptographic algorithm is concentrated in the key.

The first real web browsers that looked even somewhat like the web we know today were not created until which year?
O 1996
1994
O 1997
O 1995

Answers

Answer:

1994 is the answer . make me brainlist

Java 2D Drawing Application. The application will contain the following elements:
a) an Undo button to undo the last shape drawn.
b) a Clear button to clear all shapes from the drawing.
c) a combo box for selecting the shape to draw, a line, oval, or rectangle.
d) a checkbox which specifies if the shape should be filled or unfilled.
e) a checkbox to specify whether to paint using a gradient.
f) two JButtons that each show a JColorChooser dialog to allow the user to choose the first and second color in the gradient.
g) a text field for entering the Stroke width.
h) a text field for entering the Stroke dash length.
I) a checkbox for specifying whether to draw a dashed or solid line.
j) a JPanel on which the shapes are drawn.
k) a status bar JLabel at the bottom of the frame that displays the current location of the mouse on the draw panel.
If the user selects to draw with a gradient, set the Paint on the shape to be a gradient of the two colors chosen by the user. If the user does not chosen to draw with a gradient, the Paint with a solid color of the 1st Color.
Note: When dragging the mouse to create a new shape, the shape should be drawn as the mouse is dragged.

Answers

Answer:

sadness and depression is my answer

Explanation:

Can you debug the following code using the given test code?public class SavingAccount{ // interest rate for all accounts private static double annualInterestRate = 0; private final double savingsBalance; // balance for currrent account // constructor, creates a new account with the specified balance public void SavingAccount( double savingsBalance ) { savingsBalance = savingsBalance; } // end constructor // get monthly interest public void calculateMonthlyInterest() { savingsBalance += savingsBalance * ( annualInterestRate / 12.0 ); } // end method calculateMonthlyInterest // modify interest rate public static void modifyInterestRate( double newRate ) { annualInterestRate = ( newRate >= 0 && newRate <= 1.0 ) ? newRate : 0.04; } // end method modifyInterestRate // get string representation of SavingAccount public String toString() { return String.format( "$%.2f", savingsBalance ); } // end method toSavingAccountString} // end class SavingAccount Using this test codepublic class SavingAccountTest{ public static void main(String[] args) { SavingAccount s1 = new SavingAccount(400); SavingAccount s2 = new SavingAccount(1000); SavingAccount.modifyInterestRate(0.05); System.out.printf("SavingAccount 1 is: %s\nSavingAccount 2 is: %s\n", s1, s2); s1.calculateMonthlyInterest(); s2.calculateMonthlyInterest(); System.out.printf("\nSavingAccount 1 after the interest is: %s\nSavingAccount 2 after the interest is: %s\n", s1, s2); SavingAccount.modifyInterestRate(.025); s1.calculateMonthlyInterest(); s2.calculateMonthlyInterest(); System.out.printf("\nSavingAccount 1 after the new interest is: %s\nSavingAccount 2 after the new interest is: %s\n", s1, s2); }}

Answers

Answer:

Explanation:

The reason the code was not working was due to a couple of errors. First, the SavingAccount class needed to be public so that it can be accessed within the same file. Secondly, the savingsBalance variable was set to final and therefore could not be modified, the final keyword needed to be removed. Lastly, the constructor for the SavingAccount class was incorrect. Constructors do not use the keyword void and instance class variables need to be referenced using the this keyword.

class SavingAccount{

   // interest rate for all accounts

    private static double annualInterestRate = 0;

    private double savingsBalance;

   public SavingAccount(double savingsBalance) {

       this.savingsBalance = savingsBalance;

   }

   public void calculateMonthlyInterest() {

        savingsBalance += savingsBalance * ( annualInterestRate / 12.0 );

    }// end method calculateMonthlyInterest

   // modify interest rate

   public static void modifyInterestRate( double newRate ) {

        annualInterestRate = ( newRate >= 0 && newRate <= 1.0 ) ? newRate : 0.04;

    } // end method modifyInterestRate

   // get string representation of SavingAccount

   public String toString() { return String.format( "$%.2f", savingsBalance );

    } // end method toSavingAccountString

}// end class SavingAccount

// Using this test codepublic

//

class SavingAccountTest{

   public static void main(String[] args) {

       SavingAccount s1 = new SavingAccount(400);

       SavingAccount s2 = new SavingAccount(1000);

       SavingAccount.modifyInterestRate(0.05);

       System.out.printf("SavingAccount 1 is: %s\nSavingAccount 2 is: %s", s1, s2);

       s1.calculateMonthlyInterest(); s2.calculateMonthlyInterest();

       System.out.printf("\nSavingAccount 1 after the interest is: %s\nSavingAccount 2 after the interest is: %s", s1, s2);

       SavingAccount.modifyInterestRate(.025);

       s1.calculateMonthlyInterest();

       s2.calculateMonthlyInterest();

       System.out.printf("\nSavingAccount 1 after the new interest is: %s\nSavingAccount 2 after the new interest is: %s", s1, s2); }}

What does the following code print?
// upload only .txt file ***************************************************** public class { public static void main(String[] args) { int x=5 ,y = 10; if (x>5 && y>=2) System.out.println("Class 1"); else if (x<14 || y>5) System.out.println(" Class 2"); else System.out.println(" Class 3"); }// end of main } // end of class.

Answers

Answer:

Error - At least one public class is required in main file

if you change it too:

public class main{

   public static void main(String[] args) {

       int x=5 ,y = 10;

       if (x>5 && y>=2) System.out.println("Class 1");

       else if (x<14 || y>5) System.out.println(" Class 2");

       else System.out.println(" Class 3"); }

       // end of main

       }

       // end of class.

than it will say Class 2.

Explanation:

First one who answers gets brainiest

Answers

Answer:

thank for the point anyway

In this lab, you complete a partially prewritten Python program that uses a list.
The program prompts the user to interactively enter eight batting averages, which the program stores in an array. It should then find the minimum and maximum batting averages stored in the array, as well as the average of the eight batting averages. The data file provided for this lab includes the input statement and some variable declarations. Comments are included in the file to help you write the remainder of the program.
Instructions
Make sure the file BattingAverage.py is selected and open.
Write the Python statements as indicated by the comments.
Execute the program by clicking the "Run Code" button at the bottom of the screen. Enter the following batting averages: .299, .157, .242, .203, .198, .333, .270, .190. The minimum batting average should be .157 and the maximum batting average should be .333. The average should be .2365.
Grading
When you have completed your program, click the "Grade" button to record your score.
Lists
BattingAverage.py
4
43
Unix Terminal>
1 # Declare a named constant for array size here.
2 MAX_AVERAGES = 8
3?
4 # Declare array here.
5 averages = []
6 ?
7 # Write a loop to get batting averages from user and assign to array.
8 for i in range(MAX_AVERAGES):
9 averageString = input("Enter a batting average: ")
10 battingAverage = float(averageString)
11 # Assign value to array.
12 averages.append(battingAverage)
13 ?
14 # Assign the first element in the array to be the minimum and the maximum.
15 minAverage = averages[0]
16 maxAverage = averages[0]
17 # Start out your total with the value of the first element in the array.
18 total = averages[0]
19 # Write a loop here to access array values starting with averages[1]
20 ?
21 # Within the loop test for minimum and maximum batting averages.
22 for i in range(1, MAX_AVERAGES):
23 f averages[i] < minAverage:
24 minAverage = averages[i]
25 if averages[i] > maxAverage:
26 maxAverage = averages[i]
27 total += averages[i]
28 ?
29 # Also accumulate a total of all batting averages.
30 ?
31 ?
32 # Calculate the average of the 8 batting averages.
33 average = total / MAX_AVERAGES
34 ?
35 # Print the batting averages stored in the averages array.
36 for avg in averages:
37 print(avg)
38 ?
39 # Print the maximum batting average, minimum batting average, and average batting average.
40 print('Maximum batting average is ' + str(maxAverage))
41 print('Minimum batting average is ' + str(minAverage))
42 print('Average batting average is ' + str(average))
43 ?
W
Run Code
Ctrl + Enter
TestGrade

Answers

Answer:

See Explanation

Explanation:

Required

Complete the given code

First, it should be noted that the original code (in the question) is complete, however it is poorly formatted.

The errors that may arise when the code is run is as a result of the poor format of the code.

I've corrected all errors and I fixed the indentations in the original code.

See attachment for the complete code.

For this assignment your are to implement the Pet Class described in Programming Exercise 1, starting on page 494 in our textbook. Additionally your program will allow users to enter the pet's information until the user enters in the string "quit". Once the user enters quit the program will print out a summary of all the information that has been entered. Your program should not assume any maximum number of pets that can be added. Items in blue designate output. Items in red designate computer input. Example Test Case: Enter name, type and age of your pet: Name: Momo Type: Bird Age: 33 Enter "quit" to stop entering. Anything else to continue. a Enter name, type and age of your pet: Name: Pooh Type: Dog Age: 8 Enter "quit" to stop entering. Anything else to continue. quit SUMMARY: Name: Momo, Type: Bird, Age: 33. Name: Pooh, Type: Dog, Age: 8.

Answers

Answer:

ohhhvhhffifyuddfuiicfdguc

A new version of quicksort has been suggested by Professor I. M. CRAZY called CRAZYSORT in which anadversary picks the splitter in Partition in the worst possible way to maximize the running time of CRAZYSORT, thatis, line 1 of Partition (see textbook) is determined by the adversary in constant timeO(1). What is the running time ofCRAZYSORT? Justify your answer.

Answers

Thiughutghuyhhugbjjuhbuyghuughh it’s d

Suppose that a minus sign in the input indicates pop the stack and write the return value to standard output, and any other string indicates push the string onto the stack. Further suppose that following input is processed:
this parrot - wouldn't voom - if i put -- four thousand --- volts - through it -
What are the contents (top to bottom) left on the stack?
a. through wouldn't this.
b. this wouldn't through.
c. it through wouldn't.
d. it through volta.
e. volts through it.

Answers

Answer:

e. volts through it

Explanation:

volts through it

The contents (top to bottom) left on the stack is volts through it. Thus, option E is correct.

What is standard output?

When a computer program begins execution, standard streams are interconnected input and output channels of communication between the program and its surroundings. The three I/O connections are known as standard input (stdin), standard output (stdout), and standard error (stderr).

A negative sign in the input indicates that the stack should be popped, and the return value should be sent to standard output, whereas any other string means that the string should be pushed into the stack. Assume that the following input is processed: this parrot would not voom if I pushed — four thousand —- volts - through it.

The contents of the stack (from top to bottom) are volts via it. As a result, option E is correct.

Learn more about standard output here:

https://brainly.com/question/30054426

#SPJ5

When developing an algorithm to solve a problem, which of these steps can help you design the solution for the problem?

Answers

Answer:

3 is the answer please mark me brainlist

Explanation:

ok

How might you use PowerPoint as a student, as an employee, or personally?

Answers

Answer: You can use a powerpoint as student for assignments, as an employee for presentations, and personally for taking notes.

Explanation:

Hey there!

Answer:

As a student, you might use PowerPoint to complete assignments and create presentations. When your teacher assigns an assignment that you need to share with the class, PowerPoint would be a good program to use.

As an employee, you can use PowerPoint to keep track of sales or data about your job. This way, you can easily show your boss what you have done over the past times you've been working. You can also advertise about your job depending on what your job is.

To use it personally, you can create photo montages of trips with a photo on each slide to share with friends. You can also keep track of chores or chore salaries.

The program PowerPoint can be used in so many ways for so many things, the rest is up to your imagination!

Hope this helps  :)

Python The Sieve of Eratosthnes Prgram
A prime integer is any integer greater than 1 that is evenly divisible only by itself and 1. The Sieve of Eratosthenes is a method of finding prime numbers. It operates as follows:
Create a list with all elements initialized to 1 (true). List elements with prime indexes will remain 1. All other elements will eventually be set to zero.
Starting with list element 2, every time a list element is found whose value is 1, loop through the remainder of the list and set to zero every element whose index is a multiple of the index for the element with value 1. For list index 2, all elements beyond 2 in the list that are multiples of 2 will be set to zero (indexes 4, 6, 8, 10, etc.); for list index 3, all elements beyond 3 in the list that are multiples of 3 will be set to zero (indexes 6, 9, 12, 15, etc.); and so on.
When this process is complete, the list elements that are still set to 1 indicate that the index is a prime number. These indexes can then be printed. Write a program that uses a list of 1000 elements to determine and print the prime numbers between 2 and 999. Ignore element 0 of the list. The prime numbers must be printed out 10 numbers per line.
Sample Executions:

Prime numbers between 2 and 999 as determined by the Sieve of Eratosthenes.
2 357 11 13 17 19 23 29
31 37 41 43 47 53 59 61 67 71
73 79 83 89 97 101 103 107 109 113
127 131 137 139 149 151 157 163 167 173
179 181 191 193 197 199 211 223 227 229
233 239 241 251 257 263 269 271 277 281
283 293 307 311 313 317 331 337 347 349
353 359 367 373 379 383 389 397 401 409
419 421 431 433 439 443 449 457 461 463
467 479 487 491 499 503 509 521 523 541
547 557 563 569 571 577 587 593 599 601
607 613 617 619 631 641 643 647 653 659
661 673 677 683 691 701 709 719 727 733
739 743 751 757 761 769 773 787 797 809
811 821 823 827 829 839 853 857 859 863
877 881 883 887 907 911 919 929 937 941
947 953 967 971 977 983 991 997

Answers

Answer:

try this

Explanation:

def SieveOfEratosthenes(n):

  prime = [True for i in range(n+1)]

  p = 2

  while (p * p <= n):

      if (prime[p] == True):

          for i in range(p * p, n+1, p):

              prime[i] = False

      p +=1

  c=0

  for p in range(2, n):

      if prime[p]:

          print(p," ",end=" ")

          c=c+1

      if(c==10):

          print("")

          c=0

n= 1000

print("prime number between 2 to 999 as determined by seive of eratostenee ")

SieveOfEratosthenes(n)

Understanding Join Types
Which join type will only include rows where the joined fields from both tables are equal?
O inner join
O left outer join
Oright inner join
O right outer join

Answers

Answer: inner join

Explanation:Edg. 2021

In class we created an opaque object for a type called MY_VECTOR that had an internal structure called My_vector consisting of an integer size, an integer capacity, and an integer pointer data that held the address of the first element of a dynamic array of integers. Write a function called copyVECTOR that receives an opaque object (of type MY_VECTOR) and returns the address of an exact copy of the passed opaque object upon success and NULL otherwise.

Answers

What is all this bro?

______allow you to select elements that are in a certain state, such as when the mouse if hovering over an element

Answers

Answer:

css.

Explanation:

#Program to calculate statistics from student test scores. midterm_scores = [99.5, 78.25, 76, 58.5, 100, 87.5, 91, 68, 100] final_scores = [55, 62, 100, 98.75, 80, 76.5, 85.25] #Combine the scores into a single list all_scores = midterm_scores + final_scores num_midterm_scores = len(midterm_scores) num_final_scores = len(final_scores) print(num_midterm_scores, 'students took the midterm.') print(num_final_scores, 'students took the final.') #Calculate the number of students that took the midterm but not the final dropped_students = num_midterm_scores - num_final_scores print(dropped_students, 'students must have dropped the class.') lowest_final = min(final_scores) highest_final = max(final_scores) print('\nFinal scores ranged from', lowest_final, 'to', highest_final) # Calculate the average midterm and final scores # Hint: Sum the midterm scores and divide by number of midterm takers # Repeat for the final

Answers

Answer:

try this

Explanation:

#Python program for calculating avg

#Given data

m1 = [99.5, 78.25, 76, 58.5, 100, 87.5, 91, 68, 100]

f1 = [55, 62, 100, 98.75, 80, 85.25]

#combine scores

all_scores = m1 + f1

#number of m1 and f1

num_midterm = len(m1)

num_final = len(f1)

#find avg of scores

avg_midterm = sum(m1) / num_midterm

avg_final = sum(f1) / num_final

#print the avg

print("Average of the m1 score:",round(avg_midterm,2))

print("Average of the f1 score:",round(avg_final,2))

What are 3 data Gathering method that you find effective in creating interactive design for product interface and justify your answer?

Answers

Answer:

In other words, you conducted the four fundamental activities that make up the interaction design process – establishing requirements, designing alternatives, prototyping designs, and evaluating prototypes.

Explanation:

Write a function template that accepts an argument and returns its absolute value. The absolute value of a number is its value with no sign. For example, the absolute value of -5 is 5, and the absolute value of 2 is 2. Test the template in a simple driver program being sure to send the template short, int, double, float, and long data values.

Answers

Answer:

The function in Java is as follows:

public static double func(double num){

       num = Math.abs(num);

       return num;

   }

Explanation:

This defines the function

public static double func(double num){

This determines the absolute function of num

       num = Math.abs(num);

This returns the calculated absolute value

       return num;

   }

when the tv was created (year)

Answers

Answer:

1927

Explanation:

Answer:

1971 is the year

What is the problem with paying only your minimum credit card balance each month?
A. It lowers your credit score
B. You have to pay interest
C. The bank will cancel your credit card
D. All of the above

Answers

Answer:b

Explanation:

Answer: The answer is B.

Explanation: While yes it is important to make at least the minimum payment, its not ideal to carry a balance from month to month (You'll rack up interest charges). And risk falling into debt. Therefore, the answer is B.  

Hope this helps!

Other Questions
what is 5 times 1/10 in simplest form. Why aren't Amish workers allowed to buy or use the R.V.'s they make? summary of The interlopers A highway department is studying the relationship between traffic flow and speed. The following model has been hypothesized. y = 0 + 1x + 2x2 +where y = traffic flow in vehicles per hour x = vehicle speed in miles per hour The following data were collected during rush hour for six highways leading out of the city. Traffic Flow () Vehicle Speed () 1256 35 1330 45 1226 30 1335 50 1349 50 1124 25 a. Use the data to compute the coefficients of this estimated regression equation (to decimals). b. Using , test for a significant relationship. (to decimals) -value (to decimals) The relationship - Select your answer - significant. c. Estimate the traffic flow in vehicles per hour at a speed of miles per hour (to decimals). vehicles per hour. I need help so I can helpl my grandson to pass this quz please and thank youits in the download pdf. Geometry yes yes yes yes yes yes yes yes yes yes 3. What is the breadth of a rectanglewhose length and area are 8cmand 40cm- respectively? State if the triangles in each pair are similar if so state if you know they are similar (please show work if possible) Dustin is riding his bike from Logan, Utah to Jackson Hole, Wyoming in a bike race. He must ride at least 200 miles before he will complete the course. He has already biked 56 3/4 miles.If he can bike roughly 18 5/8 mph, how many more hours will it take him to finish biking at least 200miles? Round your answer to the nearest whole number of hours.Enter your answer as a whole number, like this: 42 Sea turtles, mosquitoes, and frogs all show a A scientist observed this monkey with a minor cut on its face. After one week, the cut had healed and was gone. Explain how this is possible. which organ is central to the body's metabolism of nutrients??a-) the stomachb) the kidneysC) the liverd) the small intestine At which root does the graph of f(x) = (x + 4)(x + 735 cross the x-axis? 4.4s + 6.2 = 8.8s - 1.8please help PLEASE HELP RIGHT NOW!! NO LINKS 7 %of all jails hold over 50% of all prisoners.TrueFalse 2Find the area of the shape.Either enter an exact answer in terms of or use 3.14 for it and enter your answer as a decimal.units? A bag of marbles has 10 red marbles, 4 green marbles, and 6 blue marbles. A marble is randomly drawn from the bag before another marble is drawn, without replacement. What is the probability that a green marble and then a red marble are selected? Enter your answer as a fraction in simplest form in the box. Evaluate w - (w - 8) + v, when w = 11 and v = 16. In database software, which option is the most appropriate menu choice or command to use if you want to change the format of the datefrom January 1, 2020 to 01/01/2020?Print PreviewMail MergeNew RecordAdd/Modify Fields