Hi! I'm a Digital Marketer Intern at hotels.ng and I have a moderate knowledge on programming.
First, your question is not very explanatory. The term "view" is often used in back-end web development. A view is simply a Python function that takes a Web request and returns a Web response.
But I'm not sure this is what you want, so I'll just go ahead and write a python function involving class to return the total number of credits taken by a student.
I'll answer this question using Python.
class student(object):
credits = None
year = None
def num_credits(self):
#get credit value
self.credits = input("Enter the total number of credits: " )
pass
def getYear(self):
self.year = input("Enter current year: ")
pass
def tot_credits(self):
TotalCredits = tempTotalCredits + self.num_credits
print "Your total credits are :"+" "+str(TotalCredits)
Answer:
import java.util.Scanner;
public class Speed{
int speed;
public Speed(int speed){
this.speed = speed;
}
public void checkSpeed(){
if(speed >= 24 || speed <= 56){
System.out.println("Speed is normal");
}
else
System.out.println("Speed is abnormal");
}
public static void main(String...args){
Scanner input = new Scanner(System.in);
int userSpeed = 0;
System.out.println("Enter a speed: ");
userSpeed = input.nextInt();
Speed obj1 = new Speed(userSpeed)
obj1.checkSpeed();
}
Explanation:
Answer:
d and b can't see the last ones answer so im guessing this is what you needed.
Explanation:
People live in the moment and post whatever they want and they just might regret it later on.