def main():
name=input("Enter your name: ") #just write our name nothin important
print (name, "is Swag")
value1=int(input("enter a value: ")) #takes in the number without doubt
print(value1)
value2=float(int("Enter a fraction: ")) #heres our problem but what?
print(value2)
main()
just a simple program I am playing about with but It shows this error since you all might want to know:
I write for example 1/2 an this shows
Traceback (most recent call last):
File "C:\Users\waliu\Documents\Waliur Uni stuff\Information
systems\Python Programs\Samples\apparently fractions.py", line 8, in
<module>
main()
File "C:\Users\waliu\Documents\Waliur Uni stuff\Information
systems\Python Programs\Samples\apparently fractions.py", line 6, in main
value2=float(input("Enter a fraction: "))
ValueError: could not convert string to float: '1/2'