9.2.2: Output formatting: Printing a maximum number of digits. Write a single statement that prints outsideTemperature with 4 digits. End with newline. Sample output with input 103.45632: 103.5

Answers

Answer 1

Answer:

The single print statement that does the required in python is:

print("%.4g" % outsideTemperature)

Explanation:

The full program is as follows:

The first line prompts user for input

outsideTemperature = float(input("Outside Temperature: "))

To print significant figures, we make use of g formats. And this is implemented as follows:

print("%.4g" % outsideTemperature)

The above prints 4 significant digits of outsideTemperature

For other significant figures, simply change the 4 to another number


Related Questions

Dance dance1 = new Dance("Tango","Hernandos Hideaway");
Dance dance2 = new Dance("Swing","Hound Dog");
System.out.println(dance1.toString());

System.out.println(dance2.toString());

class Dance
{
private String name;
private String song;

public Dance(String name, String s)
{
this.name = name;
song = s;
}

public String toString()
{
return name + " " + song;
}
}
What is printed when the program is executed?


a
null null

null null

b
Hernandos Hideaway null

Hound Dog null

c
null null

Swing Hound Dog

d
Tango Hernados Hideaway

Swing Hound Dog

e
null Hernandos Hideaway

null Hound Dog

Answers

Answer:

The output of the program is (d)

Tango Hernados Hideaway

Swing Hound Dog

Explanation:

Analyzing the given code segment

In class Dance,

A method named dance was defined with an instance of two string variables/values

which are name and song

public Dance(String name, String s)

In the main of the program,

The first line creates an instance of Dance as dance1

dance1 is initialized with the following string values: "Tango","Hernandos Hideaway"

- The first string value "Tango" will be passed into the name variable of the Dance method

- The second string value "Hernandos Hideaway" will be passed into the song variable of the Dance method

Next, another instance of Dance is initialized as dance2

dance2 is initialized with the following string values: "Swing","Hound Dog"

- The first string value "Swing" will be passed into the name variable of the Dance method

- The second string value "Hound Dog" will be passed into the song variable of the Dance method

On line 3 of the main: System.out.println(dance1.toString());

The values of dance1, which are "Tango","Hernandos Hideaway" are printed

On line 4 of the main: System.out.println(dance2.toString());

The values of dance1, which are "Swing","Hound Dog" are printed

Hence, option d answers the question

4.9 Code Practice: Question 4 Edhisive

Write a program that asks the user to enter ten temperatures and then finds the sum. The input temperatures should allow for decimal values.

Sample Run
Enter Temperature: 27.6
Enter Temperature: 29.5
Enter Temperature: 35
Enter Temperature: 45.5
Enter Temperature: 54
Enter Temperature: 64.4
Enter Temperature: 69
Enter Temperature: 68
Enter Temperature: 61.3
Enter Temperature: 50
Sum = 504.3

Answers

i = 0

total = 0

while i < 10:

   temp = float(input("Enter Temperature: "))

   total += temp

   i += 1

print("Sum: {}".format(total))

I wrote my code in python 3.8. I hope this helps!

The program accepts 10 temperature inputs from the user, and takes the sum of the inputs gives before displaying the total sum of the temperature. The program is written in python 3 ;

temp_count = 0

#initialize the number of temperature inputs given by the user and assign to temp_count variable

sum = 0

#initialize the sum of the temperature inputs given

while(temp_count < 10):

#loop allows 10 inputs from the user

values = eval(input('Enter temperature : '))

#prompts user to input temperature values

sum+= values

#adds the inputted values to sum

temp_count+=1

#increases count of input by 1

print('sum of temperature : ', sum)

#displays the total sum

Learn more :https://brainly.com/question/18253379

Explain what resampling is? in ict (igcse)​

Answers

Answer:

Resampling

Explanation:

This means resizing an image by reducing or increasing the image's number of pixels.

HOPE THIS HELPED

def list_length(shrinking_list): ''' A recursive way to count the number of items in a list. ''' if shrinking_list

Answers

Answer:

Written in Python:

def list_length(shrinking_list):

    if not shrinking_list:

         return 0

    else:

         return list_length(shrinking_list[1:]) + len(shrinking_list[0])

Explanation:

This defines the list

def list_length(shrinking_list):

This checks if list is empty, if yes it returns 0

    if not shrinking_list:

         return 0

If list is not empty,

    else:

This calculates the length of the list, recursively

         return list_length(shrinking_list[1:]) + len(shrinking_list[0])

To call the function from the main, use:

print(list_length(listname))

