MyProgramming Lab

It needs to be as simple as possible. Each question is slightly different.

1. An arithmetic progression is a sequence of numbers in which the distance (or difference) between any two successive numbers is the same. This in the sequence 1, 3, 5, 7, ..., the distance is 2 while in the sequence 6, 12, 18, 24, ..., the distance is 6.

Given the positive integer distance and the non-negative integer n, create a list consisting of the arithmetic progression between (and including) 1 and n with a distance of distance. For example, if distance is 2 and n is 8, the list would be [1, 3, 5, 7].

Associate the list with the variable arith_prog.

2.

An arithmetic progression is a sequence of numbers in which the distance (or difference) between any two successive numbers if the same. This in the sequence 1, 3, 5, 7, ..., the distance is 2 while in the sequence 6, 12, 18, 24, ..., the distance is 6.

Given the positive integer distance and the integers m and n, create a list consisting of the arithmetic progression between (and including) m and n with a distance of distance (if m > n, the list should be empty.) For example, if distance is 2, m is 5, and n is 12, the list would be [5, 7, 9, 11].

Associate the list with the variable arith_prog.

3.

A geometric progression is a sequence of numbers in which each value (after the first) is obtained by multiplying the previous value in the sequence by a fixed value called the common ratio. For example the sequence 3, 12, 48, 192, ... is a geometric progression in which the common ratio is 4.

Given the positive integer ratio greater than 1, and the non-negative integer n, create a list consisting of the geometric progression of numbers between (and including) 1 and n with a common ratio of ratio. For example, if ratio is 2 and n is 8, the list would be [1, 2, 4, 8].

Associate the list with the variable geom_prog.

Answers

Answer 1

Answer:

The program in Python is as follows:

#1

d = int(input("distance: "))

n = int(input("n: "))

arith_prog = []

for i in range(1,n+1,d):

   arith_prog.append(i)

print(arith_prog)

#2

d = int(input("distance: "))

m = int(input("m: "))

n = int(input("n: "))

arith_prog = []

for i in range(m,n+1,d):

   arith_prog.append(i)

print(arith_prog)

#3

r = int(input("ratio: "))

n = int(input("n: "))

geom_prog = []

m = 1

count = 0

while(m<n):

   m = r**count

   geom_prog.append(m)

   count+=1

print(geom_prog)

Explanation:

#Program 1 begins here

This gets input for distance

d = int(input("distance: "))

This gets input for n

n = int(input("n: "))

This initializes the list, arith_prog

arith_prog = []

This iterates from 1 to n (inclusive) with an increment of d

for i in range(1,n+1,d):

This appends the elements of the progression to the list

   arith_prog.append(i)

This prints the list

print(arith_prog)

#Program 2 begins here

This gets input for distance

d = int(input("distance: "))

This gets input for m

m = int(input("m: "))

This gets input for n

n = int(input("n: "))

This initializes the list, arith_prog

arith_prog = []

This iterates from m to n (inclusive) with an increment of d

for i in range(m,n+1,d):

This appends the elements of the progression to the list

   arith_prog.append(i)

This prints the list

print(arith_prog)

#Program 3 begins here

This gets input for ratio

r = int(input("ratio: "))

This gets input for n

n = int(input("n: "))

This initializes the list, geom_prog

geom_prog = []

This initializes the element of the progression to 1

m = 1

Initialize count to 0

count = 0

This is repeated until the progression element is n

while(m<n):

Generate progression element

   m = r**count

Append element to list

   geom_prog.append(m)

Increase count by 1

   count+=1

This prints the list

print(geom_prog)


Related Questions

Cuá es la relación entre la tecnología  y la vida?

Answers

Answer:

La innovación tecnológica ha permitido que la humanidad avanzara sobre la base de disponer de unas prótesis más potentes en el divagar por la tierra

Explanation:

Hola! Dicho esto en el mundo en que vivimos hoy en día hemos podido con la tecnología inventar cosas que nos ayudan con nuestras vidas cotidianas como son los medios de comunicación, transporte, entre otros. Y para terminar de contestar la pregunta como tal pues sería algo como:

"La relación entre la tecnología  y la vida es que la tecnología ayuda al ser humano en diferentes áreas tales como el transporte y la comunicación que hoy en día son un punto clave para poder vivir mejor."

¡Espero que te haya ayudado mucho!! ¡Bonito día!

Change the case of letter by​

Answers

Answer:

writing it as a capital or lower case.

Explanation:

T - upper case

t - lower case

not sure if that is what you meant or not

Answer:

Find the "Bloq Mayus" key at the left side of your keyboard and then type

Explanation:

Thats the only purpose of that key

What CSS property do you use to determine whether flex items are displayed horizontally or vertically

Answers

Answer:

Flex direction

Explanation:

HTML is an acronym for hypertext markup language and it is a standard programming language which is used for designing, developing and creating web pages.

Generally, all HTML documents are divided into two (2) main parts; body and head.

The head (header) contains information such as version of HTML, title of a page, metadata, link to custom favicons and cascaded style sheet (CSS) etc.

On the other hand, the body of a HTML document contains the contents or informations that a web page displays.

Generally, the part of a HTML document where the cascaded style sheet (CSS) file is linked is the header.

A style sheet can be linked to an HTML document by three (3) main methods and these are;

I. External style.

II. Inline style.

III. Embedded (internal) style.

Flex direction is a CSS property that's used to determine whether flex items are displayed horizontally or vertically.

#include

int main()
{
char ch;
printf("Enter any letter");
ch=getch
();
printf("\nYou Pressed %c",ch);

return 0;
}
whats the error not giving the correct output

Answers

Answer:

#include<studio.h>

#include<conio.h>

void main()

{

char ch;

printf("Enter any letter");

scanf("%c",&ch);

You want to use your Windows workstation to browse the websites on the internet. You use a broadband DSL connection to access the internet. Which network protocol must be installed on your workstation to do this

Answers

Answer:

IP

Explanation:

You work in a branch office and use a desktop system named Comp1. A Windows server named Srv1 is located in the main office.Srv1 stores several shared folders that you use, including the Data share. You use Offline Files in the branch office to make the files on the server are available when the WAN link is down.How can you prevent all files in the Data share from being cached while making sure files in other shared folders are still available?A. On Srv1, edit the Local Security Policy.B. On Comp1, edit the Offline Files settings in the Sync Center.C. On Srv1, edit the properties for the Datafolder.D. On Srv1, edit the Offline Files settings in the Sync Center.

Answers

Answer:

C. On Srv1, edit the properties for the Data folder

Explanation:

Using the caching feature of Offline Folder gives users access to shared folders through the maintenance of a local copy which allows users to continue working with the resources in the shared folder in the event the server hosting the folder cannot be reached, which leads to increased  productivity. However, when a shared folder is the storage location of sensitive data to which there is restricted access, it may be required to prevent the folder from being cached

The caching option property for the shared folder can be set from within the Offline Settings, to configure the availability of the folder when the server WAN link is down

The process where the programmer steps through each of the program's statements one by one is called

Answers

The process where the programmer steps through each of the program's statements one by one is called [tex]\sf\purple{hand \:tracing}[/tex].

[tex]\bold{ \green{ \star{ \orange{Mystique35}}}}⋆[/tex]

Which access control type would you use to grant permissions based on the sensitivity of the information contained in the objects

Answers

Answer:

Mandatory Access Control (MAC) is a means of restricting access to system resources based on the sensitivity (as represented by a label) of the information contained in the system resource and the formal authorization (i.e., clearance) of users to access information of such sensitivity.

X = 10
y =
20
х» у
print("if statement")
print("else statement")

Answers

Answer:

"else statement"

Explanation:

Given

The above code segment

Required

The output of the program

Analyzing the program line by line, we have:

x = 10 ----> Initialize x to 10

y = 20 ----> Initialize y to 20

if x > y ----> check if x is greater than y

    print("if statement") ----> Execute this line if the condition is true

The condition is false because 10 is less than 20, so: the statement will not be executed. Automatically, the else condition will be executed

else

   print("else statement")

"else statement" without the quotes will be printed because the if condition is false

La historia de los productos tecnologicos
porfa

Answers

Answer:

La tecnología es el conocimiento y el uso de herramientas, oficios, sistemas o métodos organizativos. La palabra tecnología también se usa como un término para el conocimiento técnico que existe en una sociedad.

La demarcación entre tecnología y ciencia no es del todo fácil de hacer. Muchos programas de ingeniería tienen un gran elemento de ciencias y matemáticas, y muchas universidades técnicas realizan investigaciones exhaustivas en materias puramente científicas. La mayor parte de la ciencia aplicada generalmente se puede incluir en la tecnología. Sin embargo, una diferencia fundamental importante es que la tecnología tiene como objetivo "ser útil" en lugar de, como la ciencia en su forma ideal, comprender el mundo que nos rodea por sí mismo. El hecho de que comprender la realidad que nos rodea (sobre todo en forma de leyes y principios universales) sea muy útil para fines técnicos, explica por qué la ciencia y la tecnología tienen grandes similitudes. Al mismo tiempo, existen áreas de conocimiento e investigación en tecnología e ingeniería donde las propias ciencias naturales puras han hecho contribuciones muy limitadas, como la tecnología de producción, la tecnología de la construcción, la ingeniería de sistemas y la informática. En estas y otras áreas de la tecnología, por otro lado, puede haber depósitos de matemáticas, economía, organización y diseño.

A two-dimensional array of ints, has been created and assigned to a2d. Write an expression whose value is the number of rows in this array.

Answers

Explanation:

oi.........................

explain the importance of using onedrive in windows 10, and how knowledge of it will have an impact on today's workplace

Answers

Answer:

The importance of using Onedrive it helps save stuff if you have no more room on your computer it helps with schooling and works for jobs you have Microsoft Teams, Onedrive, Outlook, Office 365. It gives all sorts of things that you can use for anything contacts on Outlook and Teams.

7. The message on a diamond-shaped sign might be
a. Pass With Care, Trucks Use Right Lane, or
Do Not Pass.
b. Curve, Hill, or Winding Road.
One Way, Wrong Way, or No Trucks.
d. No Turn, Speed Zone Ahead, or Left Lane
Must Turn Left.

Answers

Answer:

a. pass with care, trucks use right lane, or do not pass

You connect your computer to a wireless network available at the local library. You find that you can access all of the websites you want on the internet except for two. What might be causing the problem?

Answers

Answer:

There must be a  proxy server that is not allowing access to websites

Explanation:

A wireless network facility provided in colleges, institutions, or libraries is secured with a proxy server to filter websites so that users can use the network facility for a definite purpose. Thus, that proxy server is not allowing access to all of the websites to the user on the internet except for two.

We made a distinction between the forwarding function and the routing function performed in the network layer. What are the key differences between routing and forwarding

Answers

Answer: forwarding: move packets from router's input to appropriate router output

routing: determine route taken by packets from source to destination

Explanation:

The network layer refers to where connections take place in the internet communication process by sending packets of data between different networks.

The distinction between the forwarding function and the routing function performed in the network layer is that the forwarding function move packets from the input of the router to the appropriate router output while the routing function:m helps in knowing the routee taken by packets from the source to destination.

When you purchase a device, system software is already loaded on it. Which of the following system software settings can you customize?

Answers

Answer:

Screen resolution

Explanation:

The brightness of the words and pictures displayed on computer screen is referred to as screen resolution. Items seem crisper at larger resolutions, such as 1600 x 1200 pixels. They also seem smaller, allowing for more objects to be displayed on the screen. The greater the resolution supported by a display, the larger it is.

Write a program, which will take 20, inputs from the user and find how many
odd and even numbers are there.

Pseudocode & Python

Answers

Answer:

user_input = [int(input()) for i in range(20)]

even = []

odd = []

for i in user_input:

if i%2:

even.append(i)

else:

odd.append(i)

print("odd : ", len(odd), "even : ", len(even))

Explanation:

The above code is written in python :

Using a list comprehension we obtain a list of 20 values from the user and store in the variable user_input.

Two empty list are defined, even and odd which is created to store even and odd values.

A for loop is used to evaluate through the numbers in user_input. Even values leave no remainder when Divided by 2 and are appended to the even list while those those leave a raunder are automatically odd values. The elements each list are counted using the len function and are displayed using the print statement.

18. Which of the following provides the SLOWEST Internet access?
O Ti line
Network
Digital Subscriber line (DSL)
Dial-up

Answers

Answer:

Dial up

Explanation:

Dial-up is by far the slowest of all Internet connections available. Use of dial-up requires a separate phone line, since users must connect via the telephone to their Internet service provider.

Realiza un algoritmo que calcule la edad de una persona y si es mayor = a 18 que imprima mayor de edad de lo contrario que imprima menor de edad

Answers

Answer:

Explanation:

El siguiente codigo esta escrito en Java. Le pide al usario que marque la edad. Despues el programa analiza la edad y imprime a la pantalla si el usario es mayor de edad o menor de edad. El programa fue probado y el output se puede ver en la imagen abajo.

import java.util.Scanner;

class Brainly

{

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Cual es tu edad?");

       int age = in.nextInt();

       if (age > 18) {

           System.out.println("Mayor de Edad");

       } else {

           System.out.println("Menor de Edad");

       }

   }

}

