python program to acquire marks for a student (out of 100). The program should display Pass if marks are greater or equal to 33 or else should display Fail.
please fast!!
Answers
Answered by
1
from random import choice
nums = [x for x in range(0, 101)]
marks = {
"Maths": choice(nums),
"Science": choice(nums),
"Social Science": choice(nums),
"English": choice(nums),
"French": choice(nums),
"ICT": choice(nums)
}
for k, v in marks.items():
if v >= 33:
print(f"{k}: PASS")
else:
print(f"{k}: FAIL")
Answered by
3
Answer:
from random import choice
nums = [x for x in range(0, 101)]
marks = {
"Maths": choice(nums),
"Science": choice(nums),
"Social Science": choice(nums),
"English": choice(nums),
"French": choice(nums),
"ICT": choice(nums)
}
for k, v in marks.items():
if v >= 33:
print(f"{k}: PASS")
else:
print(f"{k}: FAIL")
Similar questions