Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can you also upload the .ipynb file in the following link: https://drive.google.com/drive/folders/1ILBLc7uBSSme1cm8i-HjViX_zrP-AexY?usp=sharing Write the following statement using while loop. Q2. (1 point) Using a while
Can you also upload the .ipynb file in the following link:
https://drive.google.com/drive/folders/1ILBLc7uBSSme1cm8i-HjViX_zrP-AexY?usp=sharing
Write the following statement using while loop. Q2. (1 point) Using a while loop, create a list numbers that contains the numbers 0 through 35 . Your while loop should initial ize a counter variable to 0 . On each iteration, the loop should append the current value of the counter to the list and the counter should increase by t. The while loop should stop when the counter is greater than 35. ] Q3. (1 point) Write a Python program that prints all the numbers from 0 to 6 except 3 and 6 . Note : Use continue statement. Expected Output: 01245 Q4. (1 point) Write a program that iterates through the list and check whether 100 is in the list or not, if 100 is in the list, it prints it with its index number. i.e..: 'There is a 100 at index no: 5 Q5. (1 point) Write a program to calculate factorial of a number. Factorial of any number n is represented by n! and is equal to 123(n1)n. For instance, 4!=1234=24. Also, 11=1 and 0!=1 1/23/23,8:15PM 523_HW4 - Jupyter Notebook Call the function for a rectangle with length =10ft and width =5ft. In []=M Q7 (1 point) Write a function that counts the number of even numbers when a list of integer is passed in. Fill pieces of the following function. In [ ]: We want to write a function to find the hanmonic mean. More detail can be found here: https:lfen.wikipeclia.org'wikiltlarmonic_mean (https:llen.wikipedia. orghikilHarmonic_mean) Assume that we want to pass unknow number of arguments represented by vars to the function In [ ]: M '?' HarmonicKean("vars): \#(2 points Q10 (1 point) Write a function that will retum the number of digits in an integer. In []:M localhost:8889inotebooksiDownloads/523_HW4.ipynb 2/2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started