Question: (1) Print Hello World (2) Save your age to a variable called age (3) Print Hello World, Im (age variable) today. (4) Print hello world
(1) Print Hello World (2) Save your age to a variable called age (3) Print Hello World, Im (age variable) today. (4) Print hello world in all upper case using a python function to alter it (5) Save any decimal in a variable called a. (6) Cast a into an int and save it as b. (7) Cast a into a string and save it as c. (8) Print each variable and its type. (9) Create a tuple of your favorite things to eat and print it. (10) Create a dictionary named classes with the name of the classes you are taking as the keys and the professors names as the values. (11) Print the dictionary and tuple. (12) Create a list called whole and put every number in it from 1 - 100 (13) Create 4 empty lists called div2, div3, div4, and div5 (14) Create a loop that examines each number from 1 to 100 and: (a) If it is divisible by 2, put it in div2 (b) If it is divisible by 3, put it in div3 (c) If it is divisible by 4, put it in div4 (d) If it is divisible by 5, put it in div5 (15) Print all 5 of these lists (16) Create a new list called divOver5 (17) Create a new loop that goes through each number 1 through 100 and appends it to divOver5 if it is NOT IN div2 or div3 or div4 or div5 (a) You must use logical operators here. (18) Print divOver5 (19) Create a function called exp3 that takes an int x, raises it to the third power. Create a string in the function that says x^3 = and concatenate x onto the end of the string. Now return the string from the function. Call the function exp3 and print what it returns. (20) Iterate through the classes dictionary and print the keys (21) Iterate through the classes dictionary and print the values
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
