Answer:
x = int(input("What grade are you in? "))
if (x == 9):
print("Freshman")
elif (x == 10):
print("Sophomore")
elif (x == 11):
print("Junior")
elif (x == 12):
print("Senior")
else:
print("Not in High School")
Explanation:
Hope this helps lovely :)
I believe the correct answer would be A. Hope this helped!
-TTL
Answer:
In the given program, a parameterized constructor declaration is wrong, which can be described as follows:
Explanation:
Code:
class TempClass //defining class TempClass
{
int i; //defining integer varaible i
TempClass(int j)//defining parameterized constructor
{
i = j; //variable holds a value
System.out.print(i); //print value
}
}
public class Main //defining class Main
{
public static void main(String[] aw) //defining main method
{
TempClass temp =new TempClass(2); //creating class Object and call parameterized constructor.
}
}
Description:
- In the given java code, two classes "TempClass and Main" is defined, inside the TempClass class an integer variable "i" and a parameterized constructor is declared, inside the constructor integer variable "i" hold constructor parameter value, the use print method to prints its value.
- Then the main class is defined, inside this main method is declared, in this method, the TempClass object "temp" is defined, that call the parameter constructor.
Answer:The answer is near field communication.
Explanation:
Answer:
movieCost=4.95
Float
movieStars = ['Carrie Fisher', 'Harrison Ford']
List
movie= 'Star Wars'
String
movieID=132
int
movieAwards = ('Oscar', 'Golden Globe', 'Director's Guild')
Tuple
movieRatings = {5:'language', 3:'violence'}
Dictionary
Explanation:
movieCost = 4.95
movieCost is of float type because it has a decimal point.
movieStars = ['Carrie Fisher', 'Harrison Ford']
movieStars if of list type because in Python the elements of list is inside square brackets.
List is an ordered collection. List is mutable i-e items can be added and remved from the list
movie = 'Star Wars'
movies is a string type because it is in enclosed in single quotes only.
movieID = 132
movieID is of int type because it is only number, without decimal value.
movieAwards = ('Oscar', 'Golden Globe', 'Director's Guild')
movieAwards is a tuple type because it is enclosed in round brackets or parenthesis.
Tuple is a sequence object. It is ordered collection of item. it is immutable.
movieRatings = {5:'language', 3:'violence'}
MovieRating is a dictionay type because it is in key-value pair. it is an unordered collection.