r/pythonhelp • • Feb 25 '21

New to python and having a simple error can’t figure out how to implement a system where it displays a error message when the value the user enters is less than a set number.

Basically what I’m doing is a scrap code to try learn some new skills in python and I’ve been doing trial and error for like 1h tryna figure this out now and it’s getting really annoying so I thought to come ask. So my code will more than likely have formatting errors here due to me having to send it from my phone so please just ignore the formatting errors in my python screen the formatting is all correct it my code goes as follows.

Def choice1(number): Input(‘enter your choice’)

Def your_wage(number): Print(‘how much do you earn a week’)

Def your_age(number) Print(‘how old are you’)

Def your_job(string) Print(‘what job do you currency have)

Def your_education(alpha numberic) Print(‘what is your highest form of education’)

Print(‘ ‘, ‘#’*27’) Print(‘ #’) Print(‘ # 1)your wage. #’) Print(‘ # 2)your age. #’) Print(‘ # 3)your job. #’) Print(‘ # 4)your education. #’) Print(‘ # 5)quit. #’) Print(‘ #’) Print(‘ ‘,’#’*27) Print(\n\n\n’) Choice=int(input(‘enter your choice’)) If choice==1: Print(your_wage) Elif choice==2: Print(your_age) Elif choice==3: Print(your_job) Elif choice==4: Print(your_education) Elif choice==5: Print(‘quit’) Else: Print(‘invalid number’)

3 Upvotes

7 comments sorted by

1

u/[deleted] Feb 25 '21

[removed] — view removed comment

1

u/[deleted] Feb 25 '21

I code on my laptop on idle but I can’t run reddit on there I’m planning on buying one some time soon but rn I can’t afford one.

1

u/[deleted] Feb 25 '21

[removed] — view removed comment

1

u/[deleted] Feb 25 '21

Ye I wasn’t planning on spending a lot I was gonna buy something cheep but I’m a poor high schooler atm so even 50-75 pound/dollar isn’t cheep to me and takes time to get.

1

u/[deleted] Feb 25 '21

[removed] — view removed comment

1

u/[deleted] Feb 25 '21

Basically it’s a laptop my school gave me to use funded by the government and nearly everything is blocked. I said it didn’t run reddit because it’s easier to explain that to explain how all this.