Write a program that opens an output file with the filename my_name.txt, writes your name to the file, then closes the file. python

Answers

Answer 1

f = open("my_name.txt", "w")

f.write("Your name here")

f.close()

You just have to change Your name here to your actual name. I wrote my code in python 3.8. I hope this helps.


Related Questions

What do you do to think positive and maintain discipline to play
with your friends ? write in four points.
)
no
S s.)​

Answers

Answer:

to make peaceful mind.to develop our character..

Sound technology has been influenced the most by the ___.
microphone
phonograph
record player
cassette recorder

Answers

I think its the phonograph i hope this helps!
The phonograph because it helped with hearing and seeing things

Sara would like to begin creating macros in Excel 2016. Where can she find the ability to launch the Macro dialog box?

Insert tab in the Macros group
Formulas tab in the Macros group
Developer tab in the Code group
Developer tab in the Add-ins group

Answers

Answer:

C) Developer tab in the Code group

Explanation:

The Bike and EBike classes are implemented as shown by the code below.public class Bike
{
private String make;
private int numGears;
private double tirePressure;
public Bike(String m, int g, double t)
{
make = m;
numGears = g;
tirePressure = t;
}
public void pumpTire()
{
tirePressure += 5.0;
}
}
public class EBike extends Bike
{
private int batteryLevel;
public EBike(String m, int g, double t, int b)
{
super(m, g, t);
batteryLevel = b;
}
public void chargeBattery()
{
batteryLevel++;
}
}
Suppose that the following declarations are made in a separate class.
Bike bike1 = new Bike("Clasic Cycle", 16, 65.0);
Bike bike2 = new EBike("Big EZ", 8, 72.0, 96);
EBike bike3 = new Bike("E-xtreme", 12, 80.0, 44);
Assuming the above three lines compile without error, which of the following statements will cause an error when compiled?
bike3.pumpTire();
bike2.pumpTire();
bike2.chargeBattery();
bike1.pumpTire();
bike3.chargeBattery();

Answers

Answer:

bike3.chargeBattery();

Explanation:

The Bite class is the super or parent class of the Java program while the Ebike class is the subclass or child class inheriting from the super-class. The Bike class defined methods can be used by the object instance of the Ebike class, but the method in the Ebike class cannot be used by the parent class "Bike".

Adding effects that move your text or pictures in your presentation is called:

Answers

the answer should be it’s a transitionl

what is command is used to improve the vocabulary and in which tab is it found​

Answers

Answer:

Writers Talk About Writing

Ctrl+Shift+Return: Keys to Your Computer

By Mike PopeOctober 15, 2012

Your computer's keyboard has around 110 keys by which you can make your wishes known to the machine. Most of these have obvious labels: if you press the A key, the letter A appears on the screen. Some are less obvious, though — the Shift key and the mysterious Ctrl key — and in this article I'll explore why they're named what they're named.

Long before computers, many practical issues about using a machine to write had already been worked out for the typewriter. If you've never used a typewriter, you might be interested in this video that shows one in action.

Python - write a program that lets the user enter a string and displays the character that appears most frequently in the string.

This is my attempt so far, I know it needs a lot of changes:

# This program has the user enter a string and displays the
# character that appears most frequently in the string.

def main():
# Create a variable to use to hold the count.
# Start the variable with 0.
count = 0

# Have the user enter a string.
my_string = input('Enter a sentence: ')

