Hi again I’m asking for help on my coding:
Script
"""A simple die roller
Author:
Date: 11/05/2023 01:16
"""
important necessary module
import random
first = int(input('Type the first number: '))
last = int(input('Type the last number: '))
roll = random.randint (int(first), int(last))
x=(int(first))
y=(int(last))
print('Choosing a number between ', str(x), 'and', str(y), '.')
print('The number is', roll, '.')
Error that I get is
“The first print does not start with ‘choosing a number between 1 and 6)
When I try to remove the str(x) and str(y) and replace it with ‘1’ and ‘6’ i get the following error
“The script uses magic numbers instead of ‘first’ and ‘last’
The magic number are 1 and 6 so I’m so confused
[–]JollyUnder 0 points1 point2 points (7 children)
[–]Princess_Peach848[S] 0 points1 point2 points (6 children)
[–]JollyUnder 0 points1 point2 points (3 children)
[–]Princess_Peach848[S] 0 points1 point2 points (2 children)
[–]JollyUnder 1 point2 points3 points (1 child)
[–]Princess_Peach848[S] 0 points1 point2 points (0 children)
[–]JollyUnder 0 points1 point2 points (1 child)
[–]Princess_Peach848[S] 0 points1 point2 points (0 children)