# program-01-steps
Using steps.py in this repository for a starter file, write a Python program to calculate average number of steps per month for a year.
The input file (which you will read from the command line, see the sample program on how to read command line arguments in this repository) contains the number of steps (integer) a person took each day for 1 year, starting January 1. Each line of input contains a single number.
Assume this is NOT a leap year.
Your output must follow this format:
```
The average steps taken in MONTH NAME was 9999.9
```
Where 9999.9 represents that month's average. Be sure to output only a single decimal digit (digit to the right of the decimal)
Be sure to spell out the name of the month. First letter must be caps. For example: June
For a grade of A your program should handle a leap year by looking at the number of steps in the file, if 365 then non leap year, if 366 then leap year.
***commandlines.py***
# Python program to demonstrate
# command line arguments
# notice that the first command line argument that is passed to a program comes after the name of the program file
# it has an array index of 1 in the sys.argv array
# sys.arg[0] is always the name of the python program file
# all command line arguments are strings, so if you want to perform math you have to convert

import sys
# total arguments
n = len(sys.argv)
print("Total arguments passed: %i" % n)
# Arguments passed
print("\nName of Python script: %s" % sys.argv[0])
print("\nArguments passed:")
for i in range(1, n):
print("%s" % sys.argv[i])
# Addition of numbers
Sum = 0
for i in range(1, n):
Sum += int(sys.argv[i])
print("\n\nResult: %i" % Sum)
***steps.py***
# Named constants - create one for each month to store number of days in that month; assume this is NOT a leap year
def main():
# Open the steps file using the first command line argument to get the input file name. For example: python steps.py steps.txt would open the file steps.txt to read the steps
# Display the average steps for each month using a function to calculate and display
# Close the file.
def average_steps(steps_file, month_name, days):
# compute the average number of steps for the given month
# output the results
main()

Answers

Answer 1

Answer: https://www.chegg.com/homework-help/questions-and-answers/using-stepspy-repository-starter-file-write-python-program-calculate-average-number-steps--q58620888

Explanation: your awnser is in the link


Related Questions

a simple C program to find the logarithm of any number in any base.....​

Answers

Answer:

tera bur mast hai jwjvszvVbzNjz

what is multimedia software​

Answers

Answer: A program that plays or records audio files or playing or recording video files. Audio of famous speeches is a multimedia software

Explanation:

three types of query​

Answers

It is commonly accepted that there are three different types of search queries:

Navigational search queries.

Informational search queries.

Transactional search queries.

time 20,36,48
answer please!!

Answers

Answer:

Pls subscribe my channel on yt

Name- CREATIVITY WITH MS

pls help me reach 500 subscribers

your subscription really matters

After subscribing pls make sure to comment also

I will give you 10 thanks and also if you have a channel I can subscribe it also

True or False
User Interface brings together concepts from interface design, visual design, and information architecture.

Answers

Answer:

true

Explanation:

qqqqqqqqqqqqqqqqqqqq

What is the difference between packaged and tailored software ​

Answers

Answer:

Packaged software is a collection of programs that perform similar functions or have similar features to meet various goals and objectives. e.g Microsoft Office While tailored software is software specially developed for some specific organisation or other user. e.g Amazon, Netflix.

From her stack of photographs, Alice has to pick images that a photographer shot using the sports mode. Which images would she pick?

Answers

Answer:

1. horses

2. train/ metro

3. child

write a function to swap two variables using a third variable ​

Answers

Answer:

Explanation:

Assign var1 value to a temp variable: temp = var1.

Assign var2 value to var1: var1 = var2.

Assign temp value to var2: var2 = temp.

5. Power Trio
by CodeChum Admin

Multiplying two numbers is a piece of cake, but how about multiplying three of them, either being a negative of positive number? With programming and proper code, these tasks are easy to handle.

You're a programmer, right? Then code this one for me!

Input
A line containing three numbers (positive or negative, may have decimal places) separated by a space.
1.6·-2·-1

Output
A line containing a decimal/float with one decimal place.
3.2

Answers

Answer:

from decimal import *

li = list(map(Decimal,input().split()))

result = li[0]*li[1]*li[2]

print(abs(result))

Explanation:

The proper or programming code to handle that multiplies three numbers is as follows:

from decimal import *

value = list(map(Decimal,input().split()))

result = value[0]*value[1]*value[2]

print(abs(result))

Code explanation:

The code is written in python.

