nums = [x*1.5 for x in range(1,11)]
print(nums)
The first line is the list comprehension and the second prints the list to the screen so you can see that it works.
Answer:
URI is the uniform resource identifier and it is basically a sequence of the character which identify the physical and logical resources. The uniform resource identifier basically contain the predefined set of rules and syntax and also maintain the extensibility hierarchical schema.
There are basically two types of URI that are:
1) Uniform Resource Name (URN)
2) Uniform Resource Locator (URL)
For example: HTTP protocol , file transfer protocol (FTP).
Answer:
Es importante aprender a programar, por que es el mismo de que alguen aregle su carro. En estos tiempos, la technolagia se ha convertido en la nueva normal. Va vinir el tiempo quando nosotros necesitamos que arreglar un linia de codigo en nuestras computadoras, y no esta necesario para pagar alguen que ellos lo agan. Como quando necesitas que poner una llanta nueva a tu carro. Tu lo puedes cambiar solo. Entonses como el ejemplo del carro, tu puedes arreglar el linia de codigo en la computadora sin pagar alguen por acerlo.
Answer:
public static void print_popcorn_time(int bag_ounces){
if(bag_ounces<3){
System.out.println("Too Small");
}
else if(bag_ounces>10){
System.out.println("Too Large");
}
else{
bag_ounces*=6;
System.out.println(bag_ounces+" seconds");
}
}
Explanation:
Using Java prograamming Language.
The Method (function) print_popcorn_time is defined to accept a single parameter of type int
Using if...else if ....else statements it prints the expected output given in the question
A complete java program calling the method is given below
public class num6 {
public static void main(String[] args) {
int bagOunces = 7;
print_popcorn_time(bagOunces);
}
public static void print_popcorn_time(int bag_ounces){
if(bag_ounces<3){
System.out.println("Too Small");
}
else if(bag_ounces>10){
System.out.println("Too Large");
}
else{
bag_ounces*=6;
System.out.println(bag_ounces+" seconds");
}
}
}