Answer:
I'm not exactly sure on what the question is, but from reading it, I determined that you'll be creating 2 different designs using Inkscape/Photoshop. I'm leaving 2 of my designs in here for you to use on your project. Unknown on what to do about the design that wasn't created in an image-editing program.
Bedrooms are too small.
Bedrooms are too comfortable.
Bedrooms are messy and cluttered.
Answer:
It would basically be based on how you study and what your room is like. But my opinion would be
Bedrooms are Too Comfortable- which causes you to want to sleep or not due your work
Bedrooms are dimly lit- Which makes it hard for you to see your work and see anything
Bedrooms are too small- You will fell crushed and hard to focus (I would most likely choose this answer)
Bedrooms are messy and cluttered- You will not be able to concentrate and make it hard to study or do school work. ( I would choose this because I have experienced with this and I score higher in a cleaner environment and able to focus more)
Explanation: This would all depend on how you best work.
Hope this Helps!!
0x68
0x65 0x63
0x61
0x6b
0x65 0x69
0x73 0x61 0x6c
0x69
0x65
0x2e
Answer:
0x54 - T
0x68 - h
0x65 0x63 - e c
0x61 - a
0x6b - k
0x65 0x69 - e i
0x73 0x61 0x6c - s a l
0x69 - i
0x65 - e
0x2e - .
Explanation:
ASCII ( American Standard Code for Information Interchange) is a standardized one byte representation for characters.
For example, character 'a' has an ascii representation of 0x61.
'c' has a ascii representation of 0x63.
Converting the given hex representations to their respective characters using standard ascii tables, we get:
0x54 - T
0x68 - h
0x65 0x63 - e c
0x61 - a
0x6b - k
0x65 0x69 - e i
0x73 0x61 0x6c - s a l
0x69 - i
0x65 - e
0x2e - .
4. Write an expression whose value is the result of converting the int value associated with x to a str. So if 582 was the int associated with x you would be converting it to the str "582".
5. Write an expression whose value is the str consisting of all the characters (starting with the sixth) of the str associated with s.
Answer:
The solution or expression for each part is given below:
Explanation:
Following are attached the images that show how these expressions will be used. I hope they will make the concept clear.
All the images below are respective to the questions given.
Answer:
Following are the program in the Python Programming Language.
#define function
def isPalindrome(test):
#set the if condition to check tuple is empty
if(len(test)==0):
return True
#Check the tuple contain 1 element
elif(len(test)==1):
return True
#check the element of tuple is palindrome or not
else:
lenth=len(test)
#check first last element is equal or not
if(test[0]==test[lenth-1] and isPalindrome(test[1:lenth-1] ) ):
#then, return true
return True
#otherwise
else:
#Return False,
return False
#define tuple type variable and initialize
test=(1,2,3,4,3,2,1)
#print and call the function
print(isPalindrome(test))
Output:
True
Explanation:
Here, we define a function "palindrome()" and pass an argument in its parameter, inside the function.
(b) Selection-sort on a sequence of size n.
(c) Merge-sort on a sequence of size n.
(d) Radix sort on a sequence of n integer keys, each in the range of[ 0, (n^3) -1]
(e) Find an element in a red-black tree that has n distinct keys.
Answer:
Answers explained below
Explanation:
(a) Construction of a heap of size n , where the keys are not known in advance.
Worst Case Time complexity - O(n log n)
Two procedures - build heap, heapify
Build_heap takes O(n) time and heapify takes O(log n) time. Every time when an element is inserted into the heap, it calls heapify procedure.
=> O(n log n)
(b) Selection-sort on a sequence of size n.
Worst Case Time complexity - O(n^2)
Selection sort finds smallest element in an array repeatedly. So in every iteration it picks the minimum element by comparing it with the other unsorted elements in the array.
=> O(n^2)
(c) Merge-sort on a sequence of size n.
Worst Case Time complexity - O(n log n)
Merge sort has two parts - divide and conquer. First the array is divided (takes O(1) time) into two halves and recursively each half is sorted (takes O(log n) time). Then both halves are combines (takes O(n) time).
=> O(n log n)
(d) Radix sort on a sequence of n integer keys, each in the range of[ 0 , (n^3) -1]
Worst Case Time complexity - O (n log b (a))
b - base of the number system, a - largest number in that range, n - elements in array
Radix sort is based on the number of digits present in an element of an array A. If it has 'd' digits, then it'll loop d times.
(e) Find an element in a red-black tree that has n distinct keys.
Worst Case Time complexity - O (log n)
Red-black tree is a self-balancing binary tree => The time taken to insert, delete, search an element in this tree will always be with respect to its height.
=> O(log n)
Answer: Star topology is commonly used these days.
Explanation: