Answer:
See Explanation
Explanation:
Required
Modify the program
To modify the program, we simply make use of an iterative statement.
To do this, I'll make use of a do while loop.
So, we have:
Declarations
num year = 1
num copies = 100000
num price = 0.15
num total = 0
num COPIES_INCREASE = 0.04
num PRICE_INCREASE = 0.03
do:
copies = copies + copies * COPIES_INCREASE
price = price + price * PRICE_INCREASE
total = total + copies * price
output year, total
year = year + 1
while year<=10
The above do while loop enables the program to repeat the statements in the following block:
do:
----
---------
---
-
while year <=10
The loop calculates the copies & price in each year and also updates the values of the variables; so that they can be used for the nexr iteration
why use a chart legend?
Answer:
A legend or key helps the user build the necessary associations to make sense of the chart.
Explanation:
Legends summarize the distinguishing visual properties such as colors or texture used in the visualization.
Create a list called numbers containing the values from 1 through 15, then use slices to perform the following operations consecutively: a. Select number’s even integers. b. Replace the elements at indices 5 through 9 with 0s, then show the resulting list. c. Keep only the first five elements, then show the resulting list. d. Delete all the remaining elements by assigning to a slice. Show the resulting list.
Answer:
Kindly check explanation
Explanation:
From python :
List containing values from 1 through 15:
my_list = list(range(1,16))
#creates a list of values from 1 to 15,(16 is excluded)
B.) select even integers :
for digits in my_list :
if digit%2 == 0;
print(digit)
# prints numbers in the list which does not leave a remainder when divided by .
C.)
for digits in my_list[4,9]:
my_digit[digits] = 0
my_digits
#Replaces the elements at indices 5 through 9 with 0s, then show the resulting list.
D.)
my_digits[:5]
#selects digits with index 0 up to 4
E.)
del my_digits[:5]
#DELETE elements in my digits starting from the fifth index
4.16 LAB: Count characters Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in the string. The output should include the input character and use the plural form, n's, if the number of times the characters appears is not exactly 1. Ex: If the input is: n Monday the output is: 1 n Ex: If the input is: z Today is Monday the output is: 0 z's Ex: If the input is: n It's a sunny day the output is: 2 n's Case matters. Ex: If the input is: n Nobody the output is: 0 n's
Answer:
In Python:
sttr = input("String: ")
ch = input("Character: ")
count = sttr.count(ch)
print(str(count)+" "+ch, end = '')
if count>1 or count==0:
print("'s")
Explanation:
This prompts the user for string
sttr = input("String: ")
This prompts the user for character
ch = input("Character: ")
This counts the number of occurrence
count = sttr.count(ch)
This prints the number of occurrence of the character
print(str(count)+" "+ch, end = '')
This checks if the number of occurrence is 0 or greater than 1.
if count>1 or count==0:
If yes, it prints 's
print("'s")
A restaurant buys a pizza oven that is 4.5 feet long, 5 feet wide and 6 feet tall. What is the volume of the pizza oven?
Answer:
135 as 4.5 times 5 times 6 gives you the volume and it =135
NO THIS ISNT ANY HOMEWORK!
Does anyone know a laptop under $200 that can run Minecraft Java edition and maybe 60fps?
PLEASE NAME A SPECIFIC ONE not to be rude but please don’t waste my time!
Sorry if I’m asking for too much we’re gonna travel soon and it’s gonna be for long months and I can’t bring my entire set up but I also don’t have much money and I can’t find any laptop like that so if you can help? Thank you!
Answer:
Name CPU, GPU & RAM My Rating (Out of 10)
HP Pavilion 15 Intel Core i7-8565U Nvidia MX 250 16GB 8.1
Asus VivoBook S15 Intel Core i5-8265U Nvidia MX250 8GB 7.8
Dell Inspiron 15 Intel Core i5-8250U Intel HD Graphics 16GB 7.6
Acer Aspire 5 Intel Core i5-8265U Nvidia MX250 8GB 7.5
Explanation:
I dont know the prices, I just searched it, though I will look into it more
Answer:
dont know the price but my mom bought me a macbook pro 13 inch and it works great !
Explanation:
edit: oop lol its like 1200 dollars
What sequence is used to create a brochure document from a template?
New, File, Brochures
File, New, Brochures
O Brochures, File, New
O Brochures, New, File
Answer:
I think its a or b
Explanation:
Sorry if I'm wrong
Answer:
The answer is B. File, New, Brochures
Explanation:
PLZ PLZ PLZ GIVE ME BRAINLIEST!!!!
Can someone help me please
Answer:
She made a profit of 450$
Explanation:
3.5 code practice question 1
Answer:
what is this a question or just saying something?
Explanation:
Answer:
uh what?
Explanation:
write asswmbly prgram and do the following:
You have two numbers, the first one is 32 bits and the second is a 16 bits number. Find the result of division and store it in memory location called RESULT then store the reminder of division in memory location called MOD. (Use MACRO)
Answer:
I did this last year :/ i feel your pain.
Explanation:
What are the disadvantages of using folders
Answer:
√ folders can cause some inconvenience situation...
√ The decompress / compress action takes time.
√ When you double-click on a file inside a “folder”, what really happens is the file gets extracted to a temporary folder.
heres one:
when you delete a folder, he stuff inside gets deleted, and there isnt a way to get it back.
is an electronics standard that allows different kinds of electronic instruments to
communicate with each other and with computers.
Explanation:
MIDI is an acronym that stands for Musical Instrument Digital Interface. It is a standard protocol that helps to connects musical instruments with computers and several hardware devices to communicate. It was invented in the 80's as a way to standardize digital music hardwares.
IF IT HELPED U MARK ME AS A BRAIN LIST
Assume that the execution time for a program is directly proportional to instruction access time. The access to an instruction in the cache is 10 times faster than access to an instruction in the main memory. If an instruction is not found in the cache, i.e., cache miss, it is fetched from the main memory to the cache and then fetched from the cache to be executed. Assume that a requested instruction will cause cache miss has a probability of 0.08. Let the speedup factor is defined as the ratio of program execution time without the cache to program execution time with the cache.
a. Calculate the speedup factor to execute such a program.
b. using this assumption, assuming that the cache is 20 times faster than the main memory.
Answer:
a. 5.81
B. 7.93
Explanation:
A.
X is the time it takes to load instructions from cache
10X = time to execute program
0.08 = probability of cache instructions
1-0.08 = 0.92(92% instructions are going to be loaded from cache).
Tc = time to execute with cache
Tc = 0.92X+0.08x10X
= 0.92X+0.8X
= 1.72X
Speed factor = tm/tc
= 10X/1.72X
= 5.81
B.
If cache is 20 times faster
Tm = 20X
Tc = 0.92X + 0.08 x 20X
= 0.92X + 1.6X
= 2.52X
Speed factor = 20X/2.52X
= 7.93
What Is an Antivirus?
Answer:
Antivirus software is a type of program designed and developed to protect computers from malware like viruses, computer worms, spyware, botnets, rootkits, keyloggers and such. Antivirus programs function to scan, detect and remove viruses from your computer.
Explanation: