Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help please # 3. Create three count variables: count-char, count_digit, count_punc. Iterate alphabetical the character is a digit (0-9) character is punctuation count punc counter.

Help please
image text in transcribed
# 3. Create three count variables: count-char, count_digit, count_punc. Iterate alphabetical the character is a digit (0-9) character is punctuation count punc counter. over the hw03 str string. If the character is (A-Za-z) increment the count char counter. If increment the count_digit counter. If the ( !@#5%^&* (l_+-.{ } [ ]!) the increment the Ignore all other characters. Print the counter names and the counts when #the iteration is complete. # Example: #countchar: 329 # count-digit: # count punc: 108 - in 4 - input( 'Enter a number for problem 4 (integer or float):') # 4. write a conditional to check if in 4 is a float or an integer. Print + integer' if in 4 is an integer and' [+] float' if the number if a float. # Example: # Enter a number for problem 4 (integer or float): # [+] integer # Enter a number for problem 4 (integer or float): 3.14 # [+] float # 5 Write a program using a while loop that asks the user for a number or to just enter to quit the program # If the user enters a number, the program should add the entered number to the total sum. # If the user just hits the enter key with no number, the program should exit. # Example: # Enter a number or just enter to guit: 45 # Enter a number or just enter to guit: 5 # Enter a number or just enter to quit: # The sum is: 50

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Progress Monitoring Data Tracking Organizer

Authors: Teacher'S Aid Publications

1st Edition

B0B7QCNRJ1

More Books

Students also viewed these Databases questions

Question

5. Identify the logical fallacies, deceptive forms of reasoning

Answered: 1 week ago

Question

6. Choose an appropriate organizational strategy for your speech

Answered: 1 week ago