my game is telling me to "Press any key." Where is the "any" key?????

Answers

Answer:

It's mean press any key which you want to press.

There is no key called "any" key.

patintero
a.tag game
b.target game​

Answers

Patintero, also known as harangang-taga or tubigan, is a traditional Filipino children's game. Along with tumbang preso, it is one of the most popular outdoor games played by children in the Philippines.

In other words tag game

Hope this helps

A Protocol for networked information​

Answers

Answer:

Internet Protocol (IP), which uses a set of rules to send and receive messages at the Internet address level; and. additional network protocols that include the Hypertext Transfer Protocol (HTTP) and File Transfer Protocol (FTP), each of which has defined sets of rules to exchange and display information.

Explanation:

could i plz have brainliest so close to next rank

Functional languages like LISP are not composed of statements, but instead are a nested set of functions.
a) True
b) False

True
False

Answers

Answer:

True

In a purely functional language everything is a function and functions are based of other functions.

Answer:

true

Explanation:

help me pls difhdifhedioheiofhoidhvoidheiofhioefhioe

Answers

Answer:

thanks for the free points

An uniterruptible power supply

Answers

Answer:

An uninterruptible power supply  is an electrical apparatus that provides emergency power to a load when the input power source or mains power fails.

Explanation:

Your welcome :) PLZ mark brainliest

The designer of an agent traveled to a beach for a holiday. He took the agent to the beach. He wanted the agent to capture the sunrise and the high tide. What kind of knowledge representation will the agent use in this new environment?

A.
picture
B.
number
C.
graph
D.
meta

Answers

The answer is C. Which is graph

Answer:

Picture

Explanation:

True/False: A datasum can be generated for any width of data. For example, we can create an 8, 16, or 32 bit datasum for 8, 16, or 32 bit data elements respectively.

Answers

Answer:

true

Explanation:

What causes them to catch your attention in advertisements?

Answers

Answer:

advertisement should be nice and attractive to get attention of people

Tramon is creating a website and wants to include a striking graphic to identify the website. What type of graphic should he include?

a. dashboard
b. sidebar
c. icon
d. banner

Answers

Answer:

The correct option is d. banner

Explanation:

According to the given situation, Tramon develops the website and wants to involve the striking graphic so the website could be identified.

This represents the banner as the banner shows the advertisement i.e. image based rather than text based where the company information is displayed and its a way to promote the brand of the company so that it creates an awareness among the audience this results in increase in the sales of the company that directly rise the profits.

hence, the correct option is d. banner

Jamal wants to write a program that will find the 10 most common words in Romeo and Juliet. Which of the following constructs will be most helpful?

A. counter module

B. while loop

C. for loop

D. mean module

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct answer to this question is A: counter module.

Counter module in python or Python counter is a container that holds the count of each of the elements present in the container. It is a sub-class available in the dictionary class. Jamal can use this module in Python to write a program that will find the 10 most common words in Romeo and Juliet.

Other options are not correct because:

While loop: while loop only iterates its body until a specific condition is met. For loop is used to iterate to a pre-specified condition and iterate until the condition is reached. While the mean module of Python is used to calculate mean and average.

Online
Activities
Media Literacy
Information
Literacy
Technology
Literacy
Content
(appropriateness,
tone, recipient,
others)
tools (mobile,
computers,
others)
Sending an as platform (text;
electronic
email; messenger,
message
video
message;
voice message:
others)
Getting the latest traditional
(newspaper, tv,
radio, others)
digital (websites,
social media,
others)
news
Content
(appropriateness,
reliability, accuracy,
tone, audience,
others) giving
feedback (reactions,
comments, rate,
others)
knowing how to
use mass
media platforms
(tv, radio, others)
where to access
digital content
navigational skills
Entertainment
Business
Education
sources​

Answers

Answer:

i can't understand what u want to say

Which of the following server types is in the form of a single circuit board?
a. blade
b. tower
O c. rack
O d. dedicated
o

Answers

Answer:

A. Blade

Explanation:

Server Blade means a complete computer system on a single board which includes one or more CPUs, memory, operating system, network connections, and typically includes access to hard drives or other mass storage devices. A Server Blade is designed to be inserted into a space-saving rack, and each rack may contain a number of Server Blades served by one or more power supplies.

If this is multiple choice, a dedicated server can be too.

Write a program that contains three methods:

Method max (int x, int y, int z) returns the maximum value of three integer values.
Method min (int X, int y, int z) returns the minimum value of three integer values.
Method average (int x, int y, int z) returns the average of three integer values.

