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
Genrish500 [490]
3 years ago
13

Write a function that iteratively appends random 1's and 0's to an array to form a binary number. The function returns the binar

y result when it's decimal equivalent is larger than the input number. [outArray] = potd11(inputNumber)
Computers and Technology
1 answer:
Anestetic [448]3 years ago
7 0

Answer:

function [result] = potd11(userInput)

result = [0];

d = 0;

while d < userInput

result = [result, randi([0,1])];

d = sum(result .* (2.* ones(1, numel(result))).^(numel(result)-1 :-1:0));

end

end

Explanation:

  • Initialize the variables from 0 as a starting point.
  • Use a while to run it until d is less than userInput variable.
  • Add random 1's and 0's to the array.
  • Return the binary result when it's decimal equivalent is larger than the input number.
You might be interested in
Define the following term. data, database, DBMS, database system, data- base catalog, program-data independence, user wen', DBA,
wolverine [178]

Answer:

data - Any form of value in a column of a table in a relational database.

DBMS - Short for Database management system, which is a software that can be used to create, manipulate and view databases, e.g. MS SQL Server.

database system - Same as DBMS.

database catalog - Place where the metadata of a Database, its tables, users etc. exists e.g. date created, size, number of columns etc. Also known as Data Dictionary.

program-data independence - Program-data independence refers to the capability of leaving data intact and accessible regardless of modifications to the database that contains the data.

DBA - Short for Database Administrator, person responsible for maintaining the database. Its main responsibility is to keep the data clean and safe i.e. data doesn't contain wrong or invalid data, and is safe from viruses and is backed up.

end user - Anyone who is not directly interacting with a database, but through some software like website and mobile application.

persisten object - An object of a class in a program, that interacts with the underlying database and is responsible for manipulating the database connected to.

transaction-processing system - A transaction process system is part of a software, responsible for making sure critical business transactions, like crediting or debiting money, either goes through cleanly or doesn't at all.

CRUD are the four main types of operations one can do in a database environment. It stands for creating, reading, deleting and updating.

Explanation:

4 0
3 years ago
What are minimum computer requirements for a software program?
Bumek [7]
<span><span>Operating system: Windows 2000/XP
</span><span>CPU: Pentium 4 1.5 GHz or Athlon XP 1500+ processor or higher
</span><span>Memory: 384 MB RAM</span></span>
8 0
4 years ago
Which of the following tasks requires software? A Writing a paper on the history of Aztec sun godsB Creating a photo collage for
elena55 [62]
All of the above A, look up Info, B, get pictures and print, C, webpage is on the internet or computer hope this helps ~Vanessa
8 0
4 years ago
Does anyone know how to execute this assignment on Scratch?
lapo4ka [179]

Execute this assignment from Scratch in the following way

Explanation:

1.For each thread, first Scratch sets the 'active thread' to that thread. Then, it executes each block one by one in the stack for the active thread. It will execute the entire stack all in one go if it can.

2.The Hide block is a Looks block and a Stack block. If the block's sprite is shown, it will hide the sprite — if the sprite is already hidden, nothing happens. This block is one of the simplest and most commonly used Looks blocks.

3.Scratch is used in many different settings: schools, museums, libraries, community centers, and homes.

4.Mitch Resnik, the creator of the super-simple Scratch programming language and head of the Lifelong Kindergarten group at the MIT Media Lab, gave a TEDx talk about the value of coding and computer literacy in early education.

5.

5 0
3 years ago
Who want to go on scratch<br> I really need people to favorite and like my projects
mariarad [96]

Answer:

Sure

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • to create an app for a mobile device, yourself, you would use BLANK software like Swift, Corona or Scratch.
    13·1 answer
  • Emily wants to search online for cakes containing nuts. However, she wants to skip cakes that have raisins in them. Which option
    9·1 answer
  • List three considerations when you choose memory.
    14·1 answer
  • What would be advantageous for a laptop user to carry when the laptop gets a lot of use?
    14·1 answer
  • What is communication ​
    5·2 answers
  • What is the quickest way to change the format of a table?
    8·1 answer
  • Why is proper planning important?
    10·1 answer
  • When defining a class, it is a best practice to declare ____ as private. constructors mutators nothing should be private accesso
    7·1 answer
  • Points! taga pilipinas ba kayo?​
    10·1 answer
  • A wide-angle lens corrected for barrel distortion is called a(n)<br> lens.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!