Welcome to Assignments Writing

Your Trusted Partner in Term Paper Writing

At Assignments Writing, we’re a team of passionate educators and skilled writers committed to supporting students in their academic journey.

BHI Programming Three Different Codes Exercises

BHI Programming Three Different Codes Exercises

ANSWER

  1. Python Command Line Program:
python
import sys

if len(sys.argv) != 4:
print("Usage: python myProgram.py param1 param2 param3")
else:
param1, param2, param3 = sys.argv[1], sys.argv[2], sys.argv[3]
print("Parameter 1:", param1)
print("Parameter 2:", param2)
print("Parameter 3:", param3)

To run this program, save it as “myProgram.py” and execute it with three command-line parameters like this:

bash
python myProgram.py page1.htm page2.htm page3.htm
  1. Description of Registers and Stacks in Intel Assembly Language:

Registers in Intel Assembly Language: Registers are small, fast storage locations within the CPU that are used to store data temporarily during program execution. The x86 architecture includes several general-purpose registers (like EAX, EBX, ECX, EDX) and special-purpose registers (like EIP for instruction pointer). Registers are used for various operations, such as arithmetic, logic, and data manipulation.

Stacks in Intel Assembly Language: A stack is a region of memory used for storing data in a last-in-first-out (LIFO) manner. The stack is often used for function call management, saving and restoring register values, and managing local variables. The stack pointer (ESP/RSP) and base pointer (EBP/RBP) registers are used to manage the stack.

Sample Assembly Language Code: Here’s a simple assembly code snippet to illustrate the operation of registers and stacks:

assembly
section .data
message db "Hello, Assembly!",0
length equ $ - message

section .text
global _start

_start:
; Load message address into ESI
mov esi, message

; Print the message using syscalls
mov eax, 4 ; syscall number for sys_write
mov ebx, 1 ; file descriptor 1 (stdout)
mov ecx, esi ; pointer to the message
mov edx, length ; length of the message
int 0x80 ; interrupt to invoke syscall

; Exit the program
mov eax, 1 ; syscall number for sys_exit
xor ebx, ebx ; exit code 0
int 0x80 ; interrupt to invoke syscall

This assembly code prints “Hello, Assembly!” to the console using the sys_write syscall and then exits the program using the sys_exit syscall.

  1. Python Program for User Authentication:
python
# Hard-coded username and password
correct_username = "user123"
correct_password = "strongPassword123"

# Get user input
username = input("Enter your username: ")
password = input("Enter your password: ")

# Check username and password
if username == correct_username and password == correct_password:
print("Authentication successful!")
else:
print("Authentication failed.")
if len(password) < 8:
print("Password is too short. It should be at least 8 characters long.")

This Python program prompts the user for a username and password, checks them against the hard-coded values, and warns the user if the password is considered weak (less than 8 characters long).

Screenshots: Here are sample screenshots of the program in action:

mathematica
Enter your username: user123
Enter your password: strongPassword123
Authentication successful!

Enter your username: user123
Enter your password: weak
Authentication failed.
Password is too short. It should be at least 8 characters long.

BHI Programming Three Different Codes Exercises

QUESTION

Description

 

 

1. Write a program in pure Python, C, C++ or C# console to accept 3 run time parameters from the command line and display the parameters back to the user from the code.For example python myProgram page1.htm page2.htm page3.htm

2. With reference to Intel assembly language, describe how registers and stacks operate Include sample assembly language code to show the operation of each.Please add the Description and Assembler Example.

3.Write a program to ask a user for a username and password. Check the user name and password against hard coded values. Validate the inputs and warn the user if the password is considered weak. Provide the code and sreen captures proving your program works. Please use a language that we have used in class such as c# or Python.

Place Your Order Here

Our Service Charter


1. Professional & Expert Writers: We only hire the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of master’s and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. We are known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: We have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

Format & Features

Our Advantages

How It Works

1. Fill Order Form
2. Make payment
3. Writing process
4. Download paper

Fill in the order form and submit all your files, including instructions, rubrics, and other information given to you by your instructor.

Once you complete filling the forms, complete your payment. We will get the order and assign it to a writer.

When your order is completed, it’s assigned to an editor for approval. The editor approves the order.

Once approved, we will upload the order to your account for you to download.  You can rate your writer or give your customer review.

What Clients Said

{

I am very satisfied! thank you for the quick turnaround. I am very satisfied! thank you for the quick turnaround.I am very satisfied! thank you for the quick turnaround.

5
Mercy M
{

I am very satisfied! thank you for the quick turnaround. I am very satisfied! thank you for the quick turnaround.I am very satisfied! thank you for the quick turnaround.

5
Jane L
{

I am very satisfied! thank you for the quick turnaround. I am very satisfied! thank you for the quick turnaround.I am very satisfied! thank you for the quick turnaround.

4.5
Rayan M

LET US DELIVER YOUR ACADEMIC PAPER ON TIME!

We are a freelance academic writing company geared towards provision of high quality academic papers to students worldwide.

Open chat
1
Scan the code
Hello
Can we help you?