Answers

Answer:

#include <stdio.h>//defining header file

int max (int x, int y, int z) //defining a method max that hold three parameters

{

   if(x>=y && x>=z)//defining if block that checks x is greater then y and x is greater then z

   {

       return x;//return the value x

   }

   else if(y>z)//defining else if block it check y is greater then z

   {

       return y;//return the value y

   }

   else//else block

   {

       return z;//return the value z

   }

}

int min (int x, int y, int z) //defining a method max that holds three parameters

{

if(x<=y && x<=z) //defining if block that check x value is less then equal to y and less then equal to z

{

return x;//return the value of x

}

if(y<=x && y<=z) //defining if block that check y value is less then equal to x and less then equal to z

{

return y;//return the value of y

}

if(z<=x && z<=x)//defining if block that check z value is less then equal to x  

{

return z;//return the value of z

}

return x;//return the value of z  

}

int average (int x, int y, int z) //defining average method that take three parameters

{

int avg= (x+y+z)/3;//defining integer variable avg that calculate the average

return avg;//return avg value

}

int main()//defining main method

{

   int x,y,z;//defining integer variable

   printf("Enter first value: ");//print message

   scanf("%d",&x);//input value from the user end

   printf("Enter Second value: ");//print message

   scanf("%d",&y);//input value from the user end

   printf("Enter third value: ");//print message

   scanf("%d",&z);//input value from the user end

   printf("The maximum value is: %d\n", max(x,y,z));//calling the method max

   printf("The minimum value is: %d\n", min(x,y,z));//calling the method min

   printf("The average value is: %d\n", average(x,y,z));//calling the method average

   return 0;

}

Output:

Enter first value: 45

Enter Second value: 35

Enter third value: 10

The maximum value is: 45

The minimum value is: 10

The average value is: 30

Explanation:

In the above-given code, three methods "max, min, and average" is declared that holds three integer variable "x,y, and z" as a parameter and all the method work as their respective name.

In the max method, it uses a conditional statement to find the highest number among them.In the min method, it also uses the conditional statement to find the minimum value from them.In the average method, it defined an integer variable "avg" that holds the average value of the given parameter variable.In the main method, three variable is defined that inputs the value from the user end and passes to the method and print its value.      

What stage is the most inner part of the web architecture where data such as, customer names, addresses, account numbers, and credit card info, is stored

Answers

Answer:

Database

Explanation:

A website or web application is a page or a collection of pages addressing the same information on the internet. Web pages and the whole web application is made by a web developer using tools like HTML, CSS, Javascript, Flask, react.js, etc.

All websites or applications require a fast, flexible but secure source of storage to hold information. This storage is called a database. Examples of databases are relational and non-relational databases.

what is a technology?​

Answers

Answer:

The definition of technology is science or knowledge put into practical use to solve problems or invent useful tools

                                                    OR

Technology is the sum of techniques, skills, methods, and processes used in the production of goods or services or in the accomplishment of objectives, such as scientific investigation

All early programming languages were object-oriented.
a) True
b) False

True
False

Answers

Answer:

False.

Object orientation is a paradigm that came later.

What missing condition will give you the output shown? numB = 2 while _____: numB = numB + 3 print(numB) Output: 14 numB 10 numB > 12 numB < 10

Answers

Answer:

A. numB < 12

Explanation:

Correct answer edge 2020

Answer: A. numB < 12

Explanation: got it right edgen

Computer Architecture
1. Define what a "word" is in computer architecture:
A. The size (number of bits) of the address
B. The total number of bits of an instruction (e.g. 16 bits)
C. Word and width are synonymous.
D. A word is the contents of a memory register.
2. What is the difference between a register’s width and a register’s address? (choose all that apply - there may be more than one correct answer)
A. They are both the same!
B. Address is the same for all registers, width is unique for each register.
C. Width is the amount of data a single register holds, address is the location of the register within a larger chip.
D. The address bits of a register is a logarithm of its width.
3. Which of the following is NOT implemented by the Program Counter?
A. Set the counter to 0.
B. Increase the counter by 1.
C. Decrease the counter by 1.
D. Set the counter to any input value.
4. What is the relationship between the size of the address (number of bits) and the word size for memory registers?
A. address bits = 2^(word size)
B. address bits = word size ^ 2
C. address bits = word size
D. address bits = log2(word size)
E. address bits = (word size) / 2

Answers

Answer:

BADDA

Explanation:

BIIING

How can we use variables to store information in our programs?

Answers

