Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Which is the following is the correct format for: sum = sum*2? A. sum=*2

B. sum*2

C. sum*=2

D. sum*2=sum


2. Please construct a class in terms of the below description. (5 marks)

HKIT needs to develop a system to keep the students’ profile including the name, student id, the programme enrolled by the student, address of student and age. Student could read and modify his/her profile. Please help construct a Student class for this purpose.

class Student {

//variables (2 marks)

//getter (one getter is ok) (1 mark)

//setter (one setter is ok) (2 mark)


Write if-else statement that outputs

Student must achieve at least 40 in the exam grade and 70% in the attendance in order to pass the module (print out “You pass the module!”). If the student fails the attendance only, the student needs to take classes to make up the attendance (print out ”Please take classes to make up your attendance.”) . If the student fails the exam grade only, the student is eligible to apply re-exam (print out “You are eligible for re-exam”). If the student fails both the exam and the attendance, the student needs to retake the whole module (print out Please retake the module”).

The variables attendance is of type double, and grade is of type int.

if (______________________ ) {

_______________________________________________________

}

elseif (___________________) {

______________________________________________________

}

elseif (___________________) {

______________________________________________________

}

else {

______________________________________________________

}


3. Not my Favorites

by CodeChum Admin

We've already done looping through a series of numbers and printing out its squares, so how about we level it up and go with cubes this time?


I have a condition though; I don't want to be associated with numbers that are divisible by 3 or 5 so if an integer is divisible by either of the two, don't make their cube values appear on the screen, please.


Care to fulfill my request?


Instructions

  1. Print out the cube values of the numbers ranging from 1 to 10 (inclusive). However, if the number is divisible by either 3 or 5, do not include them in printing and proceed with the next numbers.
  2. Tip: When skipping through special values, make use of the keyword continue and put them inside a conditional statement.


Output

Multiple lines containing an integer.

1
8
64
343
512
.
.
.

2. Found Ya!

by CodeChum Admin

Let's now try finding a certain digit into an integer! Come and join in on the fun and code with me!


Instructions

  1. Create two variables assigned to an input() function. The first one shall accept any integer from 0-9 and the other one shall take a random positive integer. All the needed values are to be inputted in one single line.
  2. Using loops, identify if the number (0-9) is present in the given positive integer. If it is found, print "Yes"; else, print "No".
  3. Tip: If the number is already found even without reaching the end of the loop, use the break keyword to exit the loop early for a more efficient code.

1. Finding Letters

by CodeChum Admin

We've already counted digits before on a certain number, so how about doing it on strings and characters? There's a catch, though, since you're only going to count and see if the character exists at least twice in a string.


Are you up for the challenge?

Instructions

  1. Create two variables and assign them to an input() function. The first variable shall accept a single letter and the second variable shall store the inputted string.
  2. Using loops, count the number of times that the single letter appears on the inputted string, and when it appears at least twice in the string, print "Cody is really awesome"; else, print "Cody rocks".
  3. Tip: to make your code more efficient, use the break keyword to terminate the loop whenever the count of appearance of the single letter has already reached 2.

Describe the difference between objects and values using the terms “equivalent” and “identical”. Illustrate the difference using your own examples with Python lists and the “is” operator.  

Describe the relationship between objectsreferences, and aliasing. Again, create your own examples with Python lists.

Finally, create your own example of a function that modifies a list passed in as an argument. Describe what your function does in terms of argumentsparametersobjects, and references

Create your own unique examples for this assignment. Do not copy them from the textbook or any other source.

Program 3:
Write a program which inputs integers to the user, which puts them as and when
measure in a list (List container of the STL), which sorts this list and then displays the
sorted list.







Logos Section

In this assignment, let's build a Logos Section by applying the concepts we learned till now.

Refer to the below images.

The following images illustrate all device sizes, from extra small to extra large.


Extra Small (Size < 576px) and Small (Size >= 576px):



Medium (Size >= 768px), Large (Size >= 992px) and Extra Large (Size >= 1200px):


print the sum of an array and the array 1-d


LATEST TUTORIALS
APPROVED BY CLIENTS