Description
Write a code using Ruby :
Create a program which generates a random number (1 - 100) by looking into rubydoc.org and using that rondom number, find if the number is lucky number(77).if you get a lucky number, then print that you are winner if not, try again.
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Explanation & Answer
Thank you for the opportunity to help you with your question!
x=rand(0..100)
if x==77
puts "you are winner"
else
Please let me know if you need any clarification. I'm always happy to answer your questions.puts "try again"
Completion Status:
100%
Review
Review
Anonymous
I was having a hard time with this subject, and this was a great help.
Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4
24/7 Homework Help
Stuck on a homework question? Our verified tutors can answer all questions, from basic math to advanced rocket science!
Most Popular Content
Fix C code with Vulnerabilities, programming homework help
The attached
code, developed by a junior developer, has several issues and is not
functioning as expected. The desir ...
Fix C code with Vulnerabilities, programming homework help
The attached
code, developed by a junior developer, has several issues and is not
functioning as expected. The desired
functionality of the program is to allow a user to select from several choices
on a menu. After the user selects
the “Exit” option from the menu, the program
will populate a password with ‘1’s and then display the value of the password. The program also
captures a character so the screen
can stay paused for review before exiting. Below are screen shots for a
successful program execution.
Unfortunately,
not only are there security issues, the code you are provided doesn’t work as expected.
Carefully,
review the code and perform analysis as needed. Consider the following rules and recommendations and hints for items
that you might want to review.
Note,
that some rules and recommendations
listed below may not be found as issues in the code.
STR31-C.
Guarantee that storage for strings has sufficient space for character data and
the null terminator.MSC24-C.
Do not use deprecated or obsolescent functions.FIO34-C.
Distinguish between characters read from a file and EOF or WEOF.MSC17-C.
Finish every set of statements associated with a case label with a break statement.MSC33-C.
Do not pass invalid data to the asctime()function.MSC17-C.
Finish every set of statements associated with a case label with a break statement.DCL20-C.
Explicitly specify void when a function accepts no arguments.MEM30-C.
Do not access freed memory.
You
must use Visual Studio for C compiling.
Review
and analyze the code, and determine the rules
and recommendations that are violated, you should fix the code. Be sure to
document each issue by aligning the
rule or recommendation and explain exactly how you fixed the issue.
Tip:
Be
very careful with the pointers and memory limits of the arrays. Most modern compilers attempt to protect your system
resources, but you could potentially produce access violations that could lock your system up. Take your time and
review the memory bounds for all of your
arrays before your start making code changesSubmit:Provide your fixed
C source code along with a word document describing how you addressed each issue. For example, you should list
the C Cert rule or recommendation for each issue and show and describe the code that addresses the
issue. You should also provide screen shots and descriptions of the successful execution of the code. All references used should be
included in your document.
IGLOBAL University Output Screenshot and Programming Worksheet
Read chapter 3. Review all the documents in the weekly module before doing the assignment. Modify program 3 from lesson 3 ...
IGLOBAL University Output Screenshot and Programming Worksheet
Read chapter 3. Review all the documents in the weekly module before doing the assignment. Modify program 3 from lesson 3 to create your own program with the following modifications:a) Choose different background and foreground colors. Make sure thee text is visible.b) Create two buttons in the window instead of one.c) Each button should give a different message when clicked.Copy and paste the program and the output and also submit a screenshot of both. Use this link to download Just Basic software on your computer. http://justbasic.com/
CIS 216 PU Advanced Modularization Method with Multiple Parameters Discussion
In this assignment, you will be analyzing the cumulative summing, the different number of parameters that can be passed to ...
CIS 216 PU Advanced Modularization Method with Multiple Parameters Discussion
In this assignment, you will be analyzing the cumulative summing, the different number of parameters that can be passed to a method, and the design methods with no parameters. see attached PDF for the following instructions
University of the Cumberlands SQL Script Paper
Assignment ContentFor this assignment, you need to submit your code (SQL script or document), including structure from the ...
University of the Cumberlands SQL Script Paper
Assignment ContentFor this assignment, you need to submit your code (SQL script or document), including structure from the Data Definition Language (DDL) and the Data Manipulation Language (DML). Use these SQL Statements as a starting point for your script. The data manipulation language (DML) is used to create, read, update, and delete data from a table. The data definition language (DDL) is used to create and alter the structure of the database itself, like creating a table, its columns, define and modify the primary and foreign keys, stored procedures, delete columns, tables, and even the entire database. Your SQL statements should require a variety of SQL capabilities, such as various kinds of join, aggregate functions, etc. (This presupposes a good initial domain choice.)Remember you must turn in code (or documentation) of the results of these tests indicating that the SQL statements for your requirements worked correctly and that your constraints correctly allowed good data and caught bad data. Your document must include comments (handwritten or entered as SQL comments in a text file) that indicate what each test is testing - i.e. a specific requirement (if "good" data) or a specific problem you were catching (if testing a constraint on "bad" data).Follow these steps to complete your assignment:Populate your database with sample data to allow testing of the schema and the various transactions. Each table should have a minimum of ten rows.After you've entered data, create some sample queries to see if the output is what you expected.Create some sample reports to make sure these also produce similar results.Make any necessary corrections to the database design during this stage and before you enter all of your personal records. If you find any problems, correct the design.Enter all of your personal records.Write your SQL Script.Submit your code (SQL script or document), including structure from the Data Definition Language (DDL) and the Data Manipulation Language (DML).
ITSD422 American Intercontinental WKs 3&4 System Development Life Cycle Paper
This is part 3 and part 4 to the question that was previously completed for parts 1 and 2. I will be attaching to instruct ...
ITSD422 American Intercontinental WKs 3&4 System Development Life Cycle Paper
This is part 3 and part 4 to the question that was previously completed for parts 1 and 2. I will be attaching to instructions for the week 3 and week 4 parts of the question. Week 3 and week 4 need to be saved as separate files. I'm also attaching the completed work for week 1 and 2. Week 3 and 4 will be added to the completed week 2 document.
6 pages
Assembly Language
0x080486a2 in void foo() at t.cc:8 mov ebx,[ebp+36]; ebx saves pointer to the array dec ecx; decreasing the size of the ar ...
Assembly Language
0x080486a2 in void foo() at t.cc:8 mov ebx,[ebp+36]; ebx saves pointer to the array dec ecx; decreasing the size of the array needed to sort
Similar Content
WSU Linux File Permission Paper
File permissions describe who can read, write and execute a file, or in the case of a directory, who can list its contents...
Oakland University Java Script Program Project
I need three programs done for this assignment, the rubric is attached to the file section. Where it says display name jus...
Table Designing for New Technologies, website design homework help
As technology evolves, Web designers can no longer just assume that all individuals accessing their site are using compute...
University of California Frequentist Statistics R Programming Code
Question 2: Answer this question using R or any software you are familiar with.
The great white shark, Carcharodon Carchar...
Herzing University Current Legal Rulings Report
Please submit your work using the table below as an example in a three to four-page report with APA cited references to su...
ITS 632 University of Cumberlands Average Rainfall Custom Function Coding Project
Write a program that uses nested loops to collect data and calculate the average rainfall over a period of years. This pro...
Matlab Signals
%accessing the first column which represents the first signal %an empty array at which we will put the first 25000 values ...
3 Db For Linux Management Revised
The ID field – has a unique identifier for the entry. The runlevel field- shows the runlevels the particular action shou...
Random
var TotalCasesState = getColumn("cases per state", "Total Confirmed Cases");...
Related Tags
Book Guides
Catching Fire
by Suzanne Collins
Underground A Human History of the Worlds Beneath our Feet
by Will Hunt
Notes from Underground
by Fyodor Dostoyevsky
Frankenstein
by Mary Shelley
Cry the Beloved Country
by Alan Paton
The Second Sex
by Simone de Beauvoir
The Remains Of The Day
by Kazuo Ishiguro
Good Kids Bad City
by Kyle Swenson
Crippled America
by Donald J Trump
Get 24/7
Homework help
Our tutors provide high quality explanations & answers.
Post question
Most Popular Content
Fix C code with Vulnerabilities, programming homework help
The attached
code, developed by a junior developer, has several issues and is not
functioning as expected. The desir ...
Fix C code with Vulnerabilities, programming homework help
The attached
code, developed by a junior developer, has several issues and is not
functioning as expected. The desired
functionality of the program is to allow a user to select from several choices
on a menu. After the user selects
the “Exit” option from the menu, the program
will populate a password with ‘1’s and then display the value of the password. The program also
captures a character so the screen
can stay paused for review before exiting. Below are screen shots for a
successful program execution.
Unfortunately,
not only are there security issues, the code you are provided doesn’t work as expected.
Carefully,
review the code and perform analysis as needed. Consider the following rules and recommendations and hints for items
that you might want to review.
Note,
that some rules and recommendations
listed below may not be found as issues in the code.
STR31-C.
Guarantee that storage for strings has sufficient space for character data and
the null terminator.MSC24-C.
Do not use deprecated or obsolescent functions.FIO34-C.
Distinguish between characters read from a file and EOF or WEOF.MSC17-C.
Finish every set of statements associated with a case label with a break statement.MSC33-C.
Do not pass invalid data to the asctime()function.MSC17-C.
Finish every set of statements associated with a case label with a break statement.DCL20-C.
Explicitly specify void when a function accepts no arguments.MEM30-C.
Do not access freed memory.
You
must use Visual Studio for C compiling.
Review
and analyze the code, and determine the rules
and recommendations that are violated, you should fix the code. Be sure to
document each issue by aligning the
rule or recommendation and explain exactly how you fixed the issue.
Tip:
Be
very careful with the pointers and memory limits of the arrays. Most modern compilers attempt to protect your system
resources, but you could potentially produce access violations that could lock your system up. Take your time and
review the memory bounds for all of your
arrays before your start making code changesSubmit:Provide your fixed
C source code along with a word document describing how you addressed each issue. For example, you should list
the C Cert rule or recommendation for each issue and show and describe the code that addresses the
issue. You should also provide screen shots and descriptions of the successful execution of the code. All references used should be
included in your document.
IGLOBAL University Output Screenshot and Programming Worksheet
Read chapter 3. Review all the documents in the weekly module before doing the assignment. Modify program 3 from lesson 3 ...
IGLOBAL University Output Screenshot and Programming Worksheet
Read chapter 3. Review all the documents in the weekly module before doing the assignment. Modify program 3 from lesson 3 to create your own program with the following modifications:a) Choose different background and foreground colors. Make sure thee text is visible.b) Create two buttons in the window instead of one.c) Each button should give a different message when clicked.Copy and paste the program and the output and also submit a screenshot of both. Use this link to download Just Basic software on your computer. http://justbasic.com/
CIS 216 PU Advanced Modularization Method with Multiple Parameters Discussion
In this assignment, you will be analyzing the cumulative summing, the different number of parameters that can be passed to ...
CIS 216 PU Advanced Modularization Method with Multiple Parameters Discussion
In this assignment, you will be analyzing the cumulative summing, the different number of parameters that can be passed to a method, and the design methods with no parameters. see attached PDF for the following instructions
University of the Cumberlands SQL Script Paper
Assignment ContentFor this assignment, you need to submit your code (SQL script or document), including structure from the ...
University of the Cumberlands SQL Script Paper
Assignment ContentFor this assignment, you need to submit your code (SQL script or document), including structure from the Data Definition Language (DDL) and the Data Manipulation Language (DML). Use these SQL Statements as a starting point for your script. The data manipulation language (DML) is used to create, read, update, and delete data from a table. The data definition language (DDL) is used to create and alter the structure of the database itself, like creating a table, its columns, define and modify the primary and foreign keys, stored procedures, delete columns, tables, and even the entire database. Your SQL statements should require a variety of SQL capabilities, such as various kinds of join, aggregate functions, etc. (This presupposes a good initial domain choice.)Remember you must turn in code (or documentation) of the results of these tests indicating that the SQL statements for your requirements worked correctly and that your constraints correctly allowed good data and caught bad data. Your document must include comments (handwritten or entered as SQL comments in a text file) that indicate what each test is testing - i.e. a specific requirement (if "good" data) or a specific problem you were catching (if testing a constraint on "bad" data).Follow these steps to complete your assignment:Populate your database with sample data to allow testing of the schema and the various transactions. Each table should have a minimum of ten rows.After you've entered data, create some sample queries to see if the output is what you expected.Create some sample reports to make sure these also produce similar results.Make any necessary corrections to the database design during this stage and before you enter all of your personal records. If you find any problems, correct the design.Enter all of your personal records.Write your SQL Script.Submit your code (SQL script or document), including structure from the Data Definition Language (DDL) and the Data Manipulation Language (DML).
ITSD422 American Intercontinental WKs 3&4 System Development Life Cycle Paper
This is part 3 and part 4 to the question that was previously completed for parts 1 and 2. I will be attaching to instruct ...
ITSD422 American Intercontinental WKs 3&4 System Development Life Cycle Paper
This is part 3 and part 4 to the question that was previously completed for parts 1 and 2. I will be attaching to instructions for the week 3 and week 4 parts of the question. Week 3 and week 4 need to be saved as separate files. I'm also attaching the completed work for week 1 and 2. Week 3 and 4 will be added to the completed week 2 document.
6 pages
Assembly Language
0x080486a2 in void foo() at t.cc:8 mov ebx,[ebp+36]; ebx saves pointer to the array dec ecx; decreasing the size of the ar ...
Assembly Language
0x080486a2 in void foo() at t.cc:8 mov ebx,[ebp+36]; ebx saves pointer to the array dec ecx; decreasing the size of the array needed to sort
Earn money selling
your Study Documents