From the decimal module we have to import *. The decimal module incorporates a notion of significant places so that 1.3*1.2 = 1.56The variable value is used to store the list of the decimal inputThe variable result multiplies the three numbers in the list Finally we print the absolute value of the result.

learn more on python here: https://brainly.com/question/19175881

Which of these statements are true about Domain Controllers (DCs)? Check all that apply.

Changes that are safe to be made by multiple Domain Controllers at once are tasked by granting them Flexible Single-Master Operations.

The default Organizational Unit (OU) called Domain Controllers contains all Domain Controllers in the domain.

Delegation can be used in Active Directory.

You should always use your Domain Admin or Enterprise Admin for day-to-day use.

Answers

A domain controller is known to be a type of computer server that often responds to security authentication requests and verifies users. The true statements about Domain Controllers (DCs) are:

The default Organizational Unit (OU) called Domain Controllers contains all Domain Controllers in the domain. Delegation can be used in Active Directory.

Default user groups often do exist. The Domain Controllers user group has all Domain Controllers in the domain.

Delegation can be used in Active Directory  as they help to give accounts permission in the file system so that an individual can set Access.

Learn more from

https://brainly.com/question/24931494

How can I fix this?

I’m on school Wi-Fi and “your connection isn’t private” keeps popping up every time I try to look up something, can someone please help!

Answers

Answer:

Try these

Reload page.

Clear Browsing Data.

Restart Router.

Avoid Incognito Mode.

Check Computer Date and Time.

Disable VPN.

Explanation:

Write the pseudocode to this flowchart.

Answers

Answer:

I don't understand

Explanation:

1. What is meant by data losing its value?

2. Explain what is meant by an automatic backup

3. Explain how phishing and pharming trick a user into giving up personal data

4. Explain how anti-virus software may help to prevent distributed denial of service attacks

5. Explain why computer security is more effective when anti-virus software end firewalls are used

6. Describe how a proxy server can help keep data safe

7. Explain the difference between symmetric and asymmetric encryption

8. Describe what a protocol is and how protocols help protect data

Answers

Explanation:

1.Data loss occurs when valuable or sensitive information on a computer is compromised due to theft, human error, viruses, malware, or power failure. It may also occur due to physical damage or mechanical failure or equipment of an edifice.

2.Automatic backup is a type of data backup model that requires little or no human intervention in backing up and storing data from a local network/system to a backup facility. Automating the backup process saves time and complexity required to manually back up a computer, network or IT environment.

3.A phishing attack is basically social engineering and identity theft that generally targets users with the aim to con them into revealing their personal and confidential information. In this technique, hackers send spoofed emails in the name of a legitimate source to victims and trick them into clicking on a malicious link or attachment to acquire their personal information. 

In many instances, these phishing scams use software or security vulnerabilities to install malicious software in the targeted user’s device. In any case, the human factor remains the key element in the successful phishing attempts of these cyber crooks. 

4.Equip your network, applications, and infrastructure with multi-level protection strategies. This may include prevention management systems that combine firewalls, VPN, anti-spam, content filtering and other security layers to monitor activities and identity traffic inconsistencies that may be symptoms of DDoS attacks.

5.While antivirus software helps to protect the file system against unwanted programs, a firewall helps to keep attackers or external threats from getting access to your system in the first place. Other threats travel from computer to computer without the knowledge of the user.

6.Proxy servers act as a firewall and web filter, provide shared network connections, and cache data to speed up common requests. A good proxy server keeps users and the internal network protected from the bad stuff that lives out in the wild internet.

7. The basic difference between these two types of encryption is that symmetric encryption uses one key for both encryption and decryption, and the asymmetric encryption uses public key for encryption and a private key for decryption.

8. A network protocol is an established set of rules that determine how data is transmitted between different devices in the same network. Essentially, it allows connected devices to communicate with each other, regardless of any differences in their internal processes, structure or design.

MARK ME BRAINLIEST!!!PLSSSSS

is a formal document containing detailed information about the destruction of your
A
data.

Answers

Where is the formula

A computer uses
to follow a set of instructions

Answers

Answer:

A set of instructions that directs a computer's hardware to perform a task is called a program, or software program.

Answer:

which is called a program

Explanation:

state two advantage of using the internet

Answers

Answer:

Seemless communication with other parts of the world

Being able to share files easily

Explanation:

Answer:

communicate with family.

Able to get information from the internet.

What is mean by SEO?

Answers

Answer:

SEO = Search Engine Optimization

Answer:

Search Engine Optimization

Explanation:

Is the process used to optimize a website's technical configuration, content relevance and link popularity so its pages can become easily findable, more relevant and popular towards user search queries, and as a consequence, search engines rank them better.

What allows an individual to avoid capital outlay?
paying cloud by the month
paying cloud by the year
paying cloud by the hour
paying cloud by the day

Answers

The daily payment for cloud services would be most reasonable. Hence option A is correct.

Capital Outlay refers to the expenditure or payment for the acquisition cost of capital assets.

In this case, the assets whose cost of purchase is being avoided by expenditure on cloud services is IT Server Hardware and Software which can be outsourced to companies that provide Cloud as a Service.

Cloud Services is the provision of Cloud computing services on a pay-per-use basis.

One of the advantages of this service is that it mostly consists of self-service on-demand. Hence, no need for the physical asset which usually is very costly.

Learn more about Capital Outlay in the link below:

https://brainly.com/question/832717

Which of these lines of code will generate a random number between 1 and 50? A. input("1-50") B. print("1-50") C. import random D. num = random.randint(1,50)

Answers

Answer:

D. num = random.randint(1,50)

Explanation:

The option given above will assign a random integer in the range of 1 through 50 to the variable number is: "number = random.randint(1, 50)"

What is a random integer in programming?

This is a random sequence of integers that may be used to imitate things like shuffling a deck of cards or creating distinct behaviors every time a program runs. The RND function in BASIC generates random numbers. This yields a value between 0 and 1.

Random number creation is a technique that generates a series of numbers or symbols that cannot be realistically anticipated better than by random chance, generally using a random number generator (RNG).

Therefore, The option given above will assign a random integer in the range of 1 through 50 to the variable number is: "number = random.randint(1, 50)"

Learn more about random integers:

brainly.com/question/15247918

#SPJ3

The ________ join clause is based on all the columns in the two tables that have the same datatype. ​

Answers

The Natural join clause


[If you were the queen of the world .... What would you change ?]


Can anyone help me i want 5 slides powerpoint

Answers

Answer:

poverty and bad roads and help the needy

que cambios le harias a Chrome

Answers

Nada, porque em Chrome tiene todo los respuestas y Soluciones que necesitas.

Which two wireless technologies are used in IoT?

Answers

Answer:

If you like my answer you can put me in brainlist.

Explanation:

LPWANs. Low Power Wide Area Networks (LPWANs) are the recent development specifically designed for the requirements for IoT. ...

Cellular (4G and 5G) ...

Zigbee and Other Mesh Protocols. ...

Bluetooth and BLE. ...

Wi-Fi. ...

RFID.

Hope this is helpful to you.....

Wifi and Bluetooth .

What are the revised version of water mill and horse cart

Answers

Answer:

A watermill or water mill is a mill that uses hydropower. It is a structure that uses a water wheel or water turbine

Explanation:

Which wireless standard runs on both the 2.4 and 5 GHz frequencies?

Answers

Answer:

Approved in 2009, Wi-Fi 4 enables operation in both the 2.4 and 5 GHz frequencies, a game changer at the time. It was the first standard to use MIMO (Multiple In, Multiple Out) and offered better speed, 300 Mbps, better range, more resistance to interference and backward compatibility with Wi-Fi 2 and

Hope this is helpful to you.......

Could someone write the code for this in java? I cannot use java.util random(but i can use scanner). also, i cannot use switch or case.


Program Rock.java contains a skeleton for the game Rock, Paper, Scissors. Add statements to the program as indicated by the comments so that the program asks the user to enter a play, generates a random play for the computer, compares them and announces the winner (and why). For example, one run of your program might look like this:


Enter your play: R, P, or S


r


Computer play is S


Rock crushes scissors, you win!


Note that the user should be able to enter either upper or lower case r, p, and s. Add a loop to make sure the user only enters an R, P, or S. The user's play is stored as a string to make it easy to convert whatever is entered to upper case. Use if statements to convert the randomly generated integer for the computer's play to a string.


public class Rock


{


public static void main(String[] args)


{


String personPlay; //User's play -- "R", "P", or "S"


String computerPlay; //Computer's play -- "R", "P", or "S"


int computerInt; //Randomly generated number used to determine


//computer's play


// Add the code for each action beneath the comment. // more than one line may be needed in some cases // Get player's play -- note that this is stored as a string


// Make player's play uppercase for ease of comparison


// Generate computer's play (0,1,2) – use (int) (Math.random() * 3) to


// generate a random play


// Translate computer's randomly generated play to string // using mutually exclusive conditional statements


// Print computer's play


// See who won. Use nested ifs instead of &&.


}


}


