1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
gulaghasi [49]
3 years ago
5

Write a loop that displays your name 10 times. 2. Write a loop that displays all the odd numbers from 1 through 49. 3. Write a l

oop that displays every fifth number from 0 through 100. 4. Write a code sample that uses a loop to write the numbers from 1 through 10 to a file. 5. Assume that a file named People.txt contains a list of names. Write a code sample that uses a while loop to read the file and display its contents in a ListBox control.
Computers and Technology
1 answer:
monitta3 years ago
6 0

Answer:

Kindly check explanation

Explanation:

(1.)

n = 0

While n < 10 :

n+=1

print('fichoh')

# initiate counter n = 0 ; set condition, while n is not equal to 10 ; it print 'fichoh' and counter is increased by 1. This terminates once it reaches 10.

(2.)

for number in range(1,50):

if number%2 != 0 :

print(number)

#An odd number won't have a remainder of 0 when Divided by 2 ; so, for numbers 1 to 49 using the range function, if the number is divided by 2 and leaves a remainder other Than 0, such number is displayed

(3.)

for number in range(0,101,5):

print(number)

# Using the range function, starting from 0 to 100; it is number in the for loop is incremented by 5 and displayed.

(4.)

outfile = open('my_file.txt', 'w')

for n in range(0,11):

outfile.write(str(n))

outfile.close()

#open, 'w' creates a text file, my_text.txt and writes into it ; using the range function, numbers 0 to 10 is written into the created file.

5.)

name_file = open('People.txt', 'r')

While name_file:

out_file = name_file.readline()

if out_file = ' ' :

break

name_file.close()

names = name

#Open, 'r' ; opens and read from the file People.txt ;

#readline reads the content of the opened text file into a list out_file ; using the if ' ', the loop terminates once an empty content is read.

You might be interested in
You find information that you know to be classified on the internet. What should you do.
melomori [17]

A person is to find the information to be classified on the internet  are the best in the screenshot.

What is internet?

The word “internet” is also referred to as “net.” The global system of networks known as the Internet. Online services offered via the Internet include social media, email, and others. The without internet  are the not possible to share the information at the time.

A person is to find the information through which the internet is the best to justify. There used of the internet are the search the information with the help of the internet are the mic, keyboard. The information are the save and the screenshot was the used.

As a result, the person is to find the information to be classified on the internet  are the best in the screenshot.

Learn more about on internet, here:

brainly.com/question/13308791

#SPJ2

5 0
1 year ago
Read 2 more answers
Which of these statements about digital media is NOT accurate?
DIA [1.3K]

Answer:

It is any information that is audio or video but not text.

Explanation:

5 0
3 years ago
Use the arr field and mystery () method below.
kolezko [41]

Answer:

The sum of all positive even values in arr

Explanation:

We have an array named arr holding int values

Inside the method mystery:

Two variables s1 and s2 are initialized as 0

A for loop is created iterating through the arr array. Inside the loop:

num is set to the ith position of the arr (num will hold the each value in arr)

Then, we have an if statement that checks if num is greater than 0 (if it is positive number) and if num mod 2 is equal to 0 (if it is an even number). If these conditions are satisfied, num will be added to the s1 (cumulative sum). If num is less than 0 (if it is a negative number), num will be added to the s2 (cumulative sum).

When the loop is done, the value of s1 and s2 is printed.

As you can see, s1 holds the sum of positive even values in the arr

7 0
3 years ago
Does anyone know about ICT? i need help ASAP
Lina20 [59]
ICT means, Information and Communication Technologies

ICT is a borders term for information technology which refers to all communication technologies including the Internet wireless networks, cell phones, computers, software, middleware, video-conferencing, social networking and other media applications and services
4 0
4 years ago
"A software package developed to handle information requirements for a specific type of business is called a horizontal applicat
goldfiish [28.3K]

Answer:

<h3>False </h3>

Explanation:

Vertical application software it the software which if build as per the specific requirements for achieving specific processes and functions which are unique to a user or business. These softwares are customised as per the needs of an organisation or enterprise. these applications are useful for organisations operating in marketing, sales, inventory etc but cannot be used by other businesses. They are built to target specific users. ERP(Enterprise Resource Planning ) and CRM (Customer Relationship Management ) are examples of vertical applications.

3 0
3 years ago
Read 2 more answers
Other questions:
  • ____ deals with ensuring that data is protected against unauthorized access, and if the data are accessed by an authorized user,
    10·1 answer
  • for what reason do some security professionals consider insiders more dangerous than outside intruders?
    8·1 answer
  • An organization uses SAP financial management software to store accounting details and Microsoft CRM software to record customer
    12·1 answer
  • write the algorithm, flowchart and BASIC program to calculate the area of the rectangle length 50m and width 30m.​
    8·1 answer
  • Which is slower RAM or the CPU?
    11·2 answers
  • When you're working on an image, it's a good idea to make a ____________ of the image, so that you'll have the original image in
    12·2 answers
  • Monica spent a lot of time preparing for her interview, but the hiring manager is not asking any of the questions she practiced.
    9·2 answers
  • When your hands are on home row, your left hand rests lightly on _____. J K L ; A S D F Z X C V Q W E R'
    11·1 answer
  • Write a nested loop to set values as follows: [0] [1] [2] [3] [4] [0] 1 2 3 4 5 [1] 1 2 3 4 5 [2] 1 2 3 4 5 [3] 1 2 3 4 5
    12·1 answer
  • Does anybody have the answer for 2.19.6 checkerboard for codehs??
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!