what is the problem? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

what is the problem?

a = input("how many students in class?: ") b = input("what grade the student in class?: ") print (b/a) it can’t run because a and b is str please solve it

22nd Dec 2018, 5:11 AM
하인철
하인철 - avatar
2 Answers
+ 2
Try this: a = int(input("How many students in class?: ")) b = int(input("What grade the student in class?: ")) print(b/a) And next time try including relevant tags in your questions.
22nd Dec 2018, 5:26 AM
Diego
Diego - avatar
0
Diego Acero thx! i’l do it
22nd Dec 2018, 5:32 AM
하인철
하인철 - avatar