in python
Is the following line of code correct?
var1, var2, var3 = 1, '2', 3
a. True
b. False
ANSWER : True
Explanation :
We can assign the values to variables by using the ' , ' method, then if we try to print the var1, var2, var3, which will prints 1, '2', 3 and the statement looks perfectly fine, and the statement is completely valid
in python Is the following line of code correct? var1, var2, var3 = 1, '2', 3...
In Python: How many prints will run in the following code? def myfun(var1,var2): print(var1) print(var2) print(var1**var2) return var1+var2 print(var2**2) print(var1*var2)
Consider the following AVR Assembly Language Code which is
passed through an assembler.
.include "m324Adef.inc"
jmp RESET
jmp HANDLER_1
.dseg
var1: .BYTE 2
var2: .BYTE 6
.cseg
const: .DB 0xAA, 0xCC, 0xDD
reset:
ldi ZL, low(var1)
ldi ZH, high(var1)
ldi r17, 0xBB
st Z, r17
ldi ZL, low(const<<1)
ldi ZH, high(const<<1)
lpm
jmp mainloop
.dseg
var3: .BYTE 4
.cseg
.org 0x15
mainloop:
ldi r20, 0xF0
...
Determine the segments and values of each of the following symbols.
(Enter the segment...
Homework: 1) Given the following declaration : Int var1 = 9; Int var2 = 6; Int *varPtr1 = &var1; Int *varPtr2 = &var2; a) What are the value of var1 and var2 after the following code sequence? Temp = *varPtr1; *varPtr1 = *varPtr2; *varPtr2 = temp; b) what did this sequence accomplish?
Write down the value of each destination operand: .data var1 WORD 0A8B4h, 1234h, 0BA23h var2 DWORD 0E2A478C1h .code mov ax, WORD PTR [var1+3] mov eax, WORD PTR [var2+1] mov ebx, DWORD PTR [var1+2]
Write down the value of each destination operand: .data var1 WORD 3056h, 7645h, 0E347h var2 DWORD 3E56F289h .code mov ax, WORD PTR [var2+1] mov eax, DWORD PTR [var1] mov ebx, DWORD PTR [var1+3]
What will be the value of the parity flag after the following lines execute? Mov al, 3 Add al, 5 What will be the value of the destination operand after each of the following instructions execute? .data var1 SBYTE -1, -2, -3, -4 var2 WORD A000h, B000h, C000h, D000h var3 SWORD -16, -42 var4 DWORD 11, 22, 33, 44 .code mov ax, var2 mov ax, [var2+4] mov ax, var3 mov ax, [var3-2]
Easy Javascript questions
You can use window.history to retrieve the history object. Using
the history object, what methods can you call to navigate backwards
and forward to web pages that have been visited recently? The
answer is not in the book. See
https://developer.mozilla.org/en-US/docs/Web/API/History.
Think about the situation where the alert message displays “your
reply was false.” Describe the type of person who would generate
that output—someone who always tells the truth, someone who always
lies, or some other type of...
Solve using C programming
3. lf you are given this code. #include <stdio.h> int main() int var1, var2; int sum; printf("Enter number 1:\n "); scanf("%d",&var1); printf("Enter number 2:In ); scanf("%d",&var2); sum-var1+var2; printf ("Vnsum of two entered numbers : %d", //printf ("Output: %d", res); sum); return e; Modify this code by creating a function called "addition". Make the arguments of the functions numberl and number 2. Add the two values in the function. Return a value called "result". Print "result" in...
1. Assume that you are given values in eax, ebx, ecx. Write an assembly code that does the following: eax = (ecx + edx ) - (eax + ebx) 2. Write a piece of code that copies the number inside al to ch. Example: Assume that Initially eax = 0x15DBCB19. At the end of your code ecx = 0x00001900. Your code must be as efficient as possible. 3. You are given eax = 0x5. Write one line of code in...
C language not C++
1. Write the statements to do the following: (2 pts) a. Define a struct with member variables width, height, topleft x, topleft y all floats). Use a tag to call it Rectangle. b. Declare a variable struct type Rectangle 2. Consider the following variables: struct int x; float y; char zi var1; union nt x; float y; char[20] z;) var2 f float and int are stored using 4 bytes each, what is the size (in bytes)...