y = whatever value you want
if 5 < y < 11:
print("Your number is between 6 and 10")
Write a program that outputs inflation rates for two successive years and whether the inflation is increasing or decreasing. Ask the user to input the current price of an item and its price one year and two years ago. To calculate the inflation rate for a year, subtract the price of the item for that year from the price of the item one year ago and then divide the result by the price a year ago. Your program must contain at least the following functions: a function to get the input, a function to calculate the results, and a function to output the results. Use appropriate parameters to pass the information in and out of the function. Do not use any global variables.
The inflation calculator program is an illustration of Python functions; where the functions are executed when called or evoked
The inflation programThe inflation calculator program written in Python, where comments are used to explain each action is as follows:
#Thie function gets all input
def getInput():
cPrice = float(input("Current Price: "))
pYear1 = float(input("Year 1 Price: "))
pYear2 = float(input("Year 2 Price: "))
return cPrice, pYear1, pYear2
#This function prints inflation rate
def printinfRate(myinfRate):
print("Inflation infRate: ",myinfRate)
#This function calculates inflation rate
def calcinfRate(cPrice, pPrice):
infinfRate = (pPrice - cPrice)/ pPrice
printinfRate(round(infinfRate,2))
#The main function begins here
#This gets the prices
cprice, pYear1, pYear2 = getInput()
#The next 2 lines calls the calcinfRate function to calculate the inflation rate
calcinfRate(cprice, pYear1);
calcinfRate(pYear1, pYear2)
Read more about Python Programs at:
https://brainly.com/question/16397886
Martina wants to increase her strength in her lower and upper body to help her in her new waitressing job. Right now, Martina lifts weights once a week and includes exercises that work out all muscle groups. Which change in her workout would be BEST to help her meet her goals? A. making sure that she targets the groups in the upper body and works these groups out every day B. concentrating on the muscle groups that will strengthen only her arms and legs for her job and doing this workout every day C. working out her arms on Monday, her legs on Wednesday, and her stomach on Friday. D. making sure there is variety, at least 48 hours of rest for specific muscle groups, and that each target group gets a workout three times a week Please select the best answer from the choices provided. A B C D
Answer:
D. making sure there is variety, at least 48 hours of rest for specific muscle groups, and that each target group gets a workout three times a week
Explanation:
Making sure there is variety, at least 48 hours of rest for specific muscle groups, and that each target group gets a workout three times a week. Thus, option D is correct.
What are the important points that should be remembered for weight gain?Making sure there is variety, at least 48 hours of rest for specific muscle groups, and that each target group gets a workout three times a week would help her achieve her goals. Martina decided to workout because of her new job of waitressing.
She doesn't need an extensive and vigorous exercise. She only needs tofocus on on exercises which build the muscles of legs and hands which are majorly used in the job.Variation in exercise ,having enough rest and increasing the workout days from once a week to thrice a week will help her achieve her goals without breaking down or falling ill.
Therefore, Thus, option D is correct.
Read more about Workout on:
brainly.com/question/21683650
#SPJ5
Define a function mean(a, b, c) that returns the mean of three numbers
Hint: divide by 3.0 to get a float (decimal).
I provided my code in the picture below. I hope this helps.
Should I get hollow knight, hyper light drifter, Celeste, or stardew valley for switch
Answer:
hollow knight is pretty good
Explanation:
Ooh, very tough question. I've played both Celeste, and Hollow knight. So I cant say anything for the other two games.
Celeste and Hollow Knight are both platforming games, so that was something I was interested in. And both also have deep morals to learn and stories to enjoy. Celeste basically follows Madeline, who's had some emotional problems in the past as she's trying to climb a mountain. In this mountain, a part of her escapes and becomes a but of a antag.
I loved the background, and the characters in this game. But there were a lot of parts in the game that frustrated me and I got very close to just all-out giving up on the game. I still loved it though.
But don't even get me started on Hollow Knight. LIKE OH My GOD, I am obsessed with Hollow Knight and its beauty! I have almost every piece of merchandise, every plush, every t-shirt, charm, sticker, pins, and all the DLC packs. This game is an absolute masterpiece. I cant say anything without giving off the background and lore behind the game. and I'll be honest, there's been a couple of times where I was so touched with the game, that I just started crying. There's lovable characters like Hornet, our little Ghost, Myla (oml rip Myla you beautiful baby), and of course laughable Zote. Its so beautiful. The art is stunning, the animation is so clean. And if you do end up getting Hollow Knight, then your going to be even more excited because Team Cherry is actually in the works of creating the sequel (or prequel) of Hollow Knight, which is Hollow Knight ; Silksong! Definitely go and watch the Nintendo trailer for that game! I've been so excited about it for months and Ive been watching the trailer almost every day.
Anyway, sorry this is so long. But i'm going to go with my gut and say Hollow Knight. Its beautiful, amazing, and overall just..perfect.
Use the drop-down menus to complete statements about the two formats for importing contacts.
The PST file format can only be imported into contacts by the ________
program.
The CSV file type can be created from a document or _________
and can be imported by multiple email programs.
Answer:
The PST file format can only be imported into contacts by the outlook
program.
The CSV file type can be created from a document or spreadsheets
and can be imported by multiple email programs.
Explanation:
Answer:
yes he is right
Explanation:
Car owners are worried with the fuel consumption obtained by their vehicles. A car owner wants trail of several
tankful (the amount a tank can hold) of fuel by recording kilometers driven and gallons used for each tankful. Write
a program that will take input the kilometers driven and gallons used for each tankful. Your program should compute
and display the kilometers per gallon obtained for each tankful. After processing all input information, the program
should compute and display the combined miles per gallon obtained for all tankful.
Answer:
Program written in Python:
Please note that -> is used for indentation purpose
count = int(input("Number of vehicles: "))
totaldist = 0; totalgall = 0
for i in range(count):
-> gallon = int(input("Gallons: "))
-> distance = int(input("Kilometers Travelled: "))
-> totaldist = totaldist + distance
-> totalgall = totalgall + gallon
-> rate = distance/gallon
-> print("Kilometer/Gallon: "+str(rate))
print("Miles/Gallon: "+str(totaldist * 1.609/totalgall))
Explanation:
The program uses loop to ask for distance and gallons used by each vehicles.
At the end of the loop, the program divided the total distance by all vehicles in miles by total gallon user by all vehicles
[This line prompts user for number of vehicles]
count = int(input("Number of vehicles: "))
[This line initialised total distance and total gallon to 0]
totaldist = 0; totalgall = 0
[This iterates through number of vehicles]
for i in range(count):
[This prompts user for gallons used]
gallon = int(input("Gallons: "))
[This prompts user for distance traveled]
distance = int(input("Kilometers Travelled: "))
[This calculates total distance]
totaldist = totaldist + distance
[This calculates total gallons]
totalgall = totalgall + gallon
[This calculates the rate by each vehicles: kilometres per gallon]
rate = distance/gallon
[This prints the calculated rate]
print("Kilometer/Gallon: "+str(rate))
[The iteration ends here]
[This calculates and prints the rate of all vehicles. The rate is calculated by dividing total distance in miles by total gallons used]
print("Miles/Gallon: "+str(totaldist * 1.609/totalgall))
What facilitates the automation and management of business processes and controls the movement of work through the business process?A. Content management system B. Groupware system C. Knowledge management system D. Workflow management systems
Answer:
D. Workflow management systems
Explanation:
Workflow management systems can be defined as a strategic software application or program designed to avail companies the infrastructure to setup, define, create and manage the performance or execution of series of sequential tasks, as well as respond to workflow participants.
Some of the international bodies that establish standards used in workflow management are;
1. World Wide Web Consortium.
2. Workflow Management Coalition.
3. Organization for the Advancement of Structured Information Standards (OASIS).
Workflow management systems facilitates the automation and management of business processes and controls the movement of work through the business process.
The following are various types of workflow management systems used around the world; YAWL, Windows Workflow Foundation, Apache ODE, Collective Knowledge, Workflow Gen, PRPC, Salesforce.com, jBPM, Bonita BPM etc.
Workflow management systems are a type of strategic software program or application created to provide businesses with the infrastructure to build, define.
What is Knowledge system?Several of the worldwide organizations that create guidelines for workflow management are; First, the World Wide Web Consortium. Workflow Management Coalition . OASIS, or the Organization for the Advancement of Structured Information Standards.
Workflow management systems assist business process automation and administration and regulate how work is moved through those processes.
The knowledge base's content consists of a collection of carefully chosen (and quality-checked) Internet sites; each item is tagged, and an abstract provides a brief summary of its subject matter.
Therefore, Workflow management systems are a type of strategic software program or application created to provide businesses with the infrastructure to build, define.
To learn more about Workflow management, refer to the link:
https://brainly.com/question/31567106
#SPJ2
2. Answer any
a. What are the reasons that determine that God is great?
Illustrate. (God's Grandeur)
b. How does Mrs. Mooney succeed in her mission at the
end? Explain. (The Boarding House)
C. Why is Martin Luther King's speech so popular till now
Explain. (I Have a Dream)
d. How were the handicapped, black and weak childre
viewed in the past? (The Children who Wait)
e. Why is Lydia Pinkham the most notable character in th
essay? Explain.(Women's Business)
f. What are the consequences of overpopulation? Sugges
some of the solutions of it. (Two long Term Problems
Answer:
C
Explanation:
martin luther kings speech is being restated in todays current events in the BLM protests because martin luther king was basically fighting for black peoples rights and the 14th and 15th amendments were supposed to help black peoples rights and freedom but today people aret following that because of police violence/brutality
How do you halt an infinite loop?
by pressing the Control key and the__key
Answer:
We generally need to break the infinite loop, and this can be done by pressing the control key and the 'C' key.
Explanation:
In a programming language like C, there may be a time when we may run with endless or infinite loops because of the following reasons:
Either the programmer may have forgotten to include a way to exit from the infinite loopor the exit condition may have just never metWe generally need to break the infinite loop, and this can be done by pressing the control key and the 'C' key.
Therefore, pressing Ctrl+C can halt an infinite loop
Describe
the
Visual basic
select case construct
Answer:
Select Case statement allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each select case.
Answer:
ggggggggggggggggggg
A loop that will output every other name in the names list.
A loop that will output only the positive numbers in the numbers list.
A loop that will output the sum of all the values in the numbers list.
A loop that will output only the numbers that are odd.
A loop that will output only the names that come before "Thor" in the alphabet from the names list.
A loop that will find the maximum or minimum value in the numbers list. This algorithm requires an additional variable that is assigned to the first element in the list. Then, in a loop compare each element to the variable. If the element is > (for max) or < (for min), assign the variable to the element. After the loop, print the variable.
in python
PLEASE HELPPPP
Answer:
names = ['Peter', 'Bruce', 'Steve', 'Tony', 'Natasha', 'Clint', 'Wanda', 'Hope', 'Danny', 'Carol']
numbers = [100, 50, 10, 1, 2, 7, 11, 17, 53, -8, -4, -9, -72, -64, -80]
for index, element in enumerate(names):
if index % 2 == 0:
print(element)
for num in numbers:
if num >= 0:
print(num, end = " ")
count = 0
for i in numbers:
count += i
avg = count/len(numbers)
print("sum = ", count)
print("average = ", avg)
for num in numbers:
if num % 2 != 0:
print(num, end = " ")
Explanation:
I'm stuck on the last two.. I have to do those too for an assignment.
How is the proliferation of mobile devices that are locally powerful, use apps instead of full-fledged applications, and rely on wireless network connectivity changing system architecture design considerations?
Answer:
System Architecture Designs must now take into consideration, during the design of mobile communication systems such as mobile phones, and Interactive Personal Application Devices (Ipads), to accommodate hybrid applications that are partially functional without the internet but provides more utility to the user when they are internet-connected wirelessly.
Explanation:
Traditionally, applications were designed to fully function out of local devices where they are installed. Occassionally, they'd be required to update over the internet or get registered to a particular user or set of users.
As mobile phones evolved and mobile apps designers became more metric -hungry, mobile apps become more localized on cloud-based servers with apps becoming more advanced at constantly communicating between local infrastructure and cloud-based supercomputers.
This has afforded more functionality for users and increased the bottom-line for creators.
Cheers
The proliferation of mobile devices is done by using applications that are in requirement of internet connectivity in order to unlock more features.
The reason for using the applications is that certain things need to be engaged by runtime and handled by the server. It's also vital in enhancing security.
The advantages of such devices include consistency, confidentiality, accessibility, reliability, etc. It's also vital in enhancing basic requirements of the networks.
Read related link on:
https://brainly.com/question/15850095
[30 points, will mark Brainliest] Which of the following is the lowest hexadecimal value? Explain why. Options to chose; F2, 81, 3C, and 39.
Answer:
The answer to this question is given below in the explanation section.
Explanation:
First, we need to convert these hexadecimal numbers into decimal numbers, then we can easily identify which one is the lowest hexadecimal.
The hexadecimal numbers are F2, 81, 3C, and 39.
F2 = (F2)₁₆ = (15 × 16¹) + (2 × 16⁰) = (242)₁₀
81 = (81)₁₆ = (8 × 16¹) + (1 × 16⁰) = (129)₁₀
3C = (3C)₁₆ = (3 × 16¹) + (12 × 16⁰) = (60)₁₀
39 = (39)₁₆ = (3 × 16¹) + (9 × 16⁰) = (57)₁₀
The 39 is the lowest hexadecimal number among the given numbers.
Because 39 hex is equal to 57 decimal.
39 = (39)₁₆ = (3 × 16¹) + (9 × 16⁰) = (57)₁₀
What are three techniques used to generate ideas? O A. Free writing, brainstorming, and concept mapping O B. Free writing, clustering, and detail mapping O c. Free writing, pre-writing, and drafting O D. Pre-writing, drafting and revision
freewriting brainstorming and concept mapping
Both pre writing and post reading strategies has been used to enhance comprehension as well as the skill of the learner.
What is Pre-writing or surveying?Pre-reading or surveying is the process of skimming a text to locate key ideas before carefully reading a text (or a chapter of a text) from start to finish. It provides an overview that can increase reading speed and efficiency.
Reading strategies aim to facilitate the understanding of difficult texts. These strategies are very effective and can facilitate not only reading but also the interpretation of the text. Among the reading strategies, we can mention the use of context clues, which facilitate the understanding of difficult and unknown words.
Synthesizing the text is also a very beneficial strategy, as it allows the text to become smaller, more objective, and direct. Reading strategies should be used even by people who find it easy to read texts with different difficulties, as it allows the text to be understood in a deeper and more complete way.
Therefore, Both prereading and post reading strategies has been used to enhance comprehension as well as the skill of the learner.
More information about context clues at the link:
brainly.com/question/8712844
#SPJ2
is the practice of downloading and distributing copyrighted content digitally without permission??
Answer:
plagarism
Explanation:
this is not giving credit to/using copywrited info w/ out permission.
Which careers require completion of secondary education, but little to no postsecondary education? Mathematical Technicians and Mechanical Engineers Sociologists and Electronics Engineering Technicians Food Science Technicians and Zoologists Nondestructive Testing Specialists and Surveying Technicians
Answer:
Nondestructive Testing Specialists and Surveying Technicians
Answer:
D
Explanation:
4.17 LAB: Mad Lib - loops
Mad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (and hopefully funny) ways.
Write a program that takes a string and integer as input, and outputs a sentence using those items as below. The program repeats until the input string is quit.
Ex: If the input is:
apples 5
shoes 2
quit 0
the output is:
Eating 5 apples a day keeps the doctor away.
Eating 2 shoes a day keeps the doctor away.
Note: This is a lab from a previous chapter that now requires the use of a loop.
Answer:
Written in Python:
user_input = input()
input_list = user_input.split()
while True:
input_string = input_list[0]
if input_string == "quit":
break
else:
input_integer = int(input_list[1])
print("Eating "+str(input_integer)+ " "+input_string+" a day keeps the doctor away.")
user_input = input()
input_list = user_input.split()
Explanation:
If you take comprehensive notes in class,you won’t need compare them to your textbook and readings
Answer:
Yes, Comprehensive notes make you remember. If you need to remember something studies show that writing it instead of typing it helps you remember more
Natalie wrote a short program for parallel arrays as part of an assignment. What will be the first line of output based on her code?
public class parArray
{
public static void main(String[] args){
int[] empID = {101, 102, 103};
String[] emp_name = {“Jamie Doe”, “Patricia Jack”, “Paul Nick”};
String[] dept = {“Finance”, “Technology”, “HR”};
for ( int i = 0; i
{
System.out.print( empID[i] + “\t”);// \t = inserts a tab space
System.out.print( emp_name[i] + “\t”);
System.out.print( dept[i] + “\t”);
System.out.println();
}
}
}
A. 103 Paul Nick HR
B. 101 102 103
C. Jamie Doe Patricia Jack Paul Nick
D. 101 Jamie Doe Finance
many web browsers include _________ tools to make it easier for designers to locate the source of a style that has been applied to a specific page element.
a. designer
b. planner
c. developer
d. creator
Answer:
c. developer
Explanation:
DEVELOPER TOOLS are tools that enables designers to easily and quickly edit web page and as well diagnosed issues or problem on a website which will inturn enables them to build a great and better websites without stress reason been that when a designer makes use of DEVELOPER TOOLS they can quicky track down and as well fix the problem that was diagnosed within a minute or seconds thereby saving time when developing a website profile.
You are writing a program to average a student’s test scores, using these steps:
Define the problem precisely.
Gather data.
Perform any needed calculations or data manipulations.
Communicate the results, along with an interpretation as needed.
Check the accuracy of your calculations and data manipulations.
Identify the number of the step associated with asking the user for the test scores.
Answer:
Gather data is the answer
Explanation:
You are writing a program to average a student’s test scores. In this program, the problem may precisely be in gathering the data for calculation. Thus, the correct option is A.
What does gathering data mean?Data collection or data gathering is the process of gathering and measuring the information on variables of interest according to the study, in an established systematic fashion which enables one to answer the stated research related questions, test hypotheses, and evaluate the outcomes of the study.
The five most common methods for the collection of data include, Document reviews, Interviews, Focus groups, Surveys, Observation or testing the data. Each of these has many possible variations.
Therefore, the correct option is A.
Learn more about Program here:
https://brainly.com/question/11023419
#SPJ2
Write a program that, given an integer, sums all the numbers from 1 through that integer (both inclusive). Do not include in your sum any of the intermediate numbers (1 and n inclusive) that are divisible by 5 or 7.
Answer:
let n = 10;
let sum = 0;
for(i=1; i<=n; i++) {
if ((i%5) && (i%7)) {
sum += i;
}
}
console.log(`Sum 1..${n} excluding 5 and 7 multiples is ${sum}`);
Explanation:
This is in javascript.
example output:
Sum 1..10 excluding 5 and 7 multiples is 33
Bob approaches a beverage vending machine at a fast food kiosk. He has the option of choosing between hot and cold beverages. What control
structure would Bob be using if he chose a cold beverage? In contrast, if he made fresh fruit juice at home using a set of instructions, what
control structure would Bob be using?
Bob would be using the [__]
control structure if he chose a cold beverage. He would be using the [__]
control.
structure if he made fresh fruit juice at home using a set of instructions
Answer: I took the test and selection was correct for the first blank,
for the second blank its sequence
Explanation:
1. Human to ____Human____
2. _Human________ to machine
3. Machine to ______Machine
4. _______________ to machine
Answer:
uhmmm human machine whaT?
Explanation:
Answer:
4 is Machine to machine
Write a code segment that uses a loop to create and place nine labels into a 3-by-3 grid. The text of each label should be its coordinates in the grid, starting with (0, 0). Each label should be centered in its grid cell. You should use a nested for loop in your code.
Answer:
The question is answered using Python:
for i in range(0,3):
for j in range(0,3):
print("("+str(i)+", "+str(j)+")",end=' ')
num = int(input(": "))
Explanation:
The programming language is not stated. However, I answered using Python programming language
The next two lines is a nested loop
This iterates from 0 to 2, which represents the rows
for i in range(0,3):
This iterates from 0 to 2, which represents the columns
for j in range(0,3):
This prints the grid cell
print("("+str(i)+", "+str(j)+")",end=' ')
This prompts user for input
num = int(input(": "))
What does advance mean
Answer:
Hey there, there are many meanings for advance here are some answers
VERB
advance (verb) · advances (third person present) · advanced (past tense) · advanced (past participle) · advancing (present participle)
move forward in a purposeful way.
"the troops advanced on the capital" · "she stood up and advanced toward him"
synonyms:
move forward · proceed · move along · press on · push on · push forward · make progress · make headway · forge on · forge ahead · gain ground · approach · come closer · move closer · move nearer · draw nearer · near · draw nigh
antonyms:
retreat
cause (an event) to occur at an earlier date than planned.
"I advanced the date of the meeting by several weeks"
synonyms:
bring forward · put forward · move forward · make earlier
antonyms:
postpone
make or cause to make progress.
"our knowledge is advancing all the time" · "it was a chance to advance his own interests"
synonyms:
promote · further · forward · help · aid · assist · facilitate · boost · strengthen · improve · make better · benefit · foster · cultivate · encourage · support · back · progress · make progress · make headway · develop · become better · thrive · flourish · prosper · mature · evolve · make strides · move forward (in leaps and bounds) · move ahead · get ahead · go places · get somewhere
antonyms:
impede · hinder
(especially of shares of stock) increase in price.
"two stocks advanced for every one that fell"
put forward (a theory or suggestion).
"the hypothesis I wish to advance in this article"
synonyms:
put forward · present · come up with · submit · suggest · propose · introduce · put up · offer · proffer · adduce · moot
antonyms:
retract
lend (money) to (someone).
"the bank advanced them a loan"
synonyms:
lend · loan · credit · pay in advance · supply on credit · pay out · put up · come up with · contribute · give · donate · hand over · dish out · shell out · fork out · cough up · sub
antonyms:
borrow
pay (money) to (someone) before it is due.
"he advanced me a month's salary"
synonyms:
spend · expend · pay · lay out · put up · part with · hand over · remit · furnish · supply · disburse · contribute · give · donate · invest · pledge · dish out · shell out · fork out/up · cough up
NOUN
advance (noun) · advances (plural noun)
a forward movement.
"the rebels' advance on Madrid was well under way" · "the advance of civilization"
synonyms:
progress · headway · moving forward · forward movement · approach · nearing · coming · arrival
a development or improvement.
"genuine advances in engineering techniques" · "decades of great scientific advance"
synonyms:
breakthrough · development · step forward · step in the right direction · leap · quantum leap · find · finding · discovery · invention · success · headway · progress · advancement · evolution · improvement · betterment · furtherance
an increase or rise in amount, value, or price.
"bond prices posted vigorous advances"
synonyms:
increase · rise · upturn · upsurge · upswing · growth · boom · boost · elevation · escalation · augmentation · hike
an amount of money paid before it is due or for work only partly completed.
"the author was paid a $250,000 advance" · "I asked for an advance on next month's salary"
synonyms:
down payment · advance against royalty · deposit · retainer · prepayment · front money · money up front
a loan.
"an advance from the bank"
synonyms:
credit · mortgage · overdraft · debenture · lending · moneylending · advancing · sub
(advances)
an approach made to someone, typically with the aim of initiating a sexual encounter.
"women accused him of making improper advances"
synonyms:
sexual approaches · overtures · moves · a pass · proposal · proposition · offer · suggestion · appeal · come-on
ADJECTIVE
advance (adjective)
done, sent, or supplied beforehand.
"advance notice" · "advance payment"
synonyms:
preliminary · leading · forward · foremost · at the fore · sent (on) ahead · first · exploratory · explorative · pilot · vanguard · test · trial · early · previous · prior · beforehand
ORIGIN
Middle English: from Old French avance (noun), avancer (verb), from late Latin abante ‘in front’, from ab ‘from’ + ante ‘before’. The initial a- was erroneously assimilated to ad- in the 16th century.
Explanation:
Those are every single definition for advance!
Ok so im going to list my question and then the work so far.
Here is the code so far:(THE PROBLEM WITH THE CODE IS THAT THE IM SUPPOSE TO USE FIND() TO REPEATEDLY CHANGE THE OCCURRENCE OF THE WORD "MASK" TO THE WORD "HAT" IN THE FILE BUT AM KIND OF LOST HAVE BEEN WORKING ON THIS FOR A WEEK AND A HALF) ALSO I CAN NOT use the replace method, count method, split method, range() function, or lists in your solution. HAVE BEEN TRYING TO FIND SUM WAY TO USE FIND() BUT AM COMING UP SHORT
CODE:
#Get input file name
fileOne = input("Enter the input file name :")
#Get output file name
fileTwo = input("Enter the output file name :")
'''Get a string that will be searched in the source file
to locate all occurrences of the string'''
targetString = input("Enter the target string :")
'''Get a string that will replace each occurrence of the target
string in the source file'''
replacementString = input("Enter the replacement string :")
files =input("Enter a file with the word 'mask':")
#Open the input file in read mode
f1 = open(fileOne,"r+")
#Read the content of input file
content =f1.read()
#Replace the target string with the replacement string
content =f1.find('mask')
print(files[0:content]+ "hat"+ files[content +content:len(files)])
#Open the output file in write mode
f1 = open(fileTwo,"w")
'''Write the content after all of the occurrences of the target
string have been found and replaced by the replacement string'''
f1.close()
Answer:
qwerty
Explanation:
qwerty
At a minimum, how many bits are needed in the MAR with each of the following memory sizes?
a. 1 million bytes
b. 10 million bytes
c. 100 million bytes
d. 1 billion bytes
Answer:
a. 20 bits
b. 24 bits
c. 27 bits
d. 30 bits
Explanation:
Using base 2 numbers where a location in RAM is represented using an address.
Hence, given that with 2 bits one can store 4 things maximum, with 3 bits, one can store between 5 and 8 things.
A. Therefore to represent 1 million bytes -1 addresses, we need 20 bits. This depicts 1,048,576 to be exact. This is a megabyte or 1 MB.
B For 10 million bytes we have 1 million different addresses using 20 bits.
This equates to 10 million is 10 x bigger than 2^20.
With each addition of one bit to the address, the addresses to represents doubled e double the number of addresses that we can represent (and reach).
For instance : 1 million -> 2 million -> 4 million -> 8 million -> 16 million = 2^20 -> 2^21 -> 2^22 -> 2^24
Thus, 24 bits equates to 10 million addresses. 2^23 < 10 million < 2^24 where 2^24 = 16,777,216.
C. In 100 million bytes, 27 bits are required.
Thereby 2^26 = 67,108,864 bytes, not enough for 100 million. 2^27 = 134,217,728 and this is enough.
D. 1 billion bytes is equal to 1000 times 1 million or 1000 * 2^20.
Therefore in base 2 notation, it is (2^20 * 2^10) = 2^30 = 1,073,741,824.
Hence 30 bits are required to represent 1 billion bytes. This equates to 1GB.
Using the bit-byte relationship, the minimum bit memory allocation for the memory sizes stated are 20, 24, 27 and 30 bits respectively.
To obtain the minimum number of bits required for each of the given memory sizes :
We use the relation :
[tex] 2^{n}[/tex]Where, n = number of bits
For 1 million byte :
[tex] 2^{n} = 1048576 [/tex]
[tex] 2^{n} = 2^{20}[/tex]
[tex] n = 20 [/tex]
n = 20
2.) For 10 million bytes :
[tex] 2^{n} ≥ 10,000,000[/tex]
[tex] 2^{24} = 16777216 [/tex]
All integers before 24 equates to a value less than 10,000,000
n = 24
3.) For 100 million bytes :
[tex] 2^{n} ≥ 100,000,000 [/tex]
[tex] 2^{27} = 134217728 [/tex]
n = 27
All integers before 27 equates to a value less than 100,000,000
4. For 1,000,000,000 bytes :
[tex] 2^{n} = 1073741824 [/tex]
[tex] 2^{30} = 2^{30} [/tex]
n = 30
All integer values before 30 equated to a value less than 1,000,000,000
Learn more :https://brainly.com/question/24230271?referrer=searchResults
Write a program which takes user input of a number of inches, and then prints the number of whole feet in that many inches (remember there are 12 inches in a foot). For example if the user enters 56 The program should print 4 As there are 4 whole feet in 56 inches (56'' is the same as 4'8'')
Answer:
inches = int(input("Enter the number of inches: "))
whole_feet = int(inches / 12)
print("There are " + str(whole_feet) + " whole feet in " + str(inches) + " inches")
Explanation:
*The code is in Python.
Ask the user to enter the number of inches
Calculate the whole_feet by dividing the inches by 12 (Since 1 inch = 1/12 feet) and casting the result to int so that you can get the number of whole feet. Note that if you do not cast it to the int, you would get a decimal value
Print the result
Which type of webpages will automatically adjust the size of the content to display appropriately relative to the size of the screen of the device on which it is displayed?a. automatic b. responsive c. adjustable d. relative
Answer:
C
Explanation:
FJH GGSGUXH YZUDYFZ GSUFZD. DHUF