<span>arts, audio-video technology & communications</span>
Answer:
Explanation:
The following code is written in Python. It creates a variable that detects the current time. Then it loops through a range of numbers and chooses the last random number after 2 seconds. Finally, it prints that number to the screen. This function can be called countless times depending on the number of state lottery numbers needed.
import random
import time
start_time = time.time()
while time.time() - start_time < 2:
lottery_number = random.randint(0, 48)
print(lottery_number)
Answer:
Well here is what I got...
Explanation:
Action
Crime
Fantasy
Horror
Romance
Science Fiction
Slice of Life
Sports
Thriller
War
Western
Answer:
#part 1
#read the amount
amount=int(input("enter the amount:"))
#find the dollars
doll=int(amount/100)
// find the cents
cent=amount%100
#print output
print("{} dollars and {} cents.".format(doll,cent))
#part 2
#read a floating point
temperature=float(input("enter the temperature:"))
#part 3
#read a word
firstWord=input("enter a word:")
Explanation:
In part 1, read amount and the find the dollars with the help of "/" operator. Then find the cents with "%" operator and print both.In part 2, read a point and cast it to float then assign it to variable "temperature".In part 3,Read a word and assign it to variable "firstWord".
Output:
enter the amount:4321
43 dollars and 21 cents.
enter the temperature:12.5
enter a word:hello
Answer:
The answer is "Option A"
Explanation:
In the given java code, a class "Test" is defined, inside the main method try and catch block is used, inside the try block method "p()" is called, that print a message. in this block two catch block is used, that works on "NumberFormatException" and "RuntimeException". In the method "p" declaration, a string variable "s" is defined, that holds double value, that is "5.6", and converts its value into the wrong integer, and other wrong option can be described as follows:
- In option B, it is wrong, it is not followed by after call method.
- In option C, It is not followed by runtime exception, that's why it is incorrect.
- Option D and Option E both were wrong because they can't give run time and compile-time error.