Python Coding Tutorial - Use Nested While Loops to Calculate Average Rainfall

preview_player
Показать описание
This step-by-step python coding practice and tutorial will strengthen your coding skills and help you become a python pro!

In this beginner friendly python tutorial, learn how to use nested while loops to calculate the average monthly rainfall over a period of years.

The practice in this video is from the book "Starting Out With Python", by Tony Gaddis.

The instructions I followed to write this program say to create a program that uses nested loops to collect data and calculate the average rainfall over a period of years. The program should first ask the user for the number of years. The outer loop will iterate over this number of years. The inner loop will iterate 12 times, once for each month of that year. Each iteration of the inner loop will ask the user to input the number of inches of rainfall for that month/year. After all iterations the program should output 3 values: the total number of months, the total amount of rainfall for all months, and the average amount of rainfall per month.

#pythonprogramming #ai #compsci #pythonforbeginners #coding
Рекомендации по теме
Комментарии
Автор

Thank you so much✌🏾 question: why do you put "f" before your statements?

tommiethestoner
join shbcf.ru