# Count the character that appears most frequently in the string.
for ch in my_string:
if ch == 'A' or ch == 'a':
count+=1
if ch == 'B' or ch == 'b':
count+=1
if ch == 'C' or ch == 'c':
count+=1
if ch == 'D' or ch == 'd':
count+=1
if ch == 'E' or ch == 'e':
count+=1
if ch == 'F' or ch == 'f':
count+=1
if ch == 'G' or ch == 'g':
count+=1
if ch == 'H' or ch == 'h':
count+=1
if ch == 'I' or ch == 'i':
count+=1
if ch == 'J' or ch == 'j':
count+=1
if ch == 'K' or ch == 'k':
count+=1
if ch == 'L' or ch == 'l':
count+=1
if ch == 'M' or ch == 'm':
count+=1
if ch == 'N' or ch == 'n':
count+=1
if ch == 'O' or ch == 'o':
count+=1
if ch == 'P' or ch == 'p':
count+=1
if ch == 'Q' or ch == 'q':
count+=1
if ch == 'R' or ch == 'r':
count+=1
if ch == 'S' or ch == 's':
count+=1
if ch == 'T' or ch == 't':
count+=1
if ch == 'U' or ch == 'u':
count+=1
if ch == 'V' or ch == 'v':
count+=1
if ch == 'W' or ch == 'w':
count+=1
if ch == 'X' or ch == 'x':
count+=1
if ch == 'Y' or ch == 'y':
count+=1
if ch == 'Z' or ch == 'z':
count+=1
#Print the result.
print('The most popular character appears ', count, 'times.')

# Call the main function.
main()

Answers

def main():

   my_string = input("Enter a sentence: ").lower()

   character = ""

   count = 0

   for x in my_string:

       if x.isalpha():

           if my_string.count(x)>count:

               count = my_string.count(x)

               character = x

   print("The most popular character,",character,"appears",count,"time(s)")

main()

I wrote my code in python 3.8. I hope this helps

The program which will let the user enter a string and displays the character will be written in computer language.

What is programming?

The process of producing a set of instructions that tells a computer how to complete a task is known as programming. Computer programming languages such as JavaScript, Python, and C++ can be used to create programs. Programming is widely regarded as one of the most difficult disciplines to master.

def main():

my_string = input("Enter a sentence: ").lower()

character = ""

count = 0

for x in my_string:

if x.isalpha():

if my_string.count(x)>count:

count = my_string.count(x)

character = x

print("The most popular character,", character,"appears",count,"time(s)")

main()

Therefore, the coding for the given program is written above.

To learn more about programming, refer to the link:

https://brainly.com/question/11023419

#SPJ5

