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
balandron [24]
4 years ago
14

Python

Computers and Technology
1 answer:
Archy [21]4 years ago
3 0

Create a function generateString(char, val) that returns a string with val number of char characters concatenated together. For example generateString('a', 7) will return aaaaaaa. Additionally create the code to run your function and print out the new string.

Explanation:

<u>CODE :</u>

import sys

import random

character= sys.argv[1]

count= int(sys.argv[2])

def generateString('char', count):

 random = char * count

 return random

print(character*count)

<u>OUTPUT :</u>

  • String('a' , 7)
  • aaaaaaa

In the above code, you are accepting a character, and a count value to go with it. When the value is updated, character is multiplied with the count, and the output is generated accordingly

You might be interested in
Where should fire extinguishers be stored on a boat?
fomenos

<span>Fire extinguishers should be stored in a boat at the engine area and near the operator. A fire extinguisher should be put near the engine because the engine of the boat is a fire hazardous place and this is the area where a fire could start.  The fire extinguisher should be installed properly using a mounting bracket to hold the extinguisher in place. There are different types of extinguishers that should be installed in the boat, these are type A, B, and C extinguishers. Type A extinguishers can turn off the fire caused by combustible solids like wood and paper. Type B extinguishers can turn off fire caused by gasolines, oil, and greases. While Type C extinguishers can turn off fire caused by an electrical problem.</span>

5 0
3 years ago
How do you represent (decimal) integer 50 in binary
il63 [147K]
Its 110010. i hope this helped
7 0
3 years ago
The First Web page you will see every time you launch the Web Browser Application is called​
sineoko [7]

Answer:

HomePage

Explanation:

3 0
3 years ago
A network using multiple cell towers falls under which type of network?
erastova [34]

Answer:

man

Explanation:

multiple area network

8 0
4 years ago
If a flagged word is spelled correctly, such as many of our names, right-click it and then click ____ on the shortcut menu to in
cluponka [151]

Answer:

Either, "Ignore all" or "add '...' to dictionary"

Explanation:

If "Ignore all" is clicked, the software will ignore all the words which it believes is incorrect currently written. Whilst, adding it to the dictionary, the word will always be seen as spelt correctly on the application. Therefore, both get rid of the flagged word, but one is permanent.

4 0
2 years ago
Other questions:
  • what is the software that controls the storage, retrieval and manipulation of database stored in a database
    14·1 answer
  • ___ Jacking is a crime that takes place when a hacker misdirects URL to a different site. The Link Itself Looks Safe, But the us
    11·1 answer
  • What list did poe appear on for the search engine lycos?
    11·1 answer
  • Compare pseudocode and flowcharts for designing computer programs, and discuss the advantages and disadvantages of each.
    13·1 answer
  • When studying an information system, illustrations of actual documents should be collected using a process called _____.
    12·1 answer
  • How can you prevent your VMs receiving DHCP server messages from unauthorized virtual machine pretending to be DHCP servers?
    13·1 answer
  • An actual printout of computer data always satisfies the best evidence rule?
    12·1 answer
  • Assignment Guidelines
    12·1 answer
  • ((Sorry for the self promo btw) Can you guys help me try and get affiliate on twitch? I am currently at 20 followers and it woul
    10·2 answers
  • 2. What is the first part of the 3D printing process ?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!