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
earnstyle [38]
3 years ago
14

Write a pseudocode that receives a positive number from the user, and then,

Computers and Technology
1 answer:
Alik [6]3 years ago
5 0

Algorithm, pseudocodes and flowcharts are used as prototypes for a complete program.

<u>The pseudocode is as follows:</u>

input n

for i = 1 to n

  print("CS")

<u>The algorithm is as follows:</u>

1. Begin

2. Input number

3. For 1 = 1 to number

3.1     Display "CS"

4. End For

5. Stop

The following explanation of  the pseudocode can be used for algorithms and flowcharts

<em>This gets an </em><em>integer input </em><em>from the </em><em>user </em><em>(the </em><em>integer </em><em>represents the </em><em>number </em><em>of </em><em>times </em><em>to print "CS")</em>

input n

<em>This is </em><em>repeated n times</em>

for i = 1 to n

<em>This </em><em>prints "CS"</em><em> in each </em><em>iteration</em>

  print("CS")

See attachment for flowchart

Read more about algorithm, pseudocodes and flowcharts at:

brainly.com/question/21172316

You might be interested in
Top Down Design makes it easier to solve a problem by:___________
vaieri [72.5K]

Answer:

c) Starting with the biggest function and then moving to smaller ones

Explanation:

This design is a breakdown of a structure to determine the text functionality for small parts. The system analyzes the built-in top-down style, which defines and does not define some first-level components, often referred to as an unstable layout.

so correct answer is c) Starting with the biggest function and then moving to smaller ones

4 0
3 years ago
Write a function solution that, given an integer N, returns the maximum possible
Elina [12.6K]

You did not specified the language, so I did my program in python.

Hope it helps!!!

3 0
3 years ago
The underline format will underline what?
aivan3 [116]
The characters in the selected cell.
8 0
4 years ago
Read 2 more answers
Kathi, the owner of Klothes for Kats, is excited about the launch of her first Local Catalog ad. She remembers there are a few d
mina [271]

Answer:

Map view

Explanation:

The view that will most likely be displayed would be a Map view, where potential customers can see the Klothes for Kats logo, store information, and in-stock products. This is because Local Catalog ads only have a small space that is used to promote what is being advertised. Therefore, in these small spaces the most important things need to be shown in order to attract as many people as possible with what the store offers. The ad needs to have the logo and store information so that the potential customers can easily know what store is being advertised on the ad. The ad also needs to show some of the popular in-stock products in order to attract individuals that are actually interested in the products that the store is trying to sell.

6 0
3 years ago
1. Write a program to prompt the user to enter a single character and respond back whether or not the character is valid dna. 2.
Nina [5.8K]

Answer:

Answer 1:

dna = input("Enter DNA type: ")

dna = dna.upper()

print(dna)

if dna == "A" or dna == "B" or dna == "Z":

   print("valid")

else:

   print("invalid")

Answer 2:

rna = input("Enter DNA type: ")

rna = rna.lower()

print(rna)

if rna == "m" or rna == "t" or rna == "r":

   print("valid")

else:

   print("invalid")

Answer 3:

dnaSquence = input("Enter the DNA sequence: ")

type = "valid"

for char in dnaSquence:

   if char not in ["A", "C", "G", "T"]:

       type = "invalid"

       break

print(type)

Answer 4:

rnaSquence = input("Enter the RNA sequence: ")

type = "valid"

for char in rnaSquence:

   if char not in ["A", "C", "G", "U"]:

       type = "invalid"

       break

print("valid")

Explanation:

There are three types of DNA; Type A, Type B and Type Z.

A DNA sequence consists of; A, C, G and T.

There are three types of RNA; mRNA, tRNA and rRNA.

An RNA sequence consists of; A, C, G and U.

Code Explanations:

Code 1:

dna = input("Enter DNA type: ")

dna = dna.upper()

print(dna)

if dna == "A" or dna == "B" or dna == "Z":

   print("valid")

else:

<em>    print("invalid")</em>

  1. prompts and Takes a single character input
  2. converts the character to upper case
  3. compares the input to the DNA types
  4. Prints "valid" for a valid input else prints "invalid"

Code 2:

rna = input("Enter DNA type: ")

rna = rna.lower()

print(rna)

if rna == "m" or rna == "t" or rna == "r":

   print("valid")

else:

<em>    print("invalid")</em>

<em />

  1. prompts and Takes a single character input
  2. converts the character to lower case
  3. compares the input to the RNA types
  4. Prints "valid" for a valid input else prints "invalid"

Code 3:

Answer 3:

dnaSquence = input("Enter the DNA sequence: ")

type = "valid"

for char in dnaSquence:

   if char not in ["A", "C", "G", "T"]:

       type = "invalid"

       break

print(type)

  1. It prompts for a DNA sequence.
  2. Declares a string variable "type" and initializes type to valid.
  3. The FOR loop checks every character in the DNA sequence.
  4. If the character is not in the list [A, C, G, T] type becomes invalid and the loop breaks and the type "invalid" is printed to the screen.
  5. if all the characters are in the list, then type will remain valid and will be printed to the screen.

Code 4:

rnaSquence = input("Enter the RNA sequence: ")

type = "valid"

for char in rnaSquence:

   if char not in ["A", "C", "G", "U"]:

       type = "invalid"

       break

print("valid")

  1. It prompts for a RNA sequence.
  2. Declares a string variable "type" and initializes type to valid.
  3. The FOR loop checks every character in the RNA sequence.
  4. If the character is not in the list [A, C, G, U] type becomes invalid and the loop breaks and the type "invalid" is printed to the screen.
  5. if all the characters are in the list, then type will remain valid and will be printed to the screen.

7 0
3 years ago
Other questions:
  • Some drugs, like Tylenol, are available over the counter because they are safe in any dose.
    8·1 answer
  • A(n) _____ investigates, analyzes, designs, develops, installs, evaluates, and maintains a company’s information systems.​
    10·1 answer
  • For which product would the producer keep a high profit margin and offer after-sales service?
    6·1 answer
  • Which of these is an example of open-source software?
    13·1 answer
  • The find and
    10·1 answer
  • An F-1 ____________ may be authorized by the DSO to participate in a curricular practical training program that is an__________
    8·1 answer
  • Write a calculate_sq_inches_of_good_pizza function that accepts the diameter of a pizza and returns the area of the pizza minus
    7·1 answer
  • Select the correct answer. Nancy has made a small web page with the new features of HTML5. She has to show this web page in scho
    9·1 answer
  • Which of the following is a document view you can select using Button on the status bar?
    11·1 answer
  • In an etl process, data is loaded into a final target database such as:______
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!