In Python!
Create the program that print out only odd numbers 1,3,5,7,9
In python!:
Create a program that print out 12 months of a year and associated numbers (e.g., January 1, February 2…). Two lists should be created, and then loop through the list to print about each month
Months = [‘January’, ‘February’, ‘March’, ‘April’ ]
Numbers = [1, 2, 3, 4]
*tip: to add proper space between each month and number, you can use ‘\t’ along within print()
*tip: to deal with multiple lists in a for loop, you can use zip() and list the lists in it. (e.g., zip(months, numbers) )
#Code1
for i in range(1,10,2):
print(i)
#################
#Code2
Months = ["January","February","March","April","May","June","July","August","September","October","November","December"]
Numbers = [1,2,3,4,5,6,7,8,9,10,11,12]
for i in range(12):
print(Months[i]+" "+str(Numbers[i]))
In Python! Create the program that print out only odd numbers 1,3,5,7,9 Use either a while...
Write a python program that uses a while loop to print numbers 100,98,96... all the way to 0. each number should be printed on a seperate line
Write a program that asks the user for the number of the month they were born in (1 for January, 12 for December), then have the program print the name of the month and the birthstone for that month. Use two lists to store the names of the months and the names of the birthstones for each month, and use the number the user types to look up the values to print. Loop until an invalid month number is entered...
Create a new Python program in IDLE, and save it as lab8.py.(Again, I recommend saving lab progranms Your Python program will do the following: Create an empty list . Use a for loop to ask the user for 10 numbers. Add each number to your list using the append metha . Use another for loop to print the list in reverse order, one per line . Use a while loop to count how many positive numbers are in the list...
Create a PowerPoint that contains a FLOWCHART and a PSEUDOCODE for each problem (You may use a different application if PowerPoint is not available). Use the information below to create a pseudocode (which can be a text-based description for solving the problems) and a flowchart (using flowchart symbols to illustrate how you would program) to solve each problem. Use Microsoft PowerPoint® for Pseudocode and the flowchart (You may use a different application if PowerPoint is not available).. Problem 1:...
Write a python program where you create a list (you an create it in code you do not have to use input() statements) that represents the total rainfall for each of 12 months (assume that element 0 is January and element 11 is December). The program should calculate and display the: 1) total rainfall for the year; 2) the average monthly rainfall; 3) the months with the highest and lowest amounts. You need to figure out how to access each...
Python Help Create a program that outputs a table from 1 to 5 using what you've learned about "for" loops. Your program will print the number and indicate if the number is odd or even. If it is not odd you will multiply 2 numbers with it: number 1 and number 2. Your program must do the multiplication for only even numbers in the table. The output of your program should look like the figure below. Hint: Create a program...
Can someone fix this python program? I'm trying to do three things: Create a function that takes in a string as a parameter. Then create a dictionary of characters to integers, where the integer represents how many times the number of times the character appears in the word. Create a function that takes two lists as parameters and returns the elements they have in common of the two lists. Ask the user to create a list of numbers and keep...
Python Print integer numbers up to 100 (1, 2, 3, …..) using a while loop. Each integer number takes a separate line.
***C++ Program ONLY*** Menu driven program First load an array(lists) with the values 3, 4, 84, 5, 2, 47, and 7 in this order Then sort the array(list) Create a program with a menu, with choices 1 for factorial (single value, which everyone will use 20!), 2 for median value , 3 for average, 4 for maximum, 5 for minimum, and 6 to end the program. Use a do loop (not while) Python does not have a Do loop, so...
// use "for i in range():
//use len.
//basic python
//discrete mathematics
Write a program in Python (in a .py file) that: Makes two lists of 50 numbers each, where the first list is multiples of 5, and the second list is the first 50 squares: 1, 4, 9, 16, 25, 36, ....up to 2500. then I want you to make a third list by multiplying each individual pair in the two lists, so for example: 5 times 1 is...