People hardly ever play Rock, Paper, Scissors one game at a time. They play matches that are best 2 out of 3, best 3 out of 5, etc. Change your program to prompt the user for the odd number of games they want to play and use a loop to make sure it is an odd number. Then, add a loop to your program to play the game multiple times. Keep track of who wins, and make sure the loop stops when either the computer or the user has accumulated enough wins. Ties do not count in either the game total or the win totals – so a best 2 out of 3 match requires 3 games to be played where someone wins 2 times.

Answers

Program Rock.java contains a skeleton for the game Rock, Paper, Scissors. Open it and save it to your directory.

Add statements to the program as indicated by the comments so that the program asks the user to enter a play,

generates a random play for the computer, compares them and announces the winner (and why). For example, one run

of your program might look like this:

$ java Rock

Enter your play: R, P, or S

r

Computer play is S

Rock crushes scissors, you win!

Note that the user should be able to enter either upper or lower case r, p, and s. The user's play is stored as a

string to make it easy to convert whatever is entered to upper case. Use a switch statement to convert the randomly

generated integer for the computer's play to a string.*/

// ****************************************************************

// Rock.java

//

// Play Rock, Paper, Scissors with the user

//

// ****************************************************************

import java.util.Scanner;

import java.util.Random;

public class Rock

{

public static void main(String[] args)

{

String personPlay; //User's play -- "R", "P", or "S"

String computerPlay; //Computer's play -- "R", "P", or "S"

int computerInt; //Randomly generated number used to determine

//computer's play

Scanner scan = new Scanner(System.in);

Random generator = new Random();

System.out.println ("Enter R for Rock, P for Paper, S for Scissors: "); //Get player's play -- note that this is stored as a string

personPlay = scan.next();

personPlay = personPlay.toUpperCase();

computerInt = generator.nextInt(3);

switch (computerInt)

{

case 0:

{

computerPlay = "R";

break;

}

case 1:

{

computerPlay = "P";

break;

}

case 2:

{

computerPlay = "S";

break;

}

default:

{

computerPlay = "will not happen";

}

}

System.out.println ("Computer plays: " + computerPlay);

if (personPlay.equals(computerPlay))

{

System.out.println("It's a tie!");

}

else if (personPlay.equals("R"))

{

if (computerPlay.equals("S"))

System.out.println("Rock crushes scissors. You win!!");

else if (computerPlay.equals("P"))

System.out.println ("Paper eats rock. You lose!!");

}

else if (personPlay.equals("P"))

{

if (computerPlay.equals("S"))

System.out.println ("Scissor cuts paper. You lose!!");

else if (computerPlay.equals("R"))

System.out.println ("Paper eats rock. You win!!");

}

else if (personPlay.equals("S"))

{

if (computerPlay.equals("P"))

System.out.println ("Scissor cuts paper. You win!!");

else if (computerPlay.equals("R"))

System.out.println ("Rock breaks scissors. You lose!!");

}

else

{

System.out.println ("Invalid user input.");

}

}

}

// Enter R for Rock, P for Paper, S for Scissors:

// P

// Computer plays: P

// It's a tie!

a digital camera is an_____​

Answers

Answer:

A digital camera is a hardware device that takes photographs and stores the image as data on a memory card. Unlike an analog camera, which exposes film chemicals to light, a digital camera uses digital optical components to register the intensity and color of light, and converts it into pixel data.

Explanation:

its a hardware device.

What are different method of selecting items??​

Answers

Answer:

Hold down the "Ctrl" key and the "Shift" key. Press the right arrow key to select the word to the right, or press the left arrow key to select the word to the left. Select one character at a time by holding down the "Shift" key and and using either arrow key (right or left).

Explanation:

follow= return follow

Give an example (other than clothes) where the must-have feature could be APPEARANCE.​

Answers

Answer:

Assuming you are talking about UI or something graphical on a computer screen we'll just say the must-have features (in terms of appearance) are:

The UI/Web/Graphical Designers basic knowledge of color theory so they don't end up putting #0000FF text on a #FF0000 backgroundA good font (if there is text) that looks nice with the colors usedA proper aesthetic to the software (I.E. Spotify's green on black modern/techno aesthetic)