explain the following terms

copyleft:

creative Commons:

GNU/GPL:​

Answers

Answer:

Explanation:

copyleft:

Copyleft is the practice of granting the right to freely distribute and modify intellectual property with the requirement that the same rights be preserved in derivative works created from that property.

creative Commons:Creative Commons (CC) is an internationally active non-profit organisation that provides free licences for creators to use when making their work available to the public. These licences help the creator to give permission for others to use the work in advance under certain conditions. Every time a work is created, such as when a journal article is written or a photograph taken, that work is automatically protected by copyright. Copyright protection prevents others from using the work in certain ways, such as copying the work or putting the work online. CC licences allow the creator of the work to select how they want others to use the work. When a creator releases their work under a CC licence, members of the public know what they can and can’t do with the work. This means that they only need to seek the creator’s permission when they want to use the work in a way not permitted by the licence. The great thing is that all CC licences allow works to be used for educational purposes. As a result, teachers and students can freely copy, share and sometimes modify and remix a CC work without having to seek the permission of the creator3. GNU/GPL:​

GPL is the acronym for GNU's General Public License, and it's one of the most popular open source licenses. Richard Stallman created the GPL to protect the GNU software from being made proprietary. It is a specific implementation of his “copyleft” concept.

Software under the GPL may be run for all purposes, including commercial purposes and even as a tool for creating proprietary software, such as when using GPL-licensed compilers. Users or companies who distribute GPL-licensed works (e.g. software), may charge a fee for copies or give them free of charge.

fill in the blank figuring out what type of garden you want to grow is the ____step according to the instructions in how to grow a school garden

Answers

Answer:

First.

Explanation:

How to grow a school garden is an illustrative guide that explains to students the step by step process for growing a school garden.

According to the instructions in how to grow a school garden, the first and most important step is figuring out what type of garden you want to grow. At this step, a student should have a good understanding of the type of garden he or she wants to grow.

Thus, this step answers the question of "what am I growing in the garden?"

To increase security on your company's internal network, the administrator has disabled as many ports as possible. However, now you can browse the internet, but you are unable to perform secure credit card transactions. Which port needs to be enabled to allow secure transactions?

Answers

Answer:

443

Explanation:

Cyber security can be defined as preventive practice of protecting computers, software programs, electronic devices, networks, servers and data from potential theft, attack, damage, or unauthorized access by using a body of technology, frameworks, processes and network engineers.

In order to be able to perform secure credit card transactions on your system, you should enable HTTPS operating on port 443.

HTTPS is acronym for Hypertext Transfer Protocol Secure while SSL is acronym for Secure Sockets Layer (SSL). It is a standard protocol designed to enable users securely transport web pages over a transmission control protocol and internet protocol (TCP/IP) network.

Hence, the port that needs to be enabled to allow secure transactions is port 443.

On a scale of 1-10 how would you rate your pain

Answers

Explanation:

There are many different kinds of pain scales, but a common one is a numerical scale from 0 to 10. Here, 0 means you have no pain; one to three means mild pain; four to seven is considered moderate pain; eight and above is severe pain.

you press the F9 key to convert an object to a symbol true or false​

Answers

Answer:

False,

Reason

F8 key is used for the coversion of object to symbol

In Python, to assign a value to a variable, an equal sign must follow the variable name.

True

False

Answers

ITSSSSSSSSSSSSSSSSSSS true

To add a picture file to a PowerPoint slide, a user should first go to the

Answers

Answer:

insert

Explanation:

go to power point presentation insert tab

You have a Windows 2016 Server with DFS. During normal operation, you recently experience an Event 4208. What should you do first to address this issue

Answers

Answer: Increase your staging folder quota by 20%

Explanation:

The Distributed File System (DFS) allows the grouping of shares on multiple servers. Also, it allows the linking of shares into a single hierarchical namespace.

Since there's a Windows 2016 Server with DFS and during normal operation, an Event 4208 was experienced, the best thing to do in order to address the issue is to increase the staging folder quota by 20%.

The logical structure in which one instruction occurs after another with no branching is a ____________.

Answers

Answer:

sequence

Explanation:

The logical structure in which one instruction occurs after another with no branching is a sequence.

When the ping command is used, output is similar across operating systems. Which two values are displayed as part of the output

Answers

Answer: round-trip time

message byte size.

Explanation:

Ping refers to the primary IP command that is used in the troubleshooting of connectivity, and reachability. The ping command is also used in testing the computer's IP address.

When the ping command is used, output is similar across operating systems and the two values that are displayed as part of the output include the round-trip time and the message byte size.

You should avoid having other people in portraits with children. True False

Answers

Answer:

You should avoid having other people in portraits with children.

✓ False

Explanation:

Other Questions
The majority of the Mayan population on the peninsula were a. upper class. b. artisans. c. farmers. d. military fighters. e. all of these options. The values of existing data can be modified using the SQL ________ command, which can be used to change several column values at once. Cut down on deal with hold on take up count on put up with turn down come down with bring out check up on 1. This singer will _____take up____________ a new album this year. 2. Peter is very reliable. You can ________count on_________ him. 3. You should _________checkup on___ your essay ________put up with_________ 500 words. 4. Jim is depressed as he has been ______turn down_______ by five companies so far. 5. I can't ________put up with_________ such disturbing noise any more. 6. My mother is always _________________ me. 7. Mr. Smith has _________________ golf. 8. Are you tired of _________________ complaints from your customers? 9. How are you now? I heard that you _________________ flu last week. 10. _________________! I think we've got lost.This isn't the right road. Receptor eltrico 5 pontos Dispositivo que converte energia eltrica em outra forma de energia, no exclusivamente trmica. Exemplos: motores eltricos, ventiladores, liquidificadores, geladeiras, aparelhos de sons, vdeos, celulares, computadores? For waves moving through the atmosphere at a constant velocity, higher frequency waves must have proportionally longer wavelengths.a) trueb) false An outward shift of the production possibilities curve brought about by increasing resources or technological advances is known asgrowth.sustainablea) sustainable b) industrial c) economic Write functions for each of the following transformations using function notation. Choose a different letter to represent each function. For example, you can use R to represent rotations. Assume that a positive rotation occurs in the counterclockwise direction. translation of a units to the right and b units up reflection across the y-axis reflection across the x-axis rotation of 90 degrees counterclockwise about the origin, point o rotation of 180 degrees counterclockwise about the origin, point o rotation of 270 degrees counterclockwise about the origin, point o When moving up along an existing supply curve, all variables other than price areO increasingdecreasingO held constantO fluctuating A monopolistically competitive firm is producing at an output level in the short run where average total cost is $4.75, price is $4.75, marginal revenue is $3.00, and marginal cost is $3.50. This firm is operating Correct the four errors below which involve colons and semi-colons.Four Wheels Bad - Two Wheels GoodAs the nights draw in and the rain lashes down, it's all too easy to keep yourself indoors wrapped up against the ills andchills. Or, if you have to venture out, doing so only if cocooned in your car with the heating on full blast...Dr Terrence Latimer, Chief Medical Officer for the famous Team Turbulence, says;"The key is not to separate riding a bike from your other daily activities, but on the contrary to integrate it. Riding to workis the best activity, as that gets you in the saddle every day however, not everyone lives close enough to the office to dothat. You don't have to pedal the whole distance, though, as some trains do allow bikes on board. Where to put your bikeat work can also be a concern, but if space is an issue then technology has the answer folding bikes. At the end of the financial year, A & Z Travel has earned $90,000 in total sales for tours. It offered 5% a discount of total sales. All the expenses reported as: cost of goods sold of $50,000; salary & other expenses of $20,000. The company had to pay for its debts at 10% of interest rate. Tax is 20%7. What is A & Z Travels net sales?A. $90,000B. $85,000C. $85,500D. $80,0008. What is A & Z Travels EBIT?A. $10,500B. $20,000C. $40,000D. $35,5009. What is A & Z Travels net income?A. $7,560B. $9,450C. $10,500D. $20,000 A cylindrical container closed of both end has a radius of 7cm and height of 6cm A.)find the total surface area of the container B.) find the volume of the container The management of Neptune Inc. creates a definite plan of action that will surely create profits for the company. It allocates and sectionalizes its machinery and personnel. The main office is moved to a prime location that helps attract customers and facilitates competitive development. This plan of action helps Neptune Inc. retain its competitive advantage and has also grow as a company.Which of the following terms does this scenario best illustrate?a. Strategic toolsb. Functional strategyc. Business unit strategyd. Strategic management process please help if you can and if you know how to help me understand these Im all ears. Neeeeed helpppppppppp After doing a validation study I repeat it a second time. This time I use a different set of subjects. This is called Which interpretation is a possible theme of ovids The Story of Daedalus and Icarsus Complete the sentence- Friction always acts 1 along the direction of the motion. 2 opposite to the motion. 3 both of these. 4 none of these. $975, and there is 7 percent sales tax on the purchase.How much is the sales tax? (fg) (x) = f(x) g(x)truefalse**