Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone please help me with my Python code? For some reason the account number is not updating. It should be counting up by one

Can someone please help me with my Python code? For some reason the account number is not updating. It should be counting up by one after each loop. Thank you.

i = 1000 while True: accNo = i print("Account number: ", accNo) name = str(input("\tEnter the account holders name: ")) while name.isnumeric(): print("\tEnter characters only") name = str(input("\tEnter the account holders name: "))

type = str(input("\tEnter the type of account [C/S]: ")) while (type != 'C' and type != 'S'): print("\tInvalid input") type = str(input("\tEnter the type of account [C/S]: "))

while True: try: deposit = eval(input("\tEnter the initial deposit amount: ")) while deposit < 0: print("\tError! Deposit cannot be negative") deposit = eval(input("\tEnter your account number: ")) break except NameError: print("\tError! Account must be a number") print("\tAccount Created") ++i

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

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions

Question

Write short notes on departmentation.

Answered: 1 week ago

Question

What are the factors affecting organisation structure?

Answered: 1 week ago

Question

What are the features of Management?

Answered: 1 week ago

Question

Briefly explain the advantages of 'Management by Objectives'

Answered: 1 week ago

Question

LO1 Summarize the organizations strategic planning process.

Answered: 1 week ago