One of the keys on my keyboard doesn’t work but It’s used to login to windows. I’m trapped outside. What should i do :(

Answers

uhm- sorry, could explain this in a simpler way?

What is one purpose of alogorihm​

Answers

Answer:

The purpose of an algorithm is to give a set of rules by which one person can solve a problem.

Step-by-step Explanation:

It can be reasoned by using a step-by-step guide that will help you accomplish a task or solving a specific calculation if the steps are followed correctly.

Answer:

One purpose of algorithm is so that it can help you understand the process of making something.

Example: For example, a recipe is an algorithm. It is a process of steps that helps you understand how to make something.

Or an equation. Equations are also a process of steps that help you understand how to get a correct calculation.

Northern Trail Outfitters stores Last Name in a data extension. How should the text file be defined?

a. Varchar(100)
b. Char(100)
c. String(100)
d. Text(100)

Answers

Answer:

d. Text(100)

Explanation:

The data extensions can be defined as the table with the fields of the data about contacts. It can be related to some other data extensions or can be a standalone.

In the context, the Northern Trail Outfitters stores the Last Name in the data extension which is defined as a text file as Text(100).

Choosing a proper field length and a data type ensures an efficient storage as well as retrieval of the data in the data extensions.

pls helppp <3 In the following nested loop structure, which loop does the program EXIT first?
for (initialization 1; condition 1; loop variable 1 increment;)
for (initialization 2; condition 2; loop variable 2 increment;)
for (initialization 3; condition 3; loop variable 3 increment;)
for (initialization 4; condition 4; loop variable 4 increment;)
{ statement block;}


A.
for (initialization 1; condition 1; loop variable 1 increment;)
B.
for (initialization 2; condition 2; loop variable 2 increment;)
C.
for (initialization 3; condition 3; loop variable 3 increment;)
D.
for (initialization 4; condition 4; loop variable 4 increment;)

Answers

Answer:

D. The 4th one

Explanation:

The loops are nested, and the program ends when loop 1 is completed. Since loop 4 is the innermost one, that one is completed first.

Commercial technical data and commercial software:_________.
a- [ ] Are provided to the Government with additional rights.
b- [ ] Must be marked ?proprietary? to have protection.
c- [ ] Must be available to consumers to qualify as commercial.
d- [ ] Are offered for sale on the commercial market.

Answers

Answer:

Must be available to consumers to qualify as commercial.

Explanation:

According to Defense Federal Acquisition Regulation Supplement and Federal Acquisition Regulation Supplement technical data and software belongs to the authentic developer or the direct beneficient otherwise, if made available to consumers it will then be regarded as the "Commercial technical data and commercial software."

Hence, the right answer to the question is option C "Must be available to consumers to qualify as commercial."

A cyberbully is someone who invades another person’s privacy by posting mean-spirited messages. repeatedly sending text messages. visiting questionable websites. stealing original work.

Answers

Answer:

Its A.

Explanation:

Took the exam review

Answer:

A

Explanation:

on edge

Write down the different types of testing with their definition.

a. Acceptance/Beta testing________
b. Accessibility testing __________
c. Integration testing ___________
d. Usability testing _________
e. Stress Testing __________

Answers

Answer:

The answer is below

Explanation:

a. Acceptance/Beta testing: this is considered as the last test by the real users or a specific number of end-users of an application software before its final release.

b. Accessibility testing: this is a form of application software testing that is targeted to the disables, such as deaf, color blind, or any other disabled group of people

c. Integration testing: this is a form of testing that involves collective eating of different components of software or hardware that makes up a system.

d. Usability testing: this is a form of testing in which a computer product is tested based on users' experience. It seeks to assess the products from the users' experience.

e. Stress Testing: this is a form of testing that seeks to find the limitation of a product or software. By carrying out stress testing, the producer can quickly know the level at which the product can operate under heavy use.

SEMMA is a proprietary model? True or Flase

Answers

Answer:

true

Explanation:

SEMMA is a proprietary model is a true statement

Proprietal model in this context is a product or services that is exclusive to a company. SEMMA, is a property of SAS institute.

SEMMA simply means Sample, Explore, Modify, Model, and Assess. It is simply a list of sequential steps which was a product of SAS Institute. This institute is among the largest producers of statistics and business intelligence software. This product or property was made for passing or implementation of data mining applications.

Conclusively, we can say that SEMMA is a proprietary model is a true statement

Learn more from:

https://brainly.com/question/12719360?section=newest_q

The SQL WHERE clause:___________.a) Limits the row data that are returned. b) Limits the column data that are returned. c) ALL Limits the column and row data that are returned.d) All of the above

Answers

Answer:

D. All of the above.

Explanation:

• To limit the number of rows use the WHERE clause.

• The WHERE clause filters for rows that meet certain criteria.

• WHERE is followed by a condition that returns either true or false.

• WHERE is used with SELECT, UPDATE, and DELETE.

Cryptography is the process of transforming data from cleartext into ciphertext.

a. True
b. False

Answers

Answer:

B) false

Explanation:

Encryption can be regarded as

the process involving encoding of information. It brings about convertion of of original information ( plaintext) to another alternative form (ciphertext). While While cryptography can be regarded as the science that deals with encrypting as well as decrypting of information. plaintext is unencrypted data while ciphertext is encrypted data. It should be noted that encryption is the process of transforming data from cleartext into ciphertext.

A company has four departments: A, B, C, and D. The number of IP addresses required by each department is 100, 60, 20, and 26 respectively. The company's application network is 172.168.1.0/24. Please list the address range and subnet mask that can be assigned by each department.

Answers

Answer:

deeppppuhjjuuiiijjjjk

HUURRY
The line after an if statement should begin with what?
#
a print statement
a colon
indentation

Answers

Answer:

colon

Explanation:

The line after an if statement should begin with a colon. Next time please be more specific towards which language you need help with as you didnt specify and all languages are different.

Answer:

Yes it should start with a colon after

have a good day hopefully it helped :)

Explanation:

how we can search someone's name here?​

Answers

you can search someone’s name on here...?

Answer:

Umm

Explanation:

I guess we can only search for answers here!

The I/O modules take care of data movement between main memory and a particular device interface.A. TrueB. False

Answers

Answer:

A: True

Explanation: hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii

The appropriate semaphore in C to give one more turn to writer so it can clean up IPC objects is WRITE_SEM. Is it true or false