Computer programs use variables to store information.
...
To make a simple program that displays your name, you could program the computer to:
Ask for your name.
Store that answer as a variable called 'YourName'.
Display “Hello” and the string stored in the variable called 'YourName'

The Operating System provides utility software designed to perform specific tasks. What task(s) does it perform? Select all that apply.
A. Establishing an Internet connection
B. Coordinating tasks between programs
C. Configuring peripheral devices
D. Monitoring security

Answers

Answer:

All of the above.

Explanation:

An operating system is a system software pre-installed on a computing device to manage or control software application, computer hardware and user processes.

This ultimately implies that, an operating system acts as an interface or intermediary between the computer end user and the hardware portion of the computer system (computer hardware) in the processing and execution of instructions.

Some examples of an operating system on computers are QNX, Linux, OpenVMS, MacOS, Microsoft windows, IBM, Solaris, VM etc.

Hence, the operating system (OS) provides utility software designed to perform specific tasks. Some of the tasks it performs are;

A. Establishing an Internet connection.

B. Coordinating tasks between programs.

C. Configuring peripheral devices.

D. Monitoring security.

Write a program with 2 separate functions which compute the GCD (Greatest Common Denominator) and the LCM (Lowest Common Multiple) of two input integers.

Answers

Answer:

The program written in Python is as follows

def GCD(num1, num2):

    small = num1

    if num1 > num2:

         small = num2

    for i in range(1, small+1):

         if((num1 % i == 0) and (num2 % i == 0)):

              gcd = i

    print("The GCD is "+ str(gcd))

def LCM(num1,num2):

    big = num2  

    if num1 > num2:

         big = num1

    while(True):

         if((big % num1 == 0) and (big % num2 == 0)):

              lcm = big

              break

         big = big+1

     print("The LCM is "+ str(lcm))

 print("Enter two numbers: ")

num1 = int(input(": "))

num2 = int(input(": "))

GCD(num1, num2)

LCM(num1, num2)

Explanation:

This line defines the GCD function

def GCD(num1, num2):

This line initializes variable small to num1

    small = num1

This line checks if num2 is less than num1, if yes: num2 is assigned to variable small

    if num1 > num2:

         small = num2

The following iteration determines the GCD of num1 and num2

    for i in range(1, small+1):

         if((num1 % i == 0) and (num2 % i == 0)):

              gcd = i

This line prints the GCD

    print("The GCD is "+ str(gcd))

   

This line defines the LCM function

def LCM(num1,num2):

This line initializes variable big to num2

    big = num2  

This line checks if num1 is greater than num2, if yes: num1 is assigned to variable big

    if num1 > num2:

         big = num1

The following iteration continues while the LCM has not been gotten.

    while(True):

This if statement determines the LCM using modulo operator

         if((big % num1 == 0) and (big % num2 == 0)):

              lcm = big

              break

         big = big+1

This line prints the LCM of the two numbers

     print("The LCM is "+ str(lcm))

The main starts here

This line prompts user for two numbers

print("Enter two numbers: ")

The next two lines get user inputs

num1 = int(input(": "))

num2 = int(input(": "))

This calls the GCD function

GCD(num1, num2)

This calls the LCM function

LCM(num1, num2)

See attachment for more structured program

Declare a class named PatientData that contains two attributes named height_inches and weight_pounds.

Answers

Answer:

class PatientData:

   def __init__(self, height_inches, weight_pounds):

      self.height_inches = height_inches

      self.weight_pounds = weight_pounds

a_patient = PatientData(75, 125)

print("Patient's height:", a_patient.height_inches)

print("Patient's weight:", a_patient.weight_pounds)

Explanation:

Create a class named PatientData

Inside the class, create a constructor (def __init__), that takes two parameters, height_inches and weight_pounds. This is used to initialize the PatientData objects. Inside the constructor, set the height_inches and weight_pounds

Create PatientData object named a_patient. Note that in order to create an object, you need to specify the height_inches and weight_pounds

Then, you may access these values by typing the object name, ".", and variable name. For example, to access the height_inches, you should write the following:

→ a_patient.height_inches

Then, print the height and weight of the patient

write aemail to brother for laptop for vitrual classes​

Answers

Answer:

If I were to ask my brother for a laptop, I would go:

Hey, can I have your laptop? I need it for online classes.

Sincerely, [my name]

Dear brother, I really need a lab top for my online classes (explain why you don’t have one) i would really appreciate it :)

Sincerely,
Your bro/ Sis

so i am on a Chromebook with headphones , and I am wondering if you can make it that a tab only play sound on one side of the headphones and other tabs to the other side of the headphones

