You're not adding your temperature to the total so total will always be 0. Do something like this:
total += float(input("Enter Temperature: "))
You can directly add the user entered value without creating an extra variable.
in C!!
12.12 LAB: Swapping variables
Write a program whose input is two integers and whose output is the two integers swapped.
Ex: If the input is:
3 8
then the output is:
8 3
Your program must define and call a function. SwapValues returns the two values in swapped order.
void SwapValues(int* userVal1, int* userVal2)
Answer:
#include <stdio.h>
void SwapValues(int* userVal1, int* userVal2)
{
int temp = *userVal1;
*userVal1 = *userVal2;
*userVal2 = temp;
}
int main(void)
{
int a = 3;
int b = 8;
printf("Before swap: a=%d, b=%d\n", a, b);
SwapValues(&a, &b);
printf("After swap: a=%d, b=%d\n", a, b);
return 0;
}
Explanation:
For swapping variables efficiently, you need a helper variable in C or C++.
What tips do you have for learning at home???
Answer:
nothing
Explanation:
Answer:
listen to music stay in a quiet space in your house and always have a snack with you
What steps should city managers and SAIC have taken at an early stage of the project to identify and prevent fraud?
Answer:
City Managers and SAIC should have avoided Switching of contract from a fixed-price contract to a time and material contracts this made the project cost to be spiraled out of control. city managers should have have avoided the switch in the terms of the contract and also implemented a project oversight that way they will identify and prevent fraud from those involvedExplanation:
To prevent fraud one needs to identify the fraud at first . therefore the steps that should be taken by city managers and SAIC in other to Identify and prevent fraud includes ;
City Managers and SAIC should have avoided Switching of contract from a fixed-price contract to a time and material contracts this made the project cost to be spiraled out of control. city managers should have have avoided the switch in the terms of the contract and also implemented a project oversight that way they will identify and prevent fraud from those involvedAssume that the OS uses a minimum page size of 16 KB. Assume that your L1 cache must be 4-way set-associative. If you're trying to correctly implement a virtually indexed physically tagged cache (with no additional support from the OS or hardware), what is the largest L1 cache that you can design
Answer:
The largest size of L1 = 16 bits
Explanation:
hello attached below is the diagram related to the solution
assuming that the OS uses a minimum page size of 16 KB
when we assume that our L1 cache must have 4-way set-associative
The largest L1 cache that you can design = 16 bits ( when the L1 cache is of a page size )
The L1 cache is closest to the processor and also the L1 is slowest and the largest of all
One type of wire sequence commonly used for ethernet cables is called the ________ sequence
Answer:
100BaseT
Also called Fast Ethernet
Good luck...
How does the variable scope influence the structure of an algorithm
You can only put global variables anywhere in the program while with local variables it can only be used within the function. You're only allowed to use local variables in different functions and not the same variable in the same function.
Simple sketches, mockups, or wireframes are frequently used in the user-centered design process for some or all of the designs. Instead of producing the final product and then having to make expensive revisions if it doesn't match user needs, this results in a far faster and more affordable design process.
What exactly does computer programming entail?Scope is a key concept in programming. Where variables can be accessed or referenced is determined by the scope. Some variables in a program can be accessed from anywhere, whereas other variables may not be accessible from everywhere. We must first discuss blocks before going into greater detail concerning scope.
An individual can write the program's processing stages in their own language using an algorithm, i.e., they can construct the program's flowchart using so-called code.
An algorithm is just a series of steps used to carry out a certain activity. They serve as the foundation for programming and enable the operation and decision-making of devices like computers, cellphones, and webpages.
User experience deals with the unique interaction consumers have with the goods they use, whereas user-centered design refers to the method or strategy used to build experiences. It refers to a concept rather than a method of interaction between a user and a product or service.
To Learn more About user-centered design, Refer:
https://brainly.com/question/28721191
#SPJ2
You should use _____ text on a light blue background.
yellow
black
lavender
white
You should use black text on a light blue background.
Explanation:
The other colors are too light for a light blue background and wouldn't show up well enough to read it easily.
Answer:
black cause you want a darker shade
Explanation:
I am writing a Python code to ask a user to enter students' information including name,
last name and student ID number. The program should continue prompting the
user to enter information until the user enters zero. Then the program enters
search mode. In this mode, the user can enter a student ID number to retrieve
the corresponding student's information. If the user enters zero, the program
stops. Please help!
Answer:
student_file = {}
endf_input = '1'
for x in iter(list, 1):
name = input("Enter a student name: ")
st_id = int(input("Enter a student id number: "))
student_file[name] = st_id
endf_input = input("Add more student to file (type 1 for yes and 0 to end): ")
if endf_input == '0':
break
print("Search for Student")
search = int(input("Enter student id: "))
if search == 0:
print("Sorry, no student with id of zero.")
quit()
for key, value in student_file.items():
if value == search:
print(f"Student name: {key}")
Explanation:
The program source code uses a for loop to continuously add data to the student file dictionary structure but breaks from the loop when a zero is received as input. The program enters search mode and returns the name of the student with the searched id number.
Write a method named convertToArrayList() that accepts an int array as its parameter and returns an ArrayList of type Integer containing those same elements in the same order. This method stub is NOT provided for you - method name, parameter(s), and return type must match exactly to receive credit. You should not use the word static.
Answer:
Explanation:
The following code is written in Java and is a method named convertToArrayList() which takes in a preset int array and converts it into an ArrayList called myDynamicArray in the exact same order.
public static void convertToArrayList(int[] myStaticArray) {
ArrayList<Integer> myDynamicArray = new ArrayList<>();
for (int x = 0; x < myStaticArray.length; x++) {
myDynamicArray.add(myStaticArray[x]);
}
}
Write a method smallestPositive that takes an integer array argument and returns the smallest positive element in the array.
Answer:
public class Main
{
public static void main(String[] args) {
int[] arr = {28, 7, -51, -2, 221};
System.out.println(smallestPositive(arr));
}
public static int smallestPositive(int[] arr){
int heighest = arr[0];
for(int i=0; i<arr.length; i++){
if(arr[i] > heighest)
heighest = arr[i];
}
int lowest = heighest;
for(int i=0; i<arr.length; i++){
if(arr[i] < lowest && arr[i] > 0)
lowest = arr[i];
}
return lowest;
}
}
Explanation:
The code is in Java.
Create a method named smallestPositive that takes one parameter, arr
Inside the method:
Find the largest value in the array using the first for loop
Set the this value as lowest to find the smallest positive value (I assumed there is at least on positive value in the array)
Create another for loop to iterate through the array. If a value is smaller than the lowest and if it is greater than 0, set it as lowest
When the loop is done, return the lowest
Inside the main method:
Initialize an array with some numbers
Call the smallestPositive() with this array and print the result
(In our example, the result would be 7)
Write a program that uses a dictionary to store students birthdays. Your program should ask the user what their name is, and look it up in the dictionary . If their birthday is known, it should tell them their birthday.
di = {"student":"10/30/1984", "student2":"11/16/2020"}
name = input("What is your name? ")
if name in di:
print(di[name])
else:
print("Your name is not in the dictionary.")
You can change the values inside the dictionary. I hope this helps!
Prove the following using the specified technique:A) Letxandybe two real numbers such thatx yis rational. Prove by contrapositive that ifxis irrational, thenx−yis irrational.B) Prove by contradiction that for any positive two real numbers,xandy, ifx·y≤50, theneitherx <8 ory <8.
Answer:
Following are the solution to this question:
Explanation:
In point A:
The predicate of the whole argument is if x+y is rational and x-y is reasonable, then x is reasonable as well" To see the sum of the two logical estimates is often sound. Let us be two real [tex]\frac{p}{9}[/tex] .rs amount then seeing how.
[tex]\frac{p}{q}+\frac{r}{s} = \frac{(ps+rq)}{qs}[/tex] is logical, too. x Thus if[tex]x + y[/tex] is logical and [tex]x- y[/tex] is true, then [tex]x + y +x- y = 2x[/tex] should be sound.
Let's assume [tex]2x=\frac{p}{q}.[/tex] Therefore the rational [tex]x=\frac{p}{2q}[/tex]proves the necessary statement in the query.
In point A:
Let [tex]x \cdot y \leq 50 \ and \ x \geq 8, \ but \ \geq 8 \\\\[/tex], both to demonstrate it through contradiction. So,[tex]x \cdot y \geq 8\cdot 8 = 64[/tex]. This implies that both [tex]x \cdot y \ and \ \leq 50 \ and x \cdot y \ and \geq 64[/tex] are valid in the very same period. The argument is valid.
A tech class question any help will be greatly apprieciated
Why would a programmer use a software artifact, such as a flowchart?
Answer:
With a code artifact, a software programmer can test the program in detail and perfect things before launching the software. The program can easily pass the testing phase for a project management artifact without any problems if errors are corrected at the level of the coding
Explanation:
:)
In an executing process, the program counter points __________.
Answer:
To the next instruction to be executed and is incremented after each instruction has been executed.
Explanation:
Given that Program counter is a form of record or directory in a computer processor that has the location of the instruction that is currently being executed.
This it does in such a way that, following the execution of each instruction, the program counter increases the number of instructions it stored and immediately points to the subsequent instruction that follows.
Hence, in an executing process, the program counterpoints "To the next instruction to be executed and is incremented after each instruction has been executed."
How to play Drinkopoly game?
Which program will have the output shown below?
15
16
17
>>> for count in range(17):
print(count)
>>> for count in range(15, 17):
print(count)
>>> for count in range(15, 18):
print(count)
>>> for count in range(18):
print(count)
Answer:
>>> for count in range(15, 18):
print(count)
is the correct answer
Explanation:
The ________ feature introduced by instant messaging shows whether a person is logged in and available to answer a question, pick up the phone, or stop by for a brief meeting.
Answer:
The correct approach is "Presence awareness".
Explanation:
The willingness, at designated occasions, to see which one is available on the internet. When using the IM framework, that very many IM systems show a list of user groups attached to the system. A current model of the IGI Social website is being used by oneself. With either the growing prevalence of Internet chat apps, a Presence Awareness model has been proposed by German IT professionals.Write a loop that fills a list values with ten random numbers between 1 and 100. Write code for two nested loops that fill values with ten different random numbers between 1 and 100.
Answer:
Please look for your answer on Stack Overflow, it's way better.
Explanation:
plzzzz helpppppppppppppppppppppppppp
Answer:
Explanation:
C
1 : What format would you apply to give an entry the appearance of 12-Mar-2014
Accounting Number
imput
Calendar
Date
2: When you add a columm where did it appear
Answer:
1. Date 2. It will appear to the right of the selected column.
Terry visits the website www.examplewebsite.org. What does the domain tell you about the site?
Answer: i can see that it is i i org site
Explanation:
Answer: the website belongs to an organization
Explanation:
Plato
Why does the mock XYZ Health Care Provider need to define a remote access policy to properly implement remote access through the public Internet?
Answer:
Answered below
Explanation:
Remote access policies are policies that state how users can connect to organisational networks through remote access. It states the conditions and permissions required for network connection.
XYZ providers need to define remote access policies in order to ensure network security through proper authentication, control standard and documentation. A remote access policy addresses the viability of the remote user, implementation of authentication protocols, connection restrictions, remote access permissions, duration of sessions etc
e. _______ is the standard recommended by the ITU for low bit-rate voice transmission over the Internet.
Answer:
VoIP ( Voice over internet protocol )
Explanation:
Voice over internet protocol is the standard recommended by the ITU for low bit-rate voice transmission over the internet
VoIP is a methodology and also a group of technology used for the efficient delivery of voice communication and also for the delivery of multimedia files
How many Leaf Nodes in the Binary Tree shown in figure:
Answer:
There are 2 leaf nodes in the given binary tree.
Explanation:
A tree stores the elements in the form of a hierarchal structure. The first node which has children is called the root of the tree. And the nodes with no children are called leaf nodes.
In the given diagram, we can see that all nodes have children except C and D so C and D are leaf nodes.
Hence,
There are 2 leaf nodes in the given binary tree.
When proposing a plan in detail for video production phases, fundraising, and outreaching, which section will you use to make sure that the finished product reaches the intended audience?
A. statement of objective
B. visual synopsis
C. distribution strategy
D. audience-engagement strategy
Answer:
C. distribution strategy
Explanation: i know this because i just took the test and if you think about it it is for the post production phase
have a great day! hope this helps you out. :)
Answer:
c
Explanation:
which of the following players is on offence
Answer:
A baseball player trying to steal second base.
Explanation:
From a test I took, im hoping the answer choices were the same as yours tho.
helpppppppppppppppppppppppppppppppppppppppp
Answer:
the can us microsoft excel
Write a program that tells the user what animal and personality characteristics he/she is likely to have based on the Chinese Zodiac Calendar. The program should ask the user for the year in which he/she was born. The twelve animals of the Zodiac and some of their associated years are rat (1924, 1936, 1948, 1960) · ox (1925, 1937, 1949, 1961) tiger (1926, 1938, 1950, 1962) rabbit (1927, 1939, 1951, 1963) dragon (1928, 1940, 1952, 1964) snake (1929, 1941, 1953, 1965) horse (1930, 1942, 1954, 1966) goat (1931, 1943, 1955, 1967) monkey (1932, 1944, 1956, 1968) rooster (1933, 1945, 1957, 1969) dog (1934, 1946, 1958, 1970) pig (1935, 1947, 1959, 1971) Each year is associated with a particular animal. The years cycle through the animals hence the animal repeats every twelve years. Some characteristics of each animal are as follows Rat: industrious, sensitive, sociable Ox: dependable, modest, patient Tiger: rebellious, daring, impulsive
Answer:
I have a question for you
.
.
Are you a INDIAN?
.
.
IF YES
THEN,
BOYCOTT CHINA
VOTE: STARWARS, STAR TREK, MARVEL, STRANGER THINGS. OR IT ?
Answer: stranger things
Explanation:
Stranger things all the way
On a client/server network, which computer initiates the process of assigning an IP address through DHCP?
Answer:
The client
Explanation:
On a client/server network, THE CLIENT computer initiates the process of assigning an IP address through DHCP. This is because "The Client" computer will serve as the Domain controller in which other computers of the network can find. Hence, The Client computer initiates the process of assigning IP addresses through DHCP to achieve this.
Though, in some case. A user can manually assign the IP address to computer if it is not through DHCP