Answers

Answer:

True

Explanation:

Semaphores are variables of abstract data types in programming used to control or restrict access to resources by multiple concurrent processes to avoid system failure like race conditions, by evaluating the available resources. There are various types of semaphores like the binary and counting semaphores which is used to lock and count resources respectively.

In C, the semaphore used to clean up the IPU objects is the WRITE_SEM.

How to start the ms excel​

Answers

Answer:

The answer is below

Explanation:

To start Microsoft Excel, a user can click on the start menu and look for the Microsoft Excel icon in the list of programs available.

If this is not found, a user can either search it from the start menu or click on the All program menu, from there the user can look for Microsoft Excel then click on it to launch the application.

If Microsoft Excel can't be found, a user is recommended to click on Microsoft Office, from there Microsoft Excel will be found, then the user can click on it to launch the application.

After clicking, the Excel Starter startup screen shows, and an empty page called the spreadsheet is shown.

Imagine that you are a sound designer for a new spy/mystery film. In a pivotal scene, the lead character discovers that a mentor has betrayed her. She confronts her mentor on the rooftop of a high-rise building at night. What would you, as the sound designer, do to maximize the impact of this emotional scene? Your answer should be at least 150 words.

Answers

Answer:

I would of made the sound deep, somewhat emotional, like with violin or piano in the background, while the dialog played. If the mentor were to push the lead character off the building, I would add some music that was intense, to add onto it, and when the character would start to fall, the music would get deeper and quieter, and make the music cut out as the character fell the rest of the way. If somebody saved the person, like somebody were to save them by grappling onto a building and snatching the person, the music would go up, and be a bit more up beat.

that would be what I would of put if I were to have that same question on something.

I hope that helped you!

In this first journal assignment, you will explore the role of testing in the SDLC. You will explain the role and importance of testing in the SDLC and describe any exceptions in which the testing stage would occur earlier or later than it typically does in the life cycle. Address the following questions:_______.A. What occurs during the testing stage of the SDLC?B. Why is the testing stage vital to a successful SDLC?C. Are there any exceptions in which the testing stage would occur earlier or later than it typically does in the SDLC? Explain.

Answers

it is SDLC your welcome good luck

write a program that creates a dictionry containing course numbers and the room numbers of the rooms whhere the courses meet

Answers

Answer:

course_class = {'CS101' : '3004', 'CS102' : '4501', 'CS103' : '6755',  'NT110' : '1244', 'CM241' : '1411'}

Explanation:

A dictionary is a data structure in python that is unordered and unindexed. It stores data in key-values pairs with each pair separated by a comma and all the items enclosed with curly braces. It is also assigned to a variable name.

The dict() function can also be used to create a dictionary variable.

Write a function solution that, given an array A consisting of N integers, returns the number of fragements of A whose sum equals 0 (that is, pairs (p,q) such that P

Answers

Answer:

#include <iostream>

using namespace std;

void fragment(int arr[], int n){

   for (int i = 0; i < n; i++){

       for (int x = 0; x < n; x++){

           if (x != i && arr[i] + arr[x] == 0){

               cout<< arr[i] << " , " << arr[x];

           }

       }

   }

}

int main(){

   int n = 7;

   int myArr = {1, 2, -1, -2, 0, 0, 3};

   fragment(myArr, n);

}

Explanation:

The C++ source code defines an array called "myArr" in the main program and its array size n. The void function "fragment" prints out the pairs of the array whose sum equates to zero.

1. Write a function called changeLetter that can directly alter the value of a character variable. It takes one argument: a reference to a character. It returns nothing. If the passed in character is alphabetic ('a' to 'z' or 'A' to 'Z'), then make the character become the next higher ASCII value ('a' becomes 'b' etc.). If the passed in character is not a letter, don't alter it.
2. Write a calling statement for the changeLetter function. It takes one argument: a reference to a character and returns nothing. The calling statement should pass the char variable ch so that it is (potentially) altered.
3. Write a calling statement for the changeLetter function. It takes one argument: a reference to a character and returns nothing. The calling statement should pass the 2nd character in a char array called chAr (by second, I mean the sub-oneth) so that it is (potentially) altered.
4. Assume the following function header:

void fn( int &n )

Write an instruction for the function body that will store 10 into the caller's variable referred to by n.
5. Write a calling statement for the fn function. It takes one argument: a reference to an integer and returns nothing. The calling should pass the integer variable num to the function so that it can be altered.
6. The strlen() function returns
A. the number of chars in an array of char, including the null
B. the number of chars in an array of char not including the null
C. the declared number of chars an array can hold
7. What must be true of the arguments to strcat(s1, s2); More than one answer may be correct
A. s1 must be valid strings
B. s2 must be a valid string
C. s1 must have room to contain the result
D. s2 must have room to contain the result
8. How is a structure different from an array?
9. Write a definition for a structure called Part that can hold a part name (an array of characters that can hold 24 characters plus a null terminator), a part weight (int), and a part price (float). Make up appropriate names.
10. Assume the following structure definition:

struct Person

{

char name[50];

int age;

};

Write a declaration for a variable of type Person and initialize it with your name and the age 10. This should be done as part of the variable declaration statement.

11. Assume the following structure definition:

struct Person

{

char name[50];

int age;

};

Write a declaration for a variable of type Person and initialize it with your name and the age 10. This should be done as several executable statements.

12. Declare an array of 10 Person structures named peopleArray.

13. Assume the following structure definition and declaration:

struct Person

{

char name[50];

int age;

};

Person people[265];

Assuming that the people array contains 265 valid structs, write code to print out the age member for each item in the structure.

Answers

Answer:

1. Void changeLetter( char &ref )

{

If( isalpha(ref) )

{

Ref++;

}

}

2. changeLetter( ch );

3. changeLetter( chAr[1] );

4. n = 10;

5. fn( num );

6. (B) the number of chars in an array of char not including the null.

Explanation:

Functions are blocks of codes in any programming language. In C++, a void function is a function that does not return a value, while other types of functions have a return statement. There are three ways to pass an argument to a function in C++, by value, by reference and by pointer.

When a variable argument is passed as a value to a function, the value of that variable cannot be altered by the function, but when it is passed as a reference or a pointer, it can be altered.

To call a function in C++, specific the function name and the opening and closing parenthesis with the required arguments in between. The call must end with a semi-colon.

The method definition, or declaration, is defined as the method __________ followed by the method ________.

a. name, parameters
b. name, return
c. header, body
d. header, signature
e. signature, body

Answers

Answer:

The answer is option C "header, body"

Explanation:

Like a class, a method definition has two significant parts: the method revelation and the method body. The method declaration characterizes all the method's attributes, for example, access level, return type, name, and contentions. The method body is the place where all the activity happens. It contains the guidelines that actualize the method.

The lone required element of a method declaration are the method's name, return type, and a couple of brackets: ( and ). A method declaration can give more data about the method, including the return type of the method, the number and sort of the contentions needed by the method, and which different classes and objects can call the method.

In spite of the fact that a method name can be any legitimate identifier, code shows limit method names. By and large, method names should be action words  (verbs) and should be in upper case, with the principal letter in lowercase and the primary letter of each inside word in capitalized.

Tips for staying safe using social media. Using in your own words.

Answers

Whatever you post on social media, it's now public. Yes there are ways to make posts private and such, but glitches do happen. Not only that, but hackers may be able to turn privacy features off. Also, sometimes the social media company changes policy on some aspects, which may turn some private features into public ones. That means you should be careful not to post anything too personal and also don't post anything such as addresses, bank account numbers, passwords, etc. This is probably common sense to you, but it's a good thing to keep in mind regardless.

Also, if there are people who verbally threaten or harass you, then you should either report them or block them. Preferably both, but blocking is probably more effective. If someone friend requests you, then it's ideal to only accept their request if you know who they are. Though you can relax this if you aren't worried about who sees your profile page.

In addition, you should be careful as to what you read on social media. Not everything is true. This is because practically anyone can post a news story even if it's completely made up. Lately there have been some efforts to do fact checking, but there's still a lot of fictional stuff out there. Be sure to avoid clicking on any links you may not recognized as they could be phishing links, or may lead to harmful malware. It's probably just best to get an antivirus of some kind.

Other Questions
What is the solution set to the inequality \left(4x-3\right)\left(2x-1\right)\ge0 38. What are 3 examples of foods/drinksthat probably have no DNA in them?Why not? x - 3/5 = 10 what would x be ? help answer this pls1)Who do you think would support the bank - Hamilton or Jefferson and why? 2)Who do you think would be against the bank - Hamilton or Jefferson and why? What are the next three terms in the sequence 1, 7, 13, 19, ... ? Help me with this. I'll give brainiest Esther made 634 quarts of soup and her family eats 338 quarts of soup A presidential candidate emerges from a new minor party that supports radical changes to the national government. This candidate challenges the candidates from the two major parties (Democratic and Republican). In almost all states, the candidate who receives a plurality of popular votes also receives all of the electoral votes for that state. On Election Day, the two major-party candidates divide all of the electoral votes; the minor-party candidate does not receive a plurality in any state.What does the scenario illustrate about the plurality system of elections in the United States?It ensures that the government will be controlled by whichever party wins the presidential election.It creates opportunities for minor parties to have an important impact on the national governments policies.It perpetuates the two-party system because minor parties do not attract a wide enough range of supporters to win.It ensures that the same government policies will continue becaus HelpppppppJuan learns that his favorite public park is going to be turned into a shopping mall. He is quite upset at the thought of losing his favorite park. This issue concerns Juan enough that he decides to do something about it! What step leading up to the creation of a citizen action plan has Juan completed? Select one:a. Identifying a public policy alternativeb. Identifying the issuec. Identifying the solutiond. Conducting background research 7. All the following are settlement patterns except.....A. nodal.B. ribbon.C. rural.D. terminus. Please HelppppThis graph shows the temperature of a room over time.What situation could match the graph?A. Aaron turns on the heat and the temperature of a conference room steadily increases. After the room becomes a comfortable temperature, Aaron turns off the heat and the temperature in the room stays the same for a while. Aarons coworker says it is too hot in the room, so Aaron turns on the air conditioner. The temperature in the room steadily decreases. Aaron gets cold again and turns the heat back on so that the temperature of the room steadily increases. Again, when the room becomes comfortable, Aaron turns off the heat and the temperature of the room stays the same.B. Aaron turns on the heat to raise the temperature in the room at the beginning of a conference. The temperature steadily increases until the room becomes too hot, so Aaron turns on the air conditioner. The temperature in the room steadily decreases for a while. When the room gets too cold again, Aaron turns the heat back on and the temperature in the room steadily increases. When the room reaches a comfortable temperature, Aaron turns the heat off and the temperature stays the same for the rest of the conference.C. Aaron turns on the air conditioner in a conference room and the temperature of the room steadily decreases to a comfortable temperature. The temperature of the room stays the same for a while and then Aaron decides it is too cold, so he turns on the heat and the temperature of the room steadily increases. When the temperature in the room becomes comfortable, Aaron turns off the heat and the temperature in the room stays the same for the rest of the conference.D. Aaron turns on the heat in a conference room and the temperature of the room steadily increases to a comfortable temperature. The temperature of the room stays the same for a while and then people complain of being hot. Aaron turns on the air conditioner, causing the temperature to steadily decrease for a while until Aaron turns the air conditioner off and the temperature stays the same for a while. Finally, Aaron turns the heat back on and the temperature of the room increases steadily for the rest of the conference. why life is hell and love is a lie Graph: y Tyler ate x fruit snacks, and Han 3/4 less than that -3x = 36 X = ________ can someone answer this plz Help please. I will give a Brainliest when i get the test answers back. Mel made a quesadilla. He cut 1/10 of the quesadilla to save for later. Mel then shared the remaining portion among himself and 2 friends. What fraction of the whole quesadilla did each person get? HELP ME A cheetah ran 75 meters at a speed of 25 meters per second. How long was the cheetah running?3 seconds5 seconds30 seconds50 seconds hellllppp!! :( write an equation of the line in slope-intercept form. Explain briefly the role, responsibilities, and required background of the production designer of a film. Steam Workshop Downloader