Python basic problem


Joined
Jun 8, 2022
Messages
2
Reaction score
0
ok so i am a beginner and i am just stuck on a problem in python

i want to check whether a number is in a root or not

for example
the input is √5

output
yes the number is in root

and if i input

2

no the number is not in root

please help it is for an important project
 
Ad

Advertisements

Joined
May 11, 2022
Messages
28
Reaction score
0
Python:
check = input("what would you like to check? ")
if check[0] == sqrt symbol:
   print(True)
else:
   print(False)
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top