Answers

No you cannot do that with a single pair of headphones. If you had an dual aux split... you could plug in two pairs of headphones... even if you had two bluetooth pairs I don't think it'd be possible... What do you need to do that for? Maybe I can help find an alternative solution

Write a function named findmax()that finds and displays the maximum values in a two dimensional array of integers. The array should be declared as a 10 row by 15 column array of integers in main()and populated with random numbers between 0 and 100.

Answers

Answer:

import java.util.*;

public class Main

{

public static void main(String[] args) {

    Random r = new Random();

    int[][] numbers = new int[10][15];

   

    for (int i=0; i<10; i++){

        for (int j=0; j<15; j++){

            numbers[i][j] = new Random().nextInt(101);

        }

    }

   

    for (int i=0; i<10; i++){

        for (int j=0; j<15; j++){

            System.out.print(numbers[i][j] + " ");

        }

        System.out.println();

    }

   

    findmax(numbers);

}

public static void findmax(int[][] numbers){

    int max = numbers[0][0];

   

    for (int i=0; i<10; i++){

        for (int j=0; j<15; j++){

            if(numbers[i][j] > max)

                max = numbers[i][j];

        }

    }

    System.out.println("The max is " + max);

}

}

Explanation:

*The code is in Java.

Create a function called findmax() that takes one parameter, numbers array

Inside the function:

Initialize the max as first number in the array

Create a nested for loop that iterates through the array. Inside the second for loop, check if a number is greater than the max. If it is set it as the new max

When the loop is done, print the max

Inside the main:

Initialize a 2D array called numbers

Create a nested for loop that sets the random numbers to the numbers array. Note that to generate random integers, nextInt() function in the Random class is used

Create another nested for loop that displays the content of the numbers array

Call the findmax() function passing the numbers array as a parameter

Other Questions
Imperialism is when one nations aims to control the economic and/or political interests of another country/nation.TrueOrFalse Im going to be 12 in January what is your sign Im a Aquarius answer and show work plzzzzxxxx thxxx Which equation represents the line that passes throughthe point (10, 1) and is perpendicular to the graph of2x - y = 7? fill in the blankHoy muy cansados. The cashier counts $2500in $100 bills. She exchanged all the $100 bills for $10 bills. How many $10 bills does she receive? Will give brainliest if you are right. Proteins are responsible for which of the following functions? Which two is it brainliest and 100points:) What happened to the matter in a log as it burned? HELP ASAP! WILL MARK BRAINLYNESS OR WHATEVER ITS CALLEDWhich statement best describes a graph of paired points that form a proportional relationship?A straight line can be drawn through all the points and the line passes through the origin.A straight line cannot be drawn through all of the the points but the line passes through the origin.A straight line can be drawn through all the points but the line does not pass through the origin.A straight line cannot be drawn through all of the the points and the line does not pass through the origin. The company's chief financial officer recognizes the need for an upgrade to the smart watches but does not understand why the budget you proposed requests more than the purchase price of the updated software. How would you respond to these concerns? An____is a collection of all of the abiotic factors and biotic factors in an entire region. Consider the two electron arrangements for neutral atoms A and B. What is the atomic number of A?A - 1s?, 2s 2p6,35B - 1s2, 2s 2p, 5s a five sentence summary about compounds please it is do In 5min HELP ME PLZZZZ pls pls help. ill give brainliestwhat was the number one thing the public wanted the national government to do about therailroad industry in the 1800s?A. the public wanted investigations into the railroad industry B. the public wanted multiple railroad monopolies rather than just oneC. the public wanted price regulations imposed on the railroad industryD. the public wanted more tracks laid by the railroad industry putting on a happy face makes us feel happier this demonstrates the_____ ____ effect Put the events listed below in order by matching them to the corresponding number (i.e. what happened 1st, 2nd, 3rd...etc.). Nazis deny Jews employment and confiscate land and businessesHundreds of thousands of Jews have no home after World War II ends. The state of Israel is established. Antisemitism expands in Europe in the early 1900s. Nazis force Jews into concentration camps and death camps. The United Nations divides Palestine into Jewish and Muslim states. 1st2nd3rd4th5th6th What's 0.13 quite a bit How did the Industrial Revolution change the textile industry in Great Britain?A. By ending British reliance on importing cotton for textileproductionB. By increasing the amount of textiles produced by hand onspinning wheelsC. By allowing fewer workers to produce more textiles than everbeforeD. By reducing the textile industry's reliance on steam- or water-powered machines