The design of mobile phones is an example of a must-have feature that is in appearance.

What are the features of appearance?

Features of appearance mean the visual qualities of an object or product.

Such as:

- Color

- Shape

- Texture

- Finish

- Branding

We have,

One example where the must-have feature could be appearance is in the mobile phones design

Many consumers prefer mobile phones that not only have the latest technology and features but also look sleek and stylish.

Companies invest heavily in the design of their mobile phones to make them visually appealing to consumers.

The appearance of the phone can often be a deciding factor in the purchasing decision, even if the phone has similar features to a competitor.

Thus,

The design of mobile phones is an example of a must-have feature that is in appearance.

Learn more about appearance here:

https://brainly.com/question/15851729

#SPJ2

a) Viết chương trình tính tổng từ 20 – 50

b) Viết chương trình tính tổng từ a – b, với a, b nhập từ bàn phím. Yêu cầu: a
không phải thông báo lỗi.

cứu tôi 2 câu này sài lệnh lặp

Answers

Answer:

Program viet_chuong_trinh_tinh_tong;

Uses Crt;

Var i,s:integer;

Begin

Clrscr;

i:=20;

While (i>=20) and (i<=50) do

Begin

s:=s+i;

i:=i+2;

End;

Writeln(S);

Readln;

End.

Explanation:

Other Questions
Give two situational examples based on the standards of conduct of a soldier that will apply to you in the future Outline the fate of food after absorption. NHNG VT INHMt cu b n c tnh xu l rt hay ni nng. Mt hm, cha cu b a cho cu mt ti inh ri ni vi cu: Mi khi con ni nng vi ai th hy chy ra sau nh v ng mt ci inh ln chic hng ro g.Ngy u tin, cu b ng tt c 37 ci inh ln hng ro. Nhng sau vi tun, cu b tp kim ch cn gin ca mnh v s lng inh cu ng ln hng ro ngy mt t i. Cu nhn thy rng kim ch cn gin ca mnh cn d hn l phi i ng mt cy inh ln hng ro.n mt ngy, cu khng ni gin mt ln no sut c ngy. Cu n tha vi cha v ng bo: Tt lm, by gi nu sau mi ngy m con khng h ni gin vi ai d ch mt ln, con hy nh mt cy inh ra khi hng ro. Ngy li ngy tri qua, ri cng n mt hm cu b vui mng hnh din tm cha mnh bo rng khng cn mt ci inh no trn hng ro na. Cha cu lin n bn hng ro. , ng nh nh ni vi cu: Con lm rt tt, nhng con hy nhn nhng l inh cn li trn hng ro. Hng ro khng ging nh xa na ri.(Trch Qu tng cuc sng)Cu 1. Xc nh phong cch ngn ng ca vn bn.Cu 2. S kim ch tnh xu (hay ni nng) cu b c th hin r nht qua nhng t ng no ?Cu 3. V sao ngi cha li ni vi con mnh rng Mi khi con ni nng vi ai th hy chy ra sau nh v ng mt ci inh ln chic hng ro g. ?Cu 4. Bi hc su sc anh/ch nhn c t vn bn. what is f(x) =|x 4| + 1 graphed.? solve the variables BRAINLY, STOP DELETING MY QUESTIONS-THEY ACTULLY ARE SCHOOL RELATED!!!! In what ways is the song "Alexander Hamilton" correct, and in what ways is it incorrect?? (ps Brainly, this IS history- and arts-related!!!) PLEASE HELP I WILL GIVE BRAINLEIST!!! Find the value of T Please help me I will give best answer brainliest What is the value of X? Identify all words as agudas or graves. Please help!! Due today!!!! Los motivos que tuvo craig para crear su fundacin y una opinin sobre su trabajo ? solve for x, 3x + 8 < 15 A two digit number is four times the sum and three times the product of its digit. Find the number. corporations are granted the power to issue bonds through What place is meaningful to you and tell why? what are some ideas for limericks on the scopes trial help me please !!!! You water three sunflower plants with salt water. Each plant receives a different concentration of salt solutions. A fourth plant receives pure water. After a two-week period, the height is measured.WRITE IV, DV, CV in the following questions14. Height This is a required question15. different concentrations of salt solutions * Hot metal (85 C) is placed in water (20 C). When the system reaches thermalequilibrium, the temperature is 22.25 C. Why is the temperature at thermal equilibriumso close to that